Package com.exedio.cope.pattern
Class CompositeField<E extends Composite>
- java.lang.Object
-
- com.exedio.cope.Feature
-
- com.exedio.cope.Pattern
-
- com.exedio.cope.pattern.CompositeField<E>
-
- All Implemented Interfaces:
TemplatedField<E>
,Settable<E>
,Serializable
public final class CompositeField<E extends Composite> extends Pattern implements Settable<E>, TemplatedField<E>
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <E extends Composite>
CompositeField<E>create(Class<E> valueClass)
SetValue[]
execute(E value, Item exceptionItem)
E
get(Item item)
<X extends FunctionField<?>>
XgetComponent(X template)
Deprecated.Useof(FunctionField)
insteadList<? extends FunctionField<?>>
getComponents()
Set<Class<? extends Throwable>>
getInitialExceptions()
Returns the exceptions possibly thrown, when setting a value for this settable.Class<?>
getInitialType()
<X extends FunctionField<?>>
XgetTemplate(X component)
Returns the template the given component was created for.List<? extends FunctionField<?>>
getTemplates()
CheckConstraint
getUnison()
Class<E>
getValueClass()
CompositeType<E>
getValueType()
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.boolean
isMandatory()
IsNullCondition<?>
isNotNull()
Condition
isNotNull(Join join)
IsNullCondition<?>
isNull()
Condition
isNull(Join join)
static <E extends Composite>
CompositeField<E>newComposite(Class<E> valueClass)
Deprecated.Usecreate(Class)
insteadE
newValue(SetValue<?>... setValues)
<X extends FunctionField<?>>
Xof(X template)
Returns the component created for the given template within this CompositeField.CompositeField<E>
optional()
void
set(Item item, E value)
CompositeField<E>
toFinal()
-
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
-
create
public static <E extends Composite> CompositeField<E> create(Class<E> valueClass)
-
toFinal
public CompositeField<E> toFinal()
-
optional
public CompositeField<E> optional()
-
of
public <X extends FunctionField<?>> X of(X template)
Returns the component created for the given template within this CompositeField. The reverse operation isgetTemplate(FunctionField)
.
-
getTemplate
public <X extends FunctionField<?>> X getTemplate(X component)
Returns the template the given component was created for. The reverse operation isof(FunctionField)
.
-
of
public <X extends Feature> X of(X template)
- Specified by:
of
in interfaceTemplatedField<E extends Composite>
-
getTemplate
public <X extends Feature> X getTemplate(X component)
- Specified by:
getTemplate
in interfaceTemplatedField<E extends Composite>
-
getTemplates
public List<? extends FunctionField<?>> getTemplates()
-
getComponents
public List<? extends FunctionField<?>> getComponents()
- Specified by:
getComponents
in interfaceTemplatedField<E extends Composite>
-
getUnison
public CheckConstraint getUnison()
-
get
public E get(@Nonnull Item item)
- Specified by:
get
in interfaceTemplatedField<E extends Composite>
-
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 Composite>
-
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.
-
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.
-
isMandatory
public boolean isMandatory()
- Specified by:
isMandatory
in interfaceSettable<E extends Composite>
-
getInitialType
public Class<?> getInitialType()
- Specified by:
getInitialType
in interfaceSettable<E extends Composite>
-
getValueType
public CompositeType<E> getValueType()
- Specified by:
getValueType
in interfaceTemplatedField<E extends Composite>
-
getValueClass
public Class<E> getValueClass()
- Specified by:
getValueClass
in interfaceTemplatedField<E extends Composite>
-
isNull
public IsNullCondition<?> isNull()
-
isNotNull
public IsNullCondition<?> isNotNull()
-
getComponent
@Deprecated public <X extends FunctionField<?>> X getComponent(X template)
Deprecated.Useof(FunctionField)
instead
-
newComposite
@Deprecated public static <E extends Composite> CompositeField<E> newComposite(Class<E> valueClass)
Deprecated.Usecreate(Class)
instead
-
-