Class View
- java.lang.Object
-
- org.linuxforhealth.fhir.database.utils.model.BaseObject
-
- org.linuxforhealth.fhir.database.utils.model.View
-
- All Implemented Interfaces:
IDatabaseObject
public class View extends BaseObject
Defines a SQL VIEW object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classView.BuilderFluent builder forView
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.database.utils.model.BaseObject
migrations, version
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedView(java.lang.String schemaName, java.lang.String objectName, int version, java.lang.String selectClause, java.util.Collection<IDatabaseObject> dependencies, java.util.Map<java.lang.String,java.lang.String> tags, java.util.Collection<GroupPrivilege> privileges, java.util.List<Migration> migrations)Protected constructor
-
Method Summary
All Methods Static 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 databasestatic View.Builderbuilder(java.lang.String schemaName, java.lang.String viewName)Create a new Builder instance which can be used to create immutable instances ofViewvoiddrop(ISchemaAdapter target)DROP this object from the target databasevoidvisit(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, applyDistributionRules, applyTx, applyVersion, collect, equals, fetchDependenciesTo, getName, getObjectName, getObjectType, getQualifiedName, getSchemaName, getTags, getTypeNameVersion, getVersion, grant, grantGroupPrivileges, hashCode, toString, visit
-
-
-
-
Constructor Detail
-
View
protected View(java.lang.String schemaName, java.lang.String objectName, int version, java.lang.String selectClause, java.util.Collection<IDatabaseObject> dependencies, java.util.Map<java.lang.String,java.lang.String> tags, java.util.Collection<GroupPrivilege> privileges, java.util.List<Migration> migrations)Protected constructor- Parameters:
schemaName-objectName-objectType-version-
-
-
Method Detail
-
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
-
drop
public void drop(ISchemaAdapter target)
Description copied from interface:IDatabaseObjectDROP this object from the target database
-
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.
-
builder
public static View.Builder builder(java.lang.String schemaName, java.lang.String viewName)
Create a new Builder instance which can be used to create immutable instances ofView- Returns:
-
-