E - the type of entities being referencedpublic class MongoRefList<E extends MongoEntity> extends BaseEntityRefList<E,MongoRefList<E>>
entities being referenced by id.deleteHandler, type| Constructor and Description |
|---|
MongoRefList(Class<E> type,
BaseEntityRef.OnDelete deleteHandler)
Creates a new list for the given type and delete handler.
|
| Modifier and Type | Method and Description |
|---|---|
protected Optional<E> |
resolve(String id,
ContextInfo... context)
Resolves a given ID into an entity instance.
|
add, contains, copyValue, fetchAll, fetchAllAvailable, getDeleteHandler, getType, remove, valueNeedsCopypublic MongoRefList(Class<E> type, BaseEntityRef.OnDelete deleteHandler)
type - the type of entities to store in the listdeleteHandler - the behaviour when one of the stored entities is deleted. Note that
BaseEntityRef.OnDelete.SET_NULL will remove the id from the
list instead of inserting a null.protected Optional<E> resolve(String id, ContextInfo... context)
BaseEntityRefListresolve in class BaseEntityRefList<E extends MongoEntity,MongoRefList<E extends MongoEntity>>id - the id to resolvecontext - the context used for resolving (routing etc.)Copyright © 2018. All rights reserved.