Package com.exedio.cope.pattern
Class Serializer<E>
java.lang.Object
com.exedio.cope.Feature
com.exedio.cope.Pattern
com.exedio.cope.pattern.Serializer<E>
- All Implemented Interfaces:
Settable<E>,Serializable
Stores a java object by serialization - use with care!
Stores serializable objects into a backing
DataField.
BEWARE:
Generally this is not a good idea.
In contrast to normal fields, such as
StringField, DateField,
etc. there is no searching, order by or caching.
The main purpose is to maintain database compatibility
to legacy systems.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> Serializer<E>static <E> Serializer<E>SetValue<?>[]Returns the exceptions possibly thrown, when setting a value for this settable.Class<?>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 settable should be specified on the creation of an item.booleanstatic <E> Serializer<E>newSerializer(Class<E> valueClass) Deprecated.static <E> Serializer<E>newSerializer(Class<E> valueClass, DataField source) Deprecated.Usecreate(Class,DataField)insteadoptional()voidMethods 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, registerSourceMethods inherited from class com.exedio.cope.Feature
afterModelCreated, getAbstractType, getAnnotation, getID, getLocalizationKeys, getName, getPattern, isAnnotationPresent, isSourceAlready, mount, readResolve, requireMounted, toString, toString, writeReplace
-
Method Details
-
create
-
create
-
optional
-
getSource
-
isInitial
public boolean isInitial()Description copied from interface:SettableReturns true, if a value for the settable should be specified on the creation of an item. -
isFinal
public 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 boolean isMandatory()- Specified by:
isMandatoryin interfaceSettable<E>
-
getInitialType
- Specified by:
getInitialTypein interfaceSettable<E>
-
getInitialExceptions
Description copied from interface:SettableReturns the exceptions possibly thrown, when setting a value for this settable.- Specified by:
getInitialExceptionsin interfaceSettable<E>
-
get
-
set
-
execute
-
newSerializer
Deprecated.Usecreate(Class,DataField)instead -
newSerializer
Deprecated.Usecreate(Class)instead
-
create(Class)instead