Class ConfigSchema
java.lang.Object
io.quarkus.hibernate.orm.panache.PanacheEntityBase
ai.pipestream.registration.entity.ConfigSchema
@Entity
public class ConfigSchema
extends io.quarkus.hibernate.orm.panache.PanacheEntityBase
Entity representing a configuration schema for a service.
This is the system of record, with Apicurio Registry as a secondary store.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSynchronization state of a schema relative to Apicurio Registry. -
Field Summary
FieldsModifier and TypeFieldDescriptionApicurio artifact ID once the schema has been synced to the registry.Apicurio global ID once the schema has been synced to the registry.Timestamp when the row was created (set on insert).Identifier of the principal that created the schema, if known.The JSON schema content, stored as a JSONB column.Timestamp of the most recent sync attempt.Primary key: the generated unique schema ID.Version of the schema.Name of the service this schema belongs to.Error message from the most recent failed sync, ornullwhen none.Current synchronization state with Apicurio; defaults toConfigSchema.SyncStatus.PENDING. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigSchemaFactory method to create a new ConfigSchema.static StringgenerateSchemaId(String serviceName, String version) Generates a unique schema ID.voidmarkSynced(String artifactId, Long globalId) Marks the schema as synced to Apicurio.voidmarkSyncFailed(String error) Marks the schema sync as failed.Methods inherited from class io.quarkus.hibernate.orm.panache.PanacheEntityBase
count, count, count, count, delete, delete, delete, delete, deleteAll, deleteById, find, find, find, find, find, find, findAll, findAll, findById, findById, findByIdOptional, findByIdOptional, findByIds, flush, getEntityManager, getSession, isPersistent, list, list, list, list, list, list, listAll, listAll, persist, persist, persist, persist, persistAndFlush, stream, stream, stream, stream, stream, stream, streamAll, streamAll, update, update, update
-
Field Details
-
schemaId
Primary key: the generated unique schema ID. -
serviceName
Name of the service this schema belongs to. -
schemaVersion
Version of the schema. -
jsonSchema
The JSON schema content, stored as a JSONB column. -
createdAt
Timestamp when the row was created (set on insert). -
createdBy
Identifier of the principal that created the schema, if known. -
apicurioArtifactId
Apicurio artifact ID once the schema has been synced to the registry. -
apicurioGlobalId
Apicurio global ID once the schema has been synced to the registry. -
syncStatus
Current synchronization state with Apicurio; defaults toConfigSchema.SyncStatus.PENDING. -
lastSyncAttempt
Timestamp of the most recent sync attempt. -
syncError
Error message from the most recent failed sync, ornullwhen none.
-
-
Constructor Details
-
ConfigSchema
public ConfigSchema()Creates an empty schema entity. Required by JPA; application code should prefercreate(String, String, String).
-
-
Method Details
-
create
Factory method to create a new ConfigSchema.- Parameters:
serviceName- the service nameversion- the schema versionjsonSchema- the JSON schema string- Returns:
- the created ConfigSchema
-
generateSchemaId
-
markSynced
-
markSyncFailed
Marks the schema sync as failed.- Parameters:
error- the error message
-