Package io.micronaut.data.model
Class PersistentPropertyPath
java.lang.Object
io.micronaut.data.model.PersistentPropertyPath
- Direct Known Subclasses:
PersistentAssociationPath
The property path representation.
- Since:
- 2.4.0
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorDescriptionPersistentPropertyPath
(List<Association> associations, @NonNull PersistentProperty property) Default constructor.PersistentPropertyPath
(List<Association> associations, @NonNull PersistentProperty property, @Nullable String path) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionFinds naming strategy for the property.Find the owner of the possible embedded property.@NonNull String[]
@NonNull List<Association>
Get naming strategy for the property.@NonNull String
getPath()
@NonNull PersistentProperty
getPropertyValue
(Object bean) Gets property path value.static PersistentPropertyPath
of
(List<Association> associations, @NonNull PersistentProperty property) CreatesPersistentPropertyPath
orPersistentAssociationPath
.static PersistentPropertyPath
of
(List<Association> associations, @NonNull PersistentProperty property, @Nullable String path) CreatesPersistentPropertyPath
orPersistentAssociationPath
.setPropertyValue
(Object bean, Object value) Sets property path value.
-
Constructor Details
-
PersistentPropertyPath
public PersistentPropertyPath(List<Association> associations, @NonNull @NonNull PersistentProperty property) Default constructor.- Parameters:
associations
- The associationsproperty
- The property
-
PersistentPropertyPath
public PersistentPropertyPath(List<Association> associations, @NonNull @NonNull PersistentProperty property, @Nullable @Nullable String path) Default constructor.- Parameters:
associations
- The associationsproperty
- The propertypath
- The path
-
-
Method Details
-
of
public static PersistentPropertyPath of(List<Association> associations, @NonNull @NonNull PersistentProperty property) CreatesPersistentPropertyPath
orPersistentAssociationPath
.- Parameters:
associations
- The associationsproperty
- The property- Returns:
- new instance of
PersistentPropertyPath
orPersistentAssociationPath
-
of
public static PersistentPropertyPath of(List<Association> associations, @NonNull @NonNull PersistentProperty property, @Nullable @Nullable String path) CreatesPersistentPropertyPath
orPersistentAssociationPath
.- Parameters:
associations
- The associationsproperty
- The propertypath
- The path- Returns:
- new instance of
PersistentPropertyPath
orPersistentAssociationPath
-
setPropertyValue
Sets property path value. (Only possible for runtime properties)- Parameters:
bean
- The root beanvalue
- The value- Returns:
- The root bean - possibly modified
-
getPropertyValue
Gets property path value. (Only possible for runtime properties)- Parameters:
bean
- The root bean- Returns:
- The value
-
getAssociations
- Returns:
- The associations
-
getProperty
- Returns:
- The property
-
getPath
- Returns:
- The path
-
getArrayPath
- Returns:
- The array path
-
findPropertyOwner
Find the owner of the possible embedded property.- Returns:
- the optional owner
-
getNamingStrategy
Get naming strategy for the property.- Returns:
- the naming strategy
-
findNamingStrategy
Finds naming strategy for the property.- Returns:
- the naming strategy
-