Class ObjectGroup
- java.lang.Object
-
- com.ibm.fhir.database.utils.model.BaseObject
-
- com.ibm.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 com.ibm.fhir.database.utils.model.BaseObject
migrations, version
-
-
Constructor Summary
Constructors Constructor Description ObjectGroup(String schemaName, String name, Collection<IDatabaseObject> groupIn)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(IDatabaseAdapter target)
Apply the DDL for this object to the target databasevoid
apply(Integer priorVersion, IDatabaseAdapter target)
Apply migration logic to bring the target database to the current level of this objectvoid
applyVersion(IDatabaseAdapter target, IVersionHistoryService vhs)
Apply the change, but only if it has a newer version than we already have recorded in the databasevoid
drop(IDatabaseAdapter target)
DROP this object from the target databasevoid
grant(IDatabaseAdapter target, String groupName, String toUser)
Grant the given privileges to the uservoid
visit(DataModelVisitor v)
Visit thisIDatabaseObject
with the givenDataModelVisitor
.void
visit(Consumer<IDatabaseObject> c)
Visit this object, calling the consumer for itself, or its children if anyvoid
visitReverse(DataModelVisitor v)
Visit thisIDatabaseObject
with the givenDataModelVisitor
.-
Methods inherited from class com.ibm.fhir.database.utils.model.BaseObject
addDependencies, addDependency, addPrivilege, addTag, addTags, applyTx, collect, equals, fetchDependenciesTo, getName, getObjectName, getObjectType, getQualifiedName, getSchemaName, getTags, getTypeNameVersion, getVersion, grantGroupPrivileges, hashCode, safeSleep, toString
-
-
-
-
Constructor Detail
-
ObjectGroup
public ObjectGroup(String schemaName, String name, Collection<IDatabaseObject> groupIn)
Public constructor- Parameters:
schemaName
-name
-groupIn
-
-
-
Method Detail
-
applyVersion
public void applyVersion(IDatabaseAdapter target, IVersionHistoryService vhs)
Description copied from class:BaseObject
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(IDatabaseAdapter target)
Description copied from interface:IDatabaseObject
DROP this object from the target database
-
grant
public void grant(IDatabaseAdapter target, String groupName, 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(IDatabaseAdapter target)
Description copied from interface:IDatabaseObject
Apply the DDL for this object to the target database- Parameters:
target
- the database target
-
apply
public void apply(Integer priorVersion, IDatabaseAdapter target)
Description copied from interface:IDatabaseObject
Apply migration logic to bring the target database to the current level of this objecttarget
- the database target
-
visit
public void visit(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.
-
-