Package ru.curs.celesta.dbutils.meta
Class DbFkInfo
- java.lang.Object
-
- ru.curs.celesta.dbutils.meta.DbFkInfo
-
public final class DbFkInfo extends Object
Information on foreign key taken from the database.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getColumnNames()
FKRule
getDeleteRule()
Returns foreign key rule type on deletion.String
getName()
Returns foreign key name.String
getRefGrainName()
Returns referenced grain name.String
getRefTableName()
Returns table name that foreign key refers to.String
getTableName()
Returns table name for which foreign key is defined.FKRule
getUpdateRule()
Returns foreign key rule type on update.boolean
reflects(ForeignKey fk)
void
setDeleteRule(FKRule deleteBehaviour)
Sets foreign key rule type on deletion.void
setRefGrainName(String refGrainName)
Set referenced grain name.void
setRefTableName(String refTableName)
Sets name of a table that the foreign key refers to.void
setTableName(String tableName)
Sets table name for which foreign key is defined.void
setUpdateRule(FKRule updateBehaviour)
Sets foreign key rule type on update.
-
-
-
Constructor Detail
-
DbFkInfo
public DbFkInfo(String name)
-
-
Method Detail
-
getName
public String getName()
Returns foreign key name.- Returns:
-
getTableName
public String getTableName()
Returns table name for which foreign key is defined.- Returns:
-
setTableName
public void setTableName(String tableName)
Sets table name for which foreign key is defined.- Parameters:
tableName
- table name
-
getRefTableName
public String getRefTableName()
Returns table name that foreign key refers to.- Returns:
-
setRefTableName
public void setRefTableName(String refTableName)
Sets name of a table that the foreign key refers to.- Parameters:
refTableName
- referenced table name
-
getRefGrainName
public String getRefGrainName()
Returns referenced grain name.- Returns:
-
setRefGrainName
public void setRefGrainName(String refGrainName)
Set referenced grain name.- Parameters:
refGrainName
- referenced grain name
-
getDeleteRule
public FKRule getDeleteRule()
Returns foreign key rule type on deletion.- Returns:
-
setDeleteRule
public void setDeleteRule(FKRule deleteBehaviour)
Sets foreign key rule type on deletion.- Parameters:
deleteBehaviour
- deletion rule type
-
getUpdateRule
public FKRule getUpdateRule()
Returns foreign key rule type on update.- Returns:
-
setUpdateRule
public void setUpdateRule(FKRule updateBehaviour)
Sets foreign key rule type on update.- Parameters:
updateBehaviour
- update rule type
-
reflects
public boolean reflects(ForeignKey fk)
-
-