Class EntityTemplateTasks.LoadRelationsTask

java.lang.Object
ch.tocco.nice2.persist.entity.spi.template.EntityTemplateTasks.LoadRelationsTask
All Implemented Interfaces:
OptionalTask<Multimap<String,String>,Multimap<RelationModel,Entity>>, PersistTask<Multimap<String,String>,Multimap<RelationModel,Entity>>
Enclosing class:
EntityTemplateTasks

public static class EntityTemplateTasks.LoadRelationsTask extends Object implements OptionalTask<Multimap<String,String>,Multimap<RelationModel,Entity>>
A task that loads previously saved relation values for a template back into the template entity. The relation data is given as a multimap from a relation model name (like `relUser_status`) to a set of primary keys that denote the concrete entities that are the targets for this relation. The result is the same multimap structure, but the keys have been replaced by its corresponding RelationModel and the values by their corresponding Entitys. If there is no entity of given key, it is assumed to be removed and this case is silently ignored (no exception).