Package com.exedio.cope
Class CopyConstraint
java.lang.Object
com.exedio.cope.Feature
com.exedio.cope.CopyConstraint
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
check()
getCopy()
Deprecated.Use eithergetCopyField()
orgetCopyFunction()
instead.Returns the copy of this copy constraint, if it is not achoice constraint
.Function<?>
Returns the copy of this copy constraint.ItemField<?>
boolean
isChoice()
Returns whether this copy constraint is a choice constraint.Methods inherited from class com.exedio.cope.Feature
afterModelCreated, getAbstractType, getAnnotation, getID, getLocalizationKeys, getName, getPattern, getType, isAnnotationPresent, isSourceAlready, mount, readResolve, requireMounted, toString, toString, writeReplace
-
Constructor Details
-
CopyConstraint
Deprecated.Usecopy.{@link FunctionField#copyFrom(ItemField) copyFrom}(target)
ortarget.{@link ItemField#copyTo(FunctionField) copyTo}(copy)
instead.
-
-
Method Details
-
getTarget
-
isChoice
public boolean isChoice()Returns whether this copy constraint is a choice constraint. A choice constraint is a special copy constraint. It constrainstarget
values to items, that do point back to the source oftarget
. Such constraints are created byItemField.choice(String)
. -
getCopy
Deprecated.Use eithergetCopyField()
orgetCopyFunction()
instead. Choose carefully! BEWARE:getCopyField()
may throw IllegalArgumentException -
getCopyField
Returns the copy of this copy constraint, if it is not achoice constraint
.- Throws:
IllegalArgumentException
- if this is achoice constraint
- See Also:
-
getCopyFunction
Returns the copy of this copy constraint. It is either aFunctionField
or (forchoice constraints
) aThis
.- See Also:
-
getTemplate
-
check
public int check()
-
copy.{@link FunctionField#copyFrom(ItemField) copyFrom}(target)
ortarget.{@link ItemField#copyTo(FunctionField) copyTo}(copy)
instead.