Class ModelsHelper
java.lang.Object
org.hibernate.envers.configuration.internal.ModelsHelper
Simple helper class to streamline hibernate-models interactions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.hibernate.models.spi.FieldDetails
dynamicFieldDetails
(PersistentPropertiesSource propertiesSource, String propertyName, org.hibernate.models.spi.SourceModelBuildingContext sourceModelBuildingContext) Instantiates aDynamicFieldDetails
from the provided properties source with the specified namestatic org.hibernate.models.spi.MemberDetails
Retrieves themember
of the class, being either the field or the getter, with the provided name if one exists,null
otherwise.static List<? extends org.hibernate.models.spi.MemberDetails>
getMemberDetails
(org.hibernate.models.spi.ClassDetails classDetails, String accessType) Provides a list of the provided class'MemberDetails
based on the provided access type.
-
Constructor Details
-
ModelsHelper
public ModelsHelper()
-
-
Method Details
-
getMemberDetails
public static List<? extends org.hibernate.models.spi.MemberDetails> getMemberDetails(org.hibernate.models.spi.ClassDetails classDetails, String accessType) Provides a list of the provided class'MemberDetails
based on the provided access type.- Parameters:
classDetails
- The class details to extract the members fromaccessType
- The access type to use, accepted values arefield
,property
andrecord
- Returns:
- The list of member details
-
getMember
public static org.hibernate.models.spi.MemberDetails getMember(org.hibernate.models.spi.ClassDetails classDetails, String name) Retrieves themember
of the class, being either the field or the getter, with the provided name if one exists,null
otherwise.- Parameters:
classDetails
- The class details containing the desired membername
- The name of the member to find- Returns:
- The requested member, null if not found
-
dynamicFieldDetails
public static org.hibernate.models.spi.FieldDetails dynamicFieldDetails(PersistentPropertiesSource propertiesSource, String propertyName, org.hibernate.models.spi.SourceModelBuildingContext sourceModelBuildingContext) Instantiates aDynamicFieldDetails
from the provided properties source with the specified name- Parameters:
propertiesSource
- The property source containing the virtual fieldpropertyName
- The property name of the dynamic fieldsourceModelBuildingContext
- Context object for models- Returns:
- The newly created dynamic field details
-