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.FieldDetailsdynamicFieldDetails(PersistentPropertiesSource propertiesSource, String propertyName, org.hibernate.models.spi.ModelsContext modelsContext) Instantiates aDynamicFieldDetailsfrom the provided properties source with the specified namestatic org.hibernate.models.spi.MemberDetailsRetrieves thememberof the class, being either the field or the getter, with the provided name if one exists,nullotherwise.static List<? extends org.hibernate.models.spi.MemberDetails> getMemberDetails(org.hibernate.models.spi.ClassDetails classDetails, String accessType) Provides a list of the provided class'MemberDetailsbased 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'MemberDetailsbased on the provided access type.- Parameters:
classDetails- The class details to extract the members fromaccessType- The access type to use, accepted values arefield,propertyandrecord- Returns:
- The list of member details
-
getMember
public static org.hibernate.models.spi.MemberDetails getMember(org.hibernate.models.spi.ClassDetails classDetails, String name) Retrieves thememberof the class, being either the field or the getter, with the provided name if one exists,nullotherwise.- 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.ModelsContext modelsContext) Instantiates aDynamicFieldDetailsfrom the provided properties source with the specified name- Parameters:
propertiesSource- The property source containing the virtual fieldpropertyName- The property name of the dynamic fieldmodelsContext- Context object for models- Returns:
- The newly created dynamic field details
-