Class TargetResolver
java.lang.Object
ch.tocco.nice2.persist.core.api.util.TargetResolver
- All Implemented Interfaces:
Path.Resolver
- Direct Known Subclasses:
PathUriResolver
-
Constructor Summary
ConstructorDescriptionTargetResolver
(Entity entity) TargetResolver
(Entity entity, boolean allowNullResult) -
Method Summary
Modifier and TypeMethodDescriptionvoid
field
(Path path, EntityModel entityModel, FieldModel element) The resolved entity ornull
if no distinct entity could be resolved.The resolved entity list ornull
if no entity could be resolved.getField()
protected void
Called each time a new entity is resolved.void
relation
(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:
relation
in interfacePath.Resolver
- Throws:
PersistException
-
field
- Specified by:
field
in 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 ornull
if no distinct entity could be resolved.- Returns:
- the resolved
Entity
-
getRelation
-
getField
-
getEntityList
The resolved entity list ornull
if no entity could be resolved.- Returns:
- the resolved
EntityList
-
resolve
- Throws:
PersistException
-