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
ConstructorsConstructorDescriptionFieldResolveResult(Path path, EntityModel entityModel, @Nullable Entity entity, String fieldName) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanGet the entity to read the field value from.Optional<TypedValue<?>> getValue()inthashCode()resolve(Path.PathElement pathElement, PathResolverContext pathResolverContext) longsize()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:
checkWritablein classResolveResult
-
resolve
- Specified by:
resolvein classResolveResult
-
size
public long size()- Specified by:
sizein classResolveResult
-
equals
- Overrides:
equalsin classResolveResult
-
hashCode
public int hashCode()- Overrides:
hashCodein classResolveResult
-
toString
-