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