@Immutable public class PrimaryKey extends Object implements TypeConstraint
Reference
s.Constructor and Description |
---|
PrimaryKey()
Creates a constraint saying that a type does not have a primary key.
|
PrimaryKey(List<ChildDefinition<?>> primaryKeyPath)
Creates a constraint specifying the path to the primary key.
|
Modifier and Type | Method and Description |
---|---|
List<ChildDefinition<?>> |
getPrimaryKeyPath()
Returns the path to the primary key.
|
boolean |
hasPrimaryKey()
Returns true, if and only if a primary key is set.
|
boolean |
isInheritable()
Determines if the constraint is inheritable, meaning it may be used for a
sub-type.
|
public PrimaryKey()
public PrimaryKey(List<ChildDefinition<?>> primaryKeyPath)
primaryKeyPath
- the path to the primary keypublic boolean hasPrimaryKey()
public List<ChildDefinition<?>> getPrimaryKeyPath()
null
if and
only if hasPrimaryKey()
returns false.null
public boolean isInheritable()
TypeConstraint
isInheritable
in interface TypeConstraint
TypeConstraint.isInheritable()
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a