Class FieldResolveResult
java.lang.Object
ch.tocco.nice2.rest.entity.impl.beans.factories.path.ResolveResult
ch.tocco.nice2.rest.entity.impl.beans.factories.path.FieldResolveResult
This resolve results represents a single entity field.
Get the target entity via
getEntity()
and the name of the field via getFieldName()
-
Field Summary
Fields inherited from class ch.tocco.nice2.rest.entity.impl.beans.factories.path.ResolveResult
path
-
Constructor Summary
ConstructorDescriptionFieldResolveResult
(Path path, EntityModel entityModel, @Nullable Entity entity, String fieldName) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
Get the entity to read the field value from.Optional
<TypedValue<?>> getValue()
int
hashCode()
resolve
(Path.PathElement pathElement, PathResolverContext pathResolverContext) long
size()
toString()
Methods inherited from class ch.tocco.nice2.rest.entity.impl.beans.factories.path.ResolveResult
appendPathElement, getPath
-
Constructor Details
-
FieldResolveResult
public FieldResolveResult(Path path, EntityModel entityModel, @Nullable @Nullable Entity entity, String fieldName)
-
-
Method Details
-
getEntityModel
-
getEntity
Get the entity to read the field value from.- Returns:
- the entity or
Optional.empty()
if it could not be found (because it doesn't exist or because of missing read rights).
-
getFieldName
- Returns:
- the name of the field.
-
getValue
- Returns:
- the field value or
Optional.empty()
, if the entity could not be found.
-
checkWritable
public boolean checkWritable()- Specified by:
checkWritable
in classResolveResult
-
resolve
- Specified by:
resolve
in classResolveResult
-
size
public long size()- Specified by:
size
in classResolveResult
-
equals
- Overrides:
equals
in classResolveResult
-
hashCode
public int hashCode()- Overrides:
hashCode
in classResolveResult
-
toString
-