Module io.github.mmm.entity.bean
Class PrimaryKeyConstraint
- java.lang.Object
-
- io.github.mmm.entity.bean.sql.constraint.Constraint
-
- io.github.mmm.entity.bean.sql.constraint.PrimaryKeyConstraint
-
public final class PrimaryKeyConstraint extends Constraint
Foreign keyConstraint
uniquely identifying a differententity
(row from another table).- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description PrimaryKeyConstraint(io.github.mmm.property.ReadableProperty<?> column)
The constructor.PrimaryKeyConstraint(String name, io.github.mmm.value.PropertyPath<?> column)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getType()
-
Methods inherited from class io.github.mmm.entity.bean.sql.constraint.Constraint
createName, createName, getColumns, getName, toString, toString, toStringColumns
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
Type
"PRIMARY KEY".- See Also:
- Constant Field Values
-
PREFIX
public static final String PREFIX
Suggested prefix for thename
: "PK_".- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PrimaryKeyConstraint
public PrimaryKeyConstraint(String name, io.github.mmm.value.PropertyPath<?> column)
The constructor.
-
PrimaryKeyConstraint
public PrimaryKeyConstraint(io.github.mmm.property.ReadableProperty<?> column)
The constructor.- Parameters:
column
- the (first)column
.
-
-
Method Detail
-
getType
public String getType()
- Specified by:
getType
in classConstraint
- Returns:
- the type of this
Constraint
(e.g. "CHECK" or "FOREIGN KEY").
-
-