Class ModelsHelper

java.lang.Object
org.hibernate.envers.configuration.internal.ModelsHelper

public class ModelsHelper extends Object
Simple helper class to streamline hibernate-models interactions.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.hibernate.models.spi.FieldDetails
    dynamicFieldDetails(PersistentPropertiesSource propertiesSource, String propertyName, org.hibernate.models.spi.SourceModelBuildingContext sourceModelBuildingContext)
    Instantiates a DynamicFieldDetails from the provided properties source with the specified name
    static org.hibernate.models.spi.MemberDetails
    getMember(org.hibernate.models.spi.ClassDetails classDetails, String name)
    Retrieves the member 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 from
      accessType - The access type to use, accepted values are field, property and record
      Returns:
      The list of member details
    • getMember

      public static org.hibernate.models.spi.MemberDetails getMember(org.hibernate.models.spi.ClassDetails classDetails, String name)
      Retrieves the member 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 member
      name - 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 a DynamicFieldDetails from the provided properties source with the specified name
      Parameters:
      propertiesSource - The property source containing the virtual field
      propertyName - The property name of the dynamic field
      sourceModelBuildingContext - Context object for models
      Returns:
      The newly created dynamic field details