Module io.github.mmm.entity.bean
Class CheckConstraint
- java.lang.Object
-
- io.github.mmm.entity.bean.sql.constraint.Constraint
-
- io.github.mmm.entity.bean.sql.constraint.CheckConstraint
-
public final class CheckConstraint extends Constraint
Foreign keyConstraint
uniquely identifying a differententity
(row from another table).- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description CheckConstraint(io.github.mmm.property.criteria.CriteriaPredicate predicate)
The constructor.CheckConstraint(String name, io.github.mmm.property.criteria.CriteriaPredicate predicate)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.github.mmm.property.criteria.CriteriaPredicate
getPredicate()
String
getType()
protected void
toStringColumns(StringBuilder sb)
-
Methods inherited from class io.github.mmm.entity.bean.sql.constraint.Constraint
createName, createName, getColumns, getName, toString, toString
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
Type
"CHECK".- See Also:
- Constant Field Values
-
PREFIX
public static final String PREFIX
Suggested prefix for thename
: "CK_".- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CheckConstraint
public CheckConstraint(String name, io.github.mmm.property.criteria.CriteriaPredicate predicate)
The constructor.
-
CheckConstraint
public CheckConstraint(io.github.mmm.property.criteria.CriteriaPredicate predicate)
The constructor.- Parameters:
predicate
- thepredicate
to check.
-
-
Method Detail
-
getPredicate
public io.github.mmm.property.criteria.CriteriaPredicate getPredicate()
- Returns:
- the
CriteriaPredicate
to check.
-
getType
public String getType()
- Specified by:
getType
in classConstraint
- Returns:
- the type of this
Constraint
(e.g. "CHECK" or "FOREIGN KEY").
-
toStringColumns
protected void toStringColumns(StringBuilder sb)
- Overrides:
toStringColumns
in classConstraint
- Parameters:
sb
- theStringBuilder
to append to.
-
-