Class AddForeignKeyConstraint
- java.lang.Object
-
- com.ibm.fhir.database.utils.common.AddForeignKeyConstraint
-
- All Implemented Interfaces:
IDatabaseStatement
public class AddForeignKeyConstraint extends Object implements IDatabaseStatement
Add one or more foreign keys to the schema.table
-
-
Constructor Summary
Constructors Constructor Description AddForeignKeyConstraint(String schemaName, String tableName, ForeignKeyConstraint... constraint)
Public constructorAddForeignKeyConstraint(String schemaName, String tableName, String tenantColumnName, ForeignKeyConstraint... constraint)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ForeignKeyConstraint>
getConstraints()
String
getSchemaName()
String
getTableName()
String
getTenantColumnName()
void
run(IDatabaseTranslator translator, Connection c)
Execute the statement using the connection.
-
-
-
Constructor Detail
-
AddForeignKeyConstraint
public AddForeignKeyConstraint(String schemaName, String tableName, ForeignKeyConstraint... constraint)
Public constructor- Parameters:
schemaName
-tableName
-constraint
-
-
AddForeignKeyConstraint
public AddForeignKeyConstraint(String schemaName, String tableName, String tenantColumnName, ForeignKeyConstraint... constraint)
Public constructor- Parameters:
schemaName
-tableName
-tenantColumnName
-constraint
-
-
-
Method Detail
-
getSchemaName
public String getSchemaName()
- Returns:
- the schemaName
-
getTableName
public String getTableName()
- Returns:
- the tableName
-
getTenantColumnName
public String getTenantColumnName()
- Returns:
- the tenantColumnName
-
getConstraints
public List<ForeignKeyConstraint> getConstraints()
- Returns:
- the constraints
-
run
public void run(IDatabaseTranslator translator, Connection c)
Description copied from interface:IDatabaseStatement
Execute the statement using the connection.- Specified by:
run
in interfaceIDatabaseStatement
- Parameters:
translator
- to translate any exceptions
-
-