Package com.exedio.cope
Class Field<E>
java.lang.Object
com.exedio.cope.Feature
com.exedio.cope.Field<E>
- All Implemented Interfaces:
Settable<E>
,Serializable
- Direct Known Subclasses:
DataField
,FunctionField
An
field
represents a persistently
stored field of a Type
.
Subclasses specify the type of information to be stored
in the field.- Author:
- Ralf Wiebicke
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfinal Collection<E>
castCollection
(Collection<?> c) Deprecated.final void
final SetValue<?>[]
abstract E
final String
Deprecated.UseSchemaInfo.getColumnName(Field)
insteadReturns the exceptions possibly thrown, when setting a value for this settable.final Class<?>
Deprecated.final boolean
isFinal()
Returns true, if a value for the settable can be specified on the creation of an item only, thus cannot be modified later.boolean
Returns true, if a value for the field should be specified on the creation of an item.final boolean
mapNull()
optional()
Returns a new Field, that differs from this Field by being optional.abstract void
toFinal()
Returns a new Field, that differs from this Field by being final.Methods inherited from class com.exedio.cope.Feature
afterModelCreated, getAbstractType, getAnnotation, getID, getLocalizationKeys, getName, getPattern, getType, isAnnotationPresent, isSourceAlready, mount, readResolve, requireMounted, toString, toString, writeReplace
-
Method Details
-
toFinal
Returns a new Field, that differs from this Field by being final. If this Field is already final, the the result is equal to this Field.- See Also:
-
optional
Returns a new Field, that differs from this Field by being optional. If this Field is already optional, the the result is equal to this Field.- See Also:
-
isFinal
public final boolean isFinal()Description copied from interface:Settable
Returns true, if a value for the settable can be specified on the creation of an item only, thus cannot be modified later. -
isMandatory
public final boolean isMandatory()- Specified by:
isMandatory
in interfaceSettable<E>
-
getInitialType
- Specified by:
getInitialType
in interfaceSettable<E>
-
isInitial
public boolean isInitial()Returns true, if a value for the field should be specified on the creation of an item. This default implementation returns{@link #isFinal()} || {@link #isMandatory()}
. -
getInitialExceptions
Description copied from interface:Settable
Returns the exceptions possibly thrown, when setting a value for this settable.- Specified by:
getInitialExceptions
in interfaceSettable<E>
-
getValueClass
-
castCollection
Deprecated.UseCast.castElements(Class, Collection)
instead -
mapNull
-
execute
-
check
- Throws:
ConstraintViolationException
- ifvalue
does not satisfy constraints.
-
get
-
set
-
getColumnName
Deprecated.UseSchemaInfo.getColumnName(Field)
instead -
getPatterns
Deprecated.
-
Cast.castElements(Class, Collection)
instead