Class MetamodelHelper

java.lang.Object
org.apache.openjpa.persistence.jest.MetamodelHelper

public class MetamodelHelper extends Object
Author:
Pinaki Poddar
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Attribute Category makes a finer distinction over PersistentAttributeType declared in Attribute.PersistentAttributeType such as id, version, lob or enum.
    static class 
    Compares attribute by their category and within the same category by name.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final char
     
    static final char
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getAttributeCategory(jakarta.persistence.metamodel.Attribute<?,?> attr)
    Gets a ordinal value of enumerated persistent attribute category.
    static List<jakarta.persistence.metamodel.Attribute<?,?>>
    getAttributesInOrder(jakarta.persistence.metamodel.ManagedType<?> type)
    Gets the attributes of the given type in defined order.
    static List<jakarta.persistence.metamodel.Attribute<?,?>>
    getAttributesInOrder(Class<?> cls, jakarta.persistence.metamodel.Metamodel model)
     
    static List<jakarta.persistence.metamodel.Attribute<?,?>>
    getAttributesInOrder(ClassMetaData meta, jakarta.persistence.metamodel.Metamodel model)
     
    static String
    getAttributeTypeName(jakarta.persistence.metamodel.Attribute<?,?> attr)
    Gets name of the attribute type.
    static String
    getTagByAttributeType(jakarta.persistence.metamodel.Attribute<?,?> attr)
     
    static boolean
    isEnum(jakarta.persistence.metamodel.Attribute<?,?> a)
     
    static boolean
    isId(jakarta.persistence.metamodel.Attribute<?,?> a)
     
    static boolean
    isLob(jakarta.persistence.metamodel.Attribute<?,?> a)
     
    static boolean
    isVersion(jakarta.persistence.metamodel.Attribute<?,?> a)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • MetamodelHelper

      public MetamodelHelper()
  • Method Details

    • getAttributesInOrder

      public static List<jakarta.persistence.metamodel.Attribute<?,?>> getAttributesInOrder(Class<?> cls, jakarta.persistence.metamodel.Metamodel model)
    • getAttributesInOrder

      public static List<jakarta.persistence.metamodel.Attribute<?,?>> getAttributesInOrder(ClassMetaData meta, jakarta.persistence.metamodel.Metamodel model)
    • getAttributesInOrder

      public static List<jakarta.persistence.metamodel.Attribute<?,?>> getAttributesInOrder(jakarta.persistence.metamodel.ManagedType<?> type)
      Gets the attributes of the given type in defined order.
      Parameters:
      type -
    • isId

      public static boolean isId(jakarta.persistence.metamodel.Attribute<?,?> a)
    • isVersion

      public static boolean isVersion(jakarta.persistence.metamodel.Attribute<?,?> a)
    • isEnum

      public static boolean isEnum(jakarta.persistence.metamodel.Attribute<?,?> a)
    • isLob

      public static boolean isLob(jakarta.persistence.metamodel.Attribute<?,?> a)
    • getAttributeCategory

      public static MetamodelHelper.AttributeCategory getAttributeCategory(jakarta.persistence.metamodel.Attribute<?,?> attr)
      Gets a ordinal value of enumerated persistent attribute category.
      Parameters:
      attr -
    • getTagByAttributeType

      public static String getTagByAttributeType(jakarta.persistence.metamodel.Attribute<?,?> attr)
    • getAttributeTypeName

      public static String getAttributeTypeName(jakarta.persistence.metamodel.Attribute<?,?> attr)
      Gets name of the attribute type. For collection and map type attribute, the name is appended with generic type argument names.
      Parameters:
      attr -