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()StringgetSchemaName()StringgetTableName()StringgetTenantColumnName()voidrun(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:IDatabaseStatementExecute the statement using the connection.- Specified by:
 runin interfaceIDatabaseStatement- Parameters:
 translator- to translate any exceptions
 
 - 
 
 -