|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.mapping.Constraint
public abstract class Constraint
A relational constraint.
Constructor Summary | |
---|---|
Constraint()
|
Method Summary | |
---|---|
void |
addColumn(Column column)
|
void |
addColumns(Iterator columnIterator)
|
Iterator |
columnIterator()
|
boolean |
containsColumn(Column column)
|
abstract String |
generatedConstraintNamePrefix()
|
static String |
generateName(String prefix,
Table table,
Column... columns)
If a constraint is not explicitly named, this is called to generate a unique hash using the table and column names. |
static String |
generateName(String prefix,
Table table,
List<Column> columns)
Helper method for generateName(String, Table, Column...) . |
Column |
getColumn(int i)
|
Iterator |
getColumnIterator()
|
List |
getColumns()
|
int |
getColumnSpan()
|
String |
getName()
|
Table |
getTable()
|
static String |
hashedName(String s)
Hash a constraint name using MD5. |
boolean |
isGenerated(Dialect dialect)
|
void |
setName(String name)
|
void |
setTable(Table table)
|
abstract String |
sqlConstraintString(Dialect d,
String constraintName,
String defaultCatalog,
String defaultSchema)
|
String |
sqlCreateString(Dialect dialect,
Mapping p,
String defaultCatalog,
String defaultSchema)
|
String |
sqlDropString(Dialect dialect,
String defaultCatalog,
String defaultSchema)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Constraint()
Method Detail |
---|
public String getName()
public void setName(String name)
public static String generateName(String prefix, Table table, Column... columns)
prefix
- Appended to the beginning of the generated nametable
- columns
-
public static String generateName(String prefix, Table table, List<Column> columns)
generateName(String, Table, Column...)
.
prefix
- Appended to the beginning of the generated nametable
- columns
-
public static String hashedName(String s)
s
- The name to be hashed.
public Iterator getColumnIterator()
public void addColumn(Column column)
public void addColumns(Iterator columnIterator)
public boolean containsColumn(Column column)
column
-
public int getColumnSpan()
public Column getColumn(int i)
public Iterator columnIterator()
public Table getTable()
public void setTable(Table table)
public boolean isGenerated(Dialect dialect)
public String sqlDropString(Dialect dialect, String defaultCatalog, String defaultSchema)
sqlDropString
in interface RelationalModel
public String sqlCreateString(Dialect dialect, Mapping p, String defaultCatalog, String defaultSchema)
sqlCreateString
in interface RelationalModel
public List getColumns()
public abstract String sqlConstraintString(Dialect d, String constraintName, String defaultCatalog, String defaultSchema)
public String toString()
toString
in class Object
public abstract String generatedConstraintNamePrefix()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |