Class ObjectGroup
- java.lang.Object
-
- org.linuxforhealth.fhir.database.utils.model.BaseObject
-
- org.linuxforhealth.fhir.database.utils.model.ObjectGroup
-
- All Implemented Interfaces:
IDatabaseObject
public class ObjectGroup extends BaseObject
A collection ofIDatabaseObjectwhich are applied in order within one transaction
-
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.database.utils.model.BaseObject
migrations, version
-
-
Constructor Summary
Constructors Constructor Description ObjectGroup(java.lang.String schemaName, java.lang.String name, java.util.Collection<IDatabaseObject> groupIn)Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(java.lang.Integer priorVersion, ISchemaAdapter target, SchemaApplyContext context)Apply migration logic to bring the target database to the current level of this objectvoidapply(ISchemaAdapter target, SchemaApplyContext context)Apply the DDL for this object to the target databasevoidapplyDistributionRules(ISchemaAdapter target, int pass)Apply any distribution rules associated with the object (usually a table)voidapplyVersion(ISchemaAdapter target, SchemaApplyContext context, IVersionHistoryService vhs)Apply the change, but only if it has a newer version than we already have recorded in the databasevoiddrop(ISchemaAdapter target)DROP this object from the target databasevoidgrant(ISchemaAdapter target, java.lang.String groupName, java.lang.String toUser)Grant the given privileges to the uservoidvisit(java.util.function.Consumer<IDatabaseObject> c)Visit this object, calling the consumer for itself, or its children if anyvoidvisit(DataModelVisitor v)Visit thisIDatabaseObjectwith the givenDataModelVisitor.voidvisitReverse(DataModelVisitor v)Visit thisIDatabaseObjectwith the givenDataModelVisitor.-
Methods inherited from class org.linuxforhealth.fhir.database.utils.model.BaseObject
addDependencies, addDependency, addPrivilege, addTag, addTags, applyTx, collect, equals, fetchDependenciesTo, getName, getObjectName, getObjectType, getQualifiedName, getSchemaName, getTags, getTypeNameVersion, getVersion, grantGroupPrivileges, hashCode, toString
-
-
-
-
Constructor Detail
-
ObjectGroup
public ObjectGroup(java.lang.String schemaName, java.lang.String name, java.util.Collection<IDatabaseObject> groupIn)Public constructor- Parameters:
schemaName-name-groupIn-
-
-
Method Detail
-
applyVersion
public void applyVersion(ISchemaAdapter target, SchemaApplyContext context, IVersionHistoryService vhs)
Description copied from interface:IDatabaseObjectApply the change, but only if it has a newer version than we already have recorded in the database- Specified by:
applyVersionin interfaceIDatabaseObject- Overrides:
applyVersionin classBaseObjectvhs- the service used to manage the version history table
-
drop
public void drop(ISchemaAdapter target)
Description copied from interface:IDatabaseObjectDROP this object from the target database
-
grant
public void grant(ISchemaAdapter target, java.lang.String groupName, java.lang.String toUser)
Description copied from interface:IDatabaseObjectGrant the given privileges to the user- Specified by:
grantin interfaceIDatabaseObject- Overrides:
grantin classBaseObject
-
apply
public void apply(ISchemaAdapter target, SchemaApplyContext context)
Description copied from interface:IDatabaseObjectApply the DDL for this object to the target database- Parameters:
target- the database targetcontext- context to control the schema apply process
-
apply
public void apply(java.lang.Integer priorVersion, ISchemaAdapter target, SchemaApplyContext context)Description copied from interface:IDatabaseObjectApply migration logic to bring the target database to the current level of this objecttarget- the database targetcontext- to control the schema apply process
-
visit
public void visit(java.util.function.Consumer<IDatabaseObject> c)
Description copied from interface:IDatabaseObjectVisit this object, calling the consumer for itself, or its children if any- Specified by:
visitin interfaceIDatabaseObject- Overrides:
visitin classBaseObject
-
visit
public void visit(DataModelVisitor v)
Description copied from interface:IDatabaseObjectVisit thisIDatabaseObjectwith the givenDataModelVisitor. Any sub-objects should be visited in creation order.
-
visitReverse
public void visitReverse(DataModelVisitor v)
Description copied from interface:IDatabaseObjectVisit thisIDatabaseObjectwith the givenDataModelVisitor. Any sub-objects should be visited in reverse order.
-
applyDistributionRules
public void applyDistributionRules(ISchemaAdapter target, int pass)
Description copied from interface:IDatabaseObjectApply any distribution rules associated with the object (usually a table)- Specified by:
applyDistributionRulesin interfaceIDatabaseObject- Overrides:
applyDistributionRulesin classBaseObject- Parameters:
target- the target database we apply the operation topass- multiple pass number
-
-