Package org.apache.openjpa.jdbc.schema
Class Unique
java.lang.Object
org.apache.openjpa.jdbc.schema.Constraint
org.apache.openjpa.jdbc.schema.LocalConstraint
org.apache.openjpa.jdbc.schema.Unique
- All Implemented Interfaces:
Serializable
Represents a unique constraint. It can also represent a partial constraint.
- Author:
- Abe White, Pinaki Poddar
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidderef()booleanequalsUnique(Unique unq) Return true if the structure of this primary key matches that of the given one (same table, same columns).intbooleanReturn whether this constraint is a logical constraint only; i.e.voidref()voidsetIdentifier(DBIdentifier name) voidDeprecated.Methods inherited from class org.apache.openjpa.jdbc.schema.LocalConstraint
addColumn, columnsMatch, containsColumn, derefColumns, equalsLocalConstraint, getColumns, refColumns, removeColumn, setColumnsMethods inherited from class org.apache.openjpa.jdbc.schema.Constraint
equals, getColumnIdentifier, getColumnName, getFullIdentifier, getFullName, getIdentifier, getName, getQualifiedPath, getSchemaIdentifier, getSchemaName, getTable, getTableIdentifier, getTableName, hashCode, isDeferred, setColumnIdentifier, setColumnName, setDeferred, setSchemaIdentifier, setSchemaName, setTableIdentifier, setTableName, toString
-
Constructor Details
-
Unique
public Unique() -
Unique
Deprecated.Construct with given name.- Parameters:
name- the name of the constraint, if anytable- the table of the constraint
-
Unique
-
-
Method Details
-
isLogical
public boolean isLogical()Description copied from class:ConstraintReturn whether this constraint is a logical constraint only; i.e. if it does not exist in the database.- Specified by:
isLogicalin classConstraint
-
setName
Deprecated.Set the name of the constraint. This method cannot be called if the constraint already belongs to a table.- Overrides:
setNamein classConstraint
-
setIdentifier
- Overrides:
setIdentifierin classConstraint
-
equalsUnique
Return true if the structure of this primary key matches that of the given one (same table, same columns). -
getRefCount
public int getRefCount() -
ref
public void ref() -
deref
public void deref()
-