Package com.exedio.cope.reflect
Class TypeField<E extends Item>
- java.lang.Object
-
- com.exedio.cope.Feature
-
- com.exedio.cope.Pattern
-
- com.exedio.cope.reflect.TypeField<E>
-
- All Implemented Interfaces:
Settable<Type<? extends E>>
,Serializable
public final class TypeField<E extends Item> extends Pattern implements Settable<Type<? extends E>>
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TypeField.NotFound
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TypeField<Item>
create()
static <E extends Item>
TypeField<E>create(Class<E> valueClass)
SetValue<?>[]
execute(Type<? extends E> value, Item exceptionItem)
Type<? extends E>
get(Item item)
String
getId(Item item)
StringField
getIdField()
UniqueConstraint
getImplicitUniqueConstraint()
Set<Class<? extends Throwable>>
getInitialExceptions()
Returns the exceptions possibly thrown, when setting a value for this settable.Type
getInitialType()
Class<E>
getValueClass()
List<Type<? extends E>>
getValues()
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
isInitial()
Returns true, if a value for the settable should be specified on the creation of an item.Condition
isInvalid()
boolean
isMandatory()
TypeField<E>
optional()
<P extends Item>
PsearchUnique(Class<P> typeClass, Type<? extends E> value)
Finds an item by it's unique fields.void
set(Item item, Type<? extends E> value)
TypeField<E>
toFinal()
TypeField<E>
unique()
-
Methods inherited from class com.exedio.cope.Pattern
addSource, addSource, addSource, addSource, addSourceFeature, addSourceFeature, addSourceFeature, annotationField, equals, getGeneratedTypes, getSourceFeatures, getSourceFeaturesGather, getSourceFields, getSources, getSourceTypes, getType, hashCode, initialize, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newType, newType, onMount, registerSource
-
Methods inherited from class com.exedio.cope.Feature
afterModelCreated, getAbstractType, getAnnotation, getID, getLocalizationKeys, getName, getPattern, isAnnotationPresent, isSourceAlready, mount, readResolve, requireMounted, toString, toString, writeReplace
-
-
-
-
Method Detail
-
getIdField
public StringField getIdField()
-
isInitial
public boolean isInitial()
Description copied from interface:Settable
Returns true, if a value for the settable should be specified on the creation of an item.
-
isFinal
public 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 boolean isMandatory()
- Specified by:
isMandatory
in interfaceSettable<E extends Item>
-
getInitialType
public Type getInitialType()
- Specified by:
getInitialType
in interfaceSettable<E extends Item>
-
getInitialExceptions
public Set<Class<? extends Throwable>> getInitialExceptions()
Description copied from interface:Settable
Returns the exceptions possibly thrown, when setting a value for this settable.- Specified by:
getInitialExceptions
in interfaceSettable<E extends Item>
-
getImplicitUniqueConstraint
public UniqueConstraint getImplicitUniqueConstraint()
-
isInvalid
public Condition isInvalid()
-
-