Class TargetResolver
java.lang.Object
ch.tocco.nice2.persist.core.api.util.TargetResolver
- All Implemented Interfaces:
Path.Resolver
- Direct Known Subclasses:
PathUriResolver
-
Constructor Summary
ConstructorsConstructorDescriptionTargetResolver(Entity entity) TargetResolver(Entity entity, boolean allowNullResult) -
Method Summary
Modifier and TypeMethodDescriptionvoidfield(Path path, EntityModel entityModel, FieldModel element) The resolved entity ornullif no distinct entity could be resolved.The resolved entity list ornullif no entity could be resolved.getField()protected voidCalled each time a new entity is resolved.voidrelation(Path path, EntityModel entityModel, RelationModel element) protected EntityList
-
Constructor Details
-
TargetResolver
-
TargetResolver
-
-
Method Details
-
relation
public void relation(Path path, EntityModel entityModel, RelationModel element) throws PersistException - Specified by:
relationin interfacePath.Resolver- Throws:
PersistException
-
field
- Specified by:
fieldin interfacePath.Resolver- Throws:
PersistException
-
onEntityResolve
protected void onEntityResolve()Called each time a new entity is resolved. Get the current one withgetEntity() -
getEntity
The resolved entity ornullif no distinct entity could be resolved.- Returns:
- the resolved
Entity
-
getRelation
-
getField
-
getEntityList
The resolved entity list ornullif no entity could be resolved.- Returns:
- the resolved
EntityList
-
resolve
- Throws:
PersistException
-