com.im.commons.db 5.9.2

com.im.commons.db.ddl
Class DBConstraintInfo

java.lang.Object
  extended by 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

Nested Class Summary
static class DBConstraintInfo.Type
           
 
Constructor Summary
DBConstraintInfo()
           
DBConstraintInfo(String constraintName, DBConstraintInfo.Type type, String[] columns, String indexName)
           
DBConstraintInfo(String constraintName, String[] columns)
           
 
Method Summary
 void addToModel(String parentID, DBItemsCache dbItemsCache)
           
 boolean equals(Object obj)
           
 String[] getColumns()
           
 String getConstraintName()
           
 String getIndexName()
          The index that backs this constraint.
 DBConstraintInfo.Type getType()
          The type of the constraint, as defiend by one of the Type enums.
 int hashCode()
           
 void removeFromModel(String parentID, DBItemsCache dbItemsCache)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DBConstraintInfo

public DBConstraintInfo()

DBConstraintInfo

public DBConstraintInfo(String constraintName,
                        String[] columns)

DBConstraintInfo

public DBConstraintInfo(String constraintName,
                        DBConstraintInfo.Type type,
                        String[] columns,
                        String indexName)
Method Detail

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

com.im.commons.db 5.9.2