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 ofIDatabaseObject
which 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 void
apply(java.lang.Integer priorVersion, ISchemaAdapter target, SchemaApplyContext context)
Apply migration logic to bring the target database to the current level of this objectvoid
apply(ISchemaAdapter target, SchemaApplyContext context)
Apply the DDL for this object to the target databasevoid
applyDistributionRules(ISchemaAdapter target, int pass)
Apply any distribution rules associated with the object (usually a table)void
applyVersion(ISchemaAdapter target, SchemaApplyContext context, IVersionHistoryService vhs)
Apply the change, but only if it has a newer version than we already have recorded in the databasevoid
drop(ISchemaAdapter target)
DROP this object from the target databasevoid
grant(ISchemaAdapter target, java.lang.String groupName, java.lang.String toUser)
Grant the given privileges to the uservoid
visit(java.util.function.Consumer<IDatabaseObject> c)
Visit this object, calling the consumer for itself, or its children if anyvoid
visit(DataModelVisitor v)
Visit thisIDatabaseObject
with the givenDataModelVisitor
.void
visitReverse(DataModelVisitor v)
Visit thisIDatabaseObject
with 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:IDatabaseObject
Apply the change, but only if it has a newer version than we already have recorded in the database- Specified by:
applyVersion
in interfaceIDatabaseObject
- Overrides:
applyVersion
in classBaseObject
vhs
- the service used to manage the version history table
-
drop
public void drop(ISchemaAdapter target)
Description copied from interface:IDatabaseObject
DROP this object from the target database
-
grant
public void grant(ISchemaAdapter target, java.lang.String groupName, java.lang.String toUser)
Description copied from interface:IDatabaseObject
Grant the given privileges to the user- Specified by:
grant
in interfaceIDatabaseObject
- Overrides:
grant
in classBaseObject
-
apply
public void apply(ISchemaAdapter target, SchemaApplyContext context)
Description copied from interface:IDatabaseObject
Apply 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:IDatabaseObject
Apply 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:IDatabaseObject
Visit this object, calling the consumer for itself, or its children if any- Specified by:
visit
in interfaceIDatabaseObject
- Overrides:
visit
in classBaseObject
-
visit
public void visit(DataModelVisitor v)
Description copied from interface:IDatabaseObject
Visit thisIDatabaseObject
with the givenDataModelVisitor
. Any sub-objects should be visited in creation order.
-
visitReverse
public void visitReverse(DataModelVisitor v)
Description copied from interface:IDatabaseObject
Visit thisIDatabaseObject
with the givenDataModelVisitor
. Any sub-objects should be visited in reverse order.
-
applyDistributionRules
public void applyDistributionRules(ISchemaAdapter target, int pass)
Description copied from interface:IDatabaseObject
Apply any distribution rules associated with the object (usually a table)- Specified by:
applyDistributionRules
in interfaceIDatabaseObject
- Overrides:
applyDistributionRules
in classBaseObject
- Parameters:
target
- the target database we apply the operation topass
- multiple pass number
-
-