M - the type of the inner DataMapper@ParametersAreNonnullByDefault public abstract class AbstractDataMapperChain<M extends DataMapper> extends AbstractDataMapper
DataMapper that delegates method calls to a DataMapper chain.| Constructor and Description |
|---|
AbstractDataMapperChain() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAllReferences(ManyFeatureBean feature,
List<Id> collection)
Adds all the
collection to the specified feature from the position of the feature. |
<V> void |
addAllValues(ManyFeatureBean feature,
List<? extends V> collection)
Adds all the
collection to the specified feature from the position of the feature. |
void |
addReference(ManyFeatureBean feature,
Id reference)
Adds the
reference to the specified feature at a defined position. |
<V> void |
addValue(ManyFeatureBean feature,
V value)
Adds the
value to the specified feature at a defined position. |
Stream<Id> |
allInstancesOf(ClassBean metaClass,
boolean strict)
Retrieves all instances of the given
metaClass. |
Stream<Id> |
allInstancesOf(Set<ClassBean> metaClasses)
Retrieves all instances of the given
metaClasses. |
Stream<Id> |
allReferencesOf(SingleFeatureBean feature)
Retrieves all references of the specified
feature. |
<V> Stream<V> |
allValuesOf(SingleFeatureBean feature)
Retrieves all values of the specified
feature. |
int |
appendAllReferences(SingleFeatureBean feature,
List<Id> collection)
Adds all the
collection to the specified feature from the last position. |
<V> int |
appendAllValues(SingleFeatureBean feature,
List<? extends V> collection)
Adds all the
collection to the specified feature from the last position. |
int |
appendReference(SingleFeatureBean feature,
Id reference)
Adds the
reference to the specified feature at the last position. |
<V> int |
appendValue(SingleFeatureBean feature,
V value)
Adds the
value to the specified feature at the last position. |
void |
close()
Cleanly closes this manager, clear all data in-memory and releases any system resources associated with it.
|
void |
containerFor(Id id,
SingleFeatureBean container)
Stores the
container for the specified id. |
Optional<SingleFeatureBean> |
containerOf(Id id)
Retrieves the container for the specified
id. |
void |
copyTo(DataMapper target) |
boolean |
metaClassFor(Id id,
ClassBean metaClass)
Stores the
metaClass for the specified id. |
Optional<ClassBean> |
metaClassOf(Id id)
Retrieves the meta-class for the specified
id. |
protected M |
next()
Returns the next mapper to notify.
|
protected void |
next(M next)
Defines the next mapper to notify.
|
Optional<Id> |
referenceFor(ManyFeatureBean feature,
Id reference)
Defines the
reference of the specified feature at a defined position. |
Optional<Id> |
referenceFor(SingleFeatureBean feature,
Id reference)
Defines the reference of the specified
feature. |
Optional<Id> |
referenceOf(ManyFeatureBean feature)
Retrieves the reference of the specified
feature at a defined position. |
Optional<Id> |
referenceOf(SingleFeatureBean feature)
Retrieves the reference of the specified
feature. |
void |
removeAllReferences(SingleFeatureBean feature)
Removes all references of the specified
feature. |
void |
removeAllValues(SingleFeatureBean feature)
Removes all values of the specified
feature. |
void |
removeContainer(Id id)
Removes the container of the specified
id. |
Optional<Id> |
removeReference(ManyFeatureBean feature)
Removes the reference of the specified
feature at a defined position. |
void |
removeReference(SingleFeatureBean feature)
Removes the reference of the specified
feature. |
<V> Optional<V> |
removeValue(ManyFeatureBean feature)
Removes the value of the specified
feature at a defined position. |
void |
removeValue(SingleFeatureBean feature)
Removes the value of the specified
feature. |
void |
save()
Saves all changes made on this manager since the last call.
|
Optional<Integer> |
sizeOfReference(SingleFeatureBean feature)
Returns the number of reference of the specified
feature. |
Optional<Integer> |
sizeOfValue(SingleFeatureBean feature)
Returns the number of value of the specified
feature. |
<V> Optional<V> |
valueFor(ManyFeatureBean feature,
V value)
Defines the
value of the specified feature at a defined position. |
<V> Optional<V> |
valueFor(SingleFeatureBean feature,
V value)
Defines the
value of the specified feature. |
<V> Optional<V> |
valueOf(ManyFeatureBean feature)
Retrieves the value of the specified
feature at a defined position. |
<V> Optional<V> |
valueOf(SingleFeatureBean feature)
Retrieves the value of the specified
feature. |
protected void next(M next)
next - the next mapper@OverridingMethodsMustInvokeSuper public void close()
SaveableCleanly closes this manager, clear all data in-memory and releases any system resources associated with it. All modifications are saved before closing.
If the manager is already closed, then invoking this method has no effect.
@OverridingMethodsMustInvokeSuper public void save()
Saveable@OverridingMethodsMustInvokeSuper public void copyTo(DataMapper target)
@Nonnull @OverridingMethodsMustInvokeSuper public Optional<SingleFeatureBean> containerOf(Id id)
ContainerMapperid.id - the Id of the contained elementOptional containing the container, or Optional.empty() if the id has no
defined container.@OverridingMethodsMustInvokeSuper public void containerFor(Id id, SingleFeatureBean container)
ContainerMappercontainer for the specified id.id - the Id of the contained elementcontainer - the containing element's container information to store@OverridingMethodsMustInvokeSuper public void removeContainer(Id id)
ContainerMapperid.
The container must be completely removed, so that a call to ContainerMapper.containerOf(Id) returns Optional.empty().
id - the Id of the contained element@Nonnull @OverridingMethodsMustInvokeSuper public Optional<ClassBean> metaClassOf(Id id)
ClassMapperid.id - the Id of the elementOptional containing the meta-class, or Optional.empty() if the id has no
defined meta-class.@OverridingMethodsMustInvokeSuper public boolean metaClassFor(Id id, ClassBean metaClass)
ClassMappermetaClass for the specified id.id - the Id of the elementmetaClass - the containing element's meta-class information to storetrue if the meta-class has been defined, false if the id already has a meta-class@Nonnull @OverridingMethodsMustInvokeSuper public Stream<Id> allInstancesOf(ClassBean metaClass, boolean strict)
ClassMappermetaClass.metaClass - the meta-class to compute the instances ofstrict - true if the lookup searches for strict instancesStream containing the instances of the metaClass@Nonnull @OverridingMethodsMustInvokeSuper public Stream<Id> allInstancesOf(Set<ClassBean> metaClasses)
ClassMappermetaClasses.metaClasses - the meta-classes to compute the instances ofStream containing the instances of the metaClasses@Nonnull @OverridingMethodsMustInvokeSuper public <V> Optional<V> valueOf(SingleFeatureBean feature)
ValueMapperfeature.V - the type of valuefeature - the bean identifying the valueOptional containing the value, or Optional.empty() if the feature hasn't any value or
doesn't exist@Nonnull @OverridingMethodsMustInvokeSuper public <V> Optional<V> valueFor(SingleFeatureBean feature, V value)
ValueMappervalue of the specified feature.V - the type of valuefeature - the bean identifying the valuevalue - the value to setOptional containing the previous value of the feature, or Optional.empty() if
the feature has no value before@OverridingMethodsMustInvokeSuper public void removeValue(SingleFeatureBean feature)
ValueMapperfeature.feature - the bean identifying the value@Nonnull @OverridingMethodsMustInvokeSuper public Optional<Id> referenceOf(SingleFeatureBean feature)
ReferenceMapperfeature.feature - the bean identifying the referenceOptional containing the reference, or Optional.empty() if the feature hasn't any
reference or doesn't exist@Nonnull @OverridingMethodsMustInvokeSuper public Optional<Id> referenceFor(SingleFeatureBean feature, Id reference)
ReferenceMapperfeature.feature - the bean identifying the referencereference - the reference to setOptional containing the previous reference of the feature, or Optional.empty()
if the feature has no reference before@OverridingMethodsMustInvokeSuper public void removeReference(SingleFeatureBean feature)
ReferenceMapperfeature.feature - the bean identifying the reference@Nonnull @OverridingMethodsMustInvokeSuper public <V> Optional<V> valueOf(ManyFeatureBean feature)
ManyValueMapperfeature at a defined position.feature - the bean identifying the multi-valued attributeOptional containing the value, or Optional.empty() if the feature hasn't any value or
doesn't exist@Nonnull @OverridingMethodsMustInvokeSuper public <V> Stream<V> allValuesOf(SingleFeatureBean feature)
ManyValueMapperfeature.feature - the bean identifying the multi-valued attributeStream over all values@Nonnull @OverridingMethodsMustInvokeSuper public <V> Optional<V> valueFor(ManyFeatureBean feature, V value)
ManyValueMappervalue of the specified feature at a defined position.V - the type of valuefeature - the bean identifying the multi-valued attributevalue - the value to setOptional containing the previous value of the feature, or Optional.empty() if
the feature has no value beforeManyValueMapper.addValue(ManyFeatureBean, Object),
ManyValueMapper.appendValue(SingleFeatureBean, Object)@OverridingMethodsMustInvokeSuper public <V> void addValue(ManyFeatureBean feature, V value)
ManyValueMappervalue to the specified feature at a defined position.V - the type of valuefeature - the bean identifying the multi-valued attributevalue - the value to add@OverridingMethodsMustInvokeSuper public <V> void addAllValues(ManyFeatureBean feature, List<? extends V> collection)
ManyValueMappercollection to the specified feature from the position of the feature.V - the type of valuefeature - the bean identifying the multi-valued attributecollection - the values to add@Nonnegative @OverridingMethodsMustInvokeSuper public <V> int appendValue(SingleFeatureBean feature, V value)
ManyValueMappervalue to the specified feature at the last position.V - the type of valuefeature - the bean identifying the multi-valued attributevalue - the value to addManyValueMapper.addValue(ManyFeatureBean, Object)@Nonnegative @OverridingMethodsMustInvokeSuper public <V> int appendAllValues(SingleFeatureBean feature, List<? extends V> collection)
ManyValueMappercollection to the specified feature from the last position.V - the type of valuesfeature - the bean identifying the multi-valued attributecollection - the values to addManyValueMapper.addValue(ManyFeatureBean, Object),
ManyValueMapper.appendValue(SingleFeatureBean, Object)@Nonnull @OverridingMethodsMustInvokeSuper public <V> Optional<V> removeValue(ManyFeatureBean feature)
ManyValueMapperfeature at a defined position.V - the type of valuefeature - the bean identifying the multi-valued attributeOptional containing the removed value, or Optional.empty() if the feature has no value
before@OverridingMethodsMustInvokeSuper public void removeAllValues(SingleFeatureBean feature)
ManyValueMapperfeature.feature - the bean identifying the multi-valued attribute@Nonnull @Nonnegative @OverridingMethodsMustInvokeSuper public Optional<Integer> sizeOfValue(SingleFeatureBean feature)
ManyValueMapperfeature.feature - the bean identifying the multi-valued attributeOptional containing the number of value of the feature, or Optional.empty() if
the feature hasn't any value, or if size == 0.@Nonnull @OverridingMethodsMustInvokeSuper public Optional<Id> referenceOf(ManyFeatureBean feature)
ManyReferenceMapperfeature at a defined position.feature - the bean identifying the multi-valued referenceOptional containing the reference, or Optional.empty() if the feature hasn't any
reference or doesn't exist@Nonnull @OverridingMethodsMustInvokeSuper public Stream<Id> allReferencesOf(SingleFeatureBean feature)
ManyReferenceMapperfeature.feature - the bean identifying the multi-valued referenceStream over all references@Nonnull @OverridingMethodsMustInvokeSuper public Optional<Id> referenceFor(ManyFeatureBean feature, Id reference)
ManyReferenceMapperreference of the specified feature at a defined position.feature - the bean identifying the multi-valued referencereference - the reference to setOptional containing the previous reference of the feature, or Optional.empty()
if the feature has no reference beforeManyReferenceMapper.addReference(ManyFeatureBean, Id),
ManyReferenceMapper.appendReference(SingleFeatureBean, Id)@OverridingMethodsMustInvokeSuper public void addReference(ManyFeatureBean feature, Id reference)
ManyReferenceMapperreference to the specified feature at a defined position.feature - the bean identifying the multi-valued referencereference - the reference to addpublic void addAllReferences(ManyFeatureBean feature, List<Id> collection)
ManyReferenceMappercollection to the specified feature from the position of the feature.feature - the bean identifying the multi-valued attributecollection - the values to add@Nonnegative @OverridingMethodsMustInvokeSuper public int appendReference(SingleFeatureBean feature, Id reference)
ManyReferenceMapperreference to the specified feature at the last position.feature - the bean identifying the multi-valued referencereference - the reference to addManyReferenceMapper.addReference(ManyFeatureBean, Id)@Nonnegative @OverridingMethodsMustInvokeSuper public int appendAllReferences(SingleFeatureBean feature, List<Id> collection)
ManyReferenceMappercollection to the specified feature from the last position.feature - the bean identifying the multi-valued referencecollection - the references to addManyReferenceMapper.addReference(ManyFeatureBean, Id),
ManyReferenceMapper.appendReference(SingleFeatureBean, Id)@Nonnull @OverridingMethodsMustInvokeSuper public Optional<Id> removeReference(ManyFeatureBean feature)
ManyReferenceMapperfeature at a defined position.feature - the bean identifying the multi-valued referenceOptional containing the removed reference, or Optional.empty() if the feature has no
reference before@OverridingMethodsMustInvokeSuper public void removeAllReferences(SingleFeatureBean feature)
ManyReferenceMapperfeature.feature - the bean identifying the multi-valued reference@Nonnull @Nonnegative @OverridingMethodsMustInvokeSuper public Optional<Integer> sizeOfReference(SingleFeatureBean feature)
ManyReferenceMapperfeature.feature - the bean identifying the multi-valued referenceOptional containing the number of reference of the feature, or Optional.empty() if the feature hasn't any referenceCopyright © 2013–2019 Atlanmod. All rights reserved.