public class CompositeObjectMap<E extends DataObject<E> & UniqueidentifiedInterface<E>,F extends DataObject<F> & UniqueidentifiedInterface<F>>
extends java.lang.Object
Constructor and Description |
---|
CompositeObjectMap(java.util.function.Function<F,DataObjectId<E>> parentidextractor,
java.util.function.Function<F,java.lang.String>... classifier) |
Modifier and Type | Method and Description |
---|---|
void |
classifyObject(F object) |
void |
classifyObjects(F[] objects) |
java.util.List<F> |
getObjectsForRootParentId(DataObjectId<E> parentid)
gets all the objects for the given parent data object id
|
java.util.List<F> |
getObjectsForValue(DataObjectId<E> parentid,
java.lang.String[] classifier) |
@SafeVarargs public CompositeObjectMap(java.util.function.Function<F,DataObjectId<E>> parentidextractor, java.util.function.Function<F,java.lang.String>... classifier)
parentidextractor
- a function that gets the parent id from the object (expected to require no call to persistence layer)classifier
- a function to extract the value for each of the classifiers (expected to require no call to persistence layer)public void classifyObjects(F[] objects)
objects
- the list of objects to classify. It is expected to be non null, though some of the
classifier values may be null.public void classifyObject(F object)
object
- the object to classify. It is expected to be non null, though some of the
classifier values may be null.public java.util.List<F> getObjectsForRootParentId(DataObjectId<E> parentid)
parentid
- id of the parent objectpublic java.util.List<F> getObjectsForValue(DataObjectId<E> parentid, java.lang.String[] classifier)
parentid
- parent id. This may be nullclassifier:
- it should have the number of values of the map, some values may be null