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 voidfinal SetValue<?>[]abstract Efinal StringDeprecated.UseSchemaInfo.getColumnName(Field)insteadReturns the exceptions possibly thrown, when setting a value for this settable.final Class<?>Deprecated.final booleanisFinal()Returns true, if a value for the settable can be specified on the creation of an item only, thus cannot be modified later.booleanReturns true, if a value for the field should be specified on the creation of an item.final booleanmapNull()optional()Returns a new Field, that differs from this Field by being optional.abstract voidtoFinal()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:SettableReturns 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:
isMandatoryin interfaceSettable<E>
-
getInitialType
- Specified by:
getInitialTypein 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:SettableReturns the exceptions possibly thrown, when setting a value for this settable.- Specified by:
getInitialExceptionsin interfaceSettable<E>
-
getValueClass
-
castCollection
Deprecated.UseCast.castElements(Class, Collection)instead -
mapNull
-
execute
-
check
- Throws:
ConstraintViolationException- ifvaluedoes not satisfy constraints.
-
get
-
set
-
getColumnName
Deprecated.UseSchemaInfo.getColumnName(Field)instead -
getPatterns
Deprecated.
-
Cast.castElements(Class, Collection)instead