Class AlterTableAddColumn
- java.lang.Object
-
- com.ibm.fhir.database.utils.model.BaseObject
-
- com.ibm.fhir.database.utils.model.AlterTableAddColumn
-
- All Implemented Interfaces:
IDatabaseObject
public class AlterTableAddColumn extends BaseObject
Add new columns to an existing table. This alter will change the version history of the underlying table.
-
-
Field Summary
-
Fields inherited from class com.ibm.fhir.database.utils.model.BaseObject
migrations, version
-
-
Constructor Summary
Constructors Constructor Description AlterTableAddColumn(String schemaName, String tableName, int version, ColumnBase... columns)Public constructor.AlterTableAddColumn(String schemaName, String tableName, int version, List<ColumnBase> columns)Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(IDatabaseAdapter target)Apply the DDL for this object to the target databasevoidapply(Integer priorVersion, IDatabaseAdapter target)Apply migration logic to bring the target database to the current level of this objectvoiddrop(IDatabaseAdapter target)DROP this object from the target databaseStringgetTypeNameVersion()Get the qualified name for this object: objectType:objectName:objectVersionprotected voidgrantGroupPrivileges(IDatabaseAdapter target, Set<Privilege> group, String toUser)Internal method which can be override by different object types which may need to call a different grant method on the adaptervoidvisit(DataModelVisitor v)Visit thisIDatabaseObjectwith the givenDataModelVisitor.voidvisitReverse(DataModelVisitor v)Visit thisIDatabaseObjectwith the givenDataModelVisitor.-
Methods inherited from class com.ibm.fhir.database.utils.model.BaseObject
addDependencies, addDependency, addPrivilege, addTag, addTags, applyTx, applyVersion, collect, equals, fetchDependenciesTo, getName, getObjectName, getObjectType, getQualifiedName, getSchemaName, getTags, getVersion, grant, hashCode, safeSleep, toString, visit
-
-
-
-
Constructor Detail
-
AlterTableAddColumn
public AlterTableAddColumn(String schemaName, String tableName, int version, List<ColumnBase> columns)
Public constructor- Parameters:
schemaName-tableName-version-columns-
-
AlterTableAddColumn
public AlterTableAddColumn(String schemaName, String tableName, int version, ColumnBase... columns)
Public constructor. Convenience for adding an arbitrary list of ColumnBase args- Parameters:
schemaName-tableName-column-version-
-
-
Method Detail
-
getTypeNameVersion
public String getTypeNameVersion()
Description copied from interface:IDatabaseObjectGet the qualified name for this object: objectType:objectName:objectVersion- Specified by:
getTypeNameVersionin interfaceIDatabaseObject- Overrides:
getTypeNameVersionin classBaseObject- Returns:
-
apply
public void apply(IDatabaseAdapter target)
Description copied from interface:IDatabaseObjectApply 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:IDatabaseObjectApply migration logic to bring the target database to the current level of this objecttarget- the database target
-
drop
public void drop(IDatabaseAdapter target)
Description copied from interface:IDatabaseObjectDROP this object from the target database
-
grantGroupPrivileges
protected void grantGroupPrivileges(IDatabaseAdapter target, Set<Privilege> group, String toUser)
Description copied from class:BaseObjectInternal method which can be override by different object types which may need to call a different grant method on the adapter- Overrides:
grantGroupPrivilegesin 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.
-
-