ConstraintCore duplicate() { ConstraintCore copy = new ConstraintCore(); copy.refName = refName; copy.mainName = mainName; copy.uniqueName = uniqueName; copy.mainTable = mainTable; copy.mainCols = mainCols; copy.mainIndex = mainIndex; copy.refTable = refTable; copy.refCols = refCols; copy.refIndex = refIndex; copy.deleteAction = deleteAction; copy.updateAction = updateAction; copy.matchType = matchType; return copy; }
/** * General constructor for foreign key constraints. * * @param name name of constraint * @param refCols list of referencing columns * @param mainTableName referenced table * @param mainCols list of referenced columns * @param type constraint type * @param deleteAction triggered action on delete * @param updateAction triggered action on update */ public Constraint( HsqlName name, HsqlName refTableName, OrderedHashSet refCols, HsqlName mainTableName, OrderedHashSet mainCols, int type, int deleteAction, int updateAction, int matchType) { core = new ConstraintCore(); this.name = name; constType = type; mainColSet = mainCols; core.refTableName = refTableName; core.mainTableName = mainTableName; refColSet = refCols; core.deleteAction = deleteAction; core.updateAction = updateAction; core.matchType = matchType; }