com.im.commons.db.ddl
Class DBConstraintInfo
java.lang.Object
com.im.commons.db.ddl.DBConstraintInfo
- All Implemented Interfaces:
- AbstractInfo, Serializable
public class DBConstraintInfo
- extends Object
- implements AbstractInfo, Serializable
Information about a constraint for a database table.
- See Also:
- Serialized Form
DBConstraintInfo
public DBConstraintInfo()
DBConstraintInfo
public DBConstraintInfo(String constraintName,
String[] columns)
DBConstraintInfo
public DBConstraintInfo(String constraintName,
DBConstraintInfo.Type type,
String[] columns,
String indexName)
getColumns
public String[] getColumns()
getConstraintName
public String getConstraintName()
getIndexName
public String getIndexName()
- The index that backs this constraint. Will only be defined for primary key
and unique constraints. For other types of constrain it will be null
- Returns:
- The name of the index, or null.
getType
public DBConstraintInfo.Type getType()
- The type of the constraint, as defiend by one of the Type enums.
- Returns:
- The type
addToModel
public void addToModel(String parentID,
DBItemsCache dbItemsCache)
- Specified by:
addToModel in interface AbstractInfo
removeFromModel
public void removeFromModel(String parentID,
DBItemsCache dbItemsCache)
- Specified by:
removeFromModel in interface AbstractInfo
toString
public String toString()
- Overrides:
toString in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object