Class MetamodelHelper
java.lang.Object
org.apache.openjpa.persistence.jest.MetamodelHelper
- Author:
- Pinaki Poddar
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Attribute Category makes a finer distinction over PersistentAttributeType declared inAttribute.PersistentAttributeType
such as id, version, lob or enum.static class
Compares attribute by their category and within the same category by name. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAttributeCategory
(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)
-
Field Details
-
DASH
public static final char DASH- See Also:
-
UNDERSCORE
public static final char UNDERSCORE- See Also:
-
-
Constructor Details
-
MetamodelHelper
public MetamodelHelper()
-
-
Method Details
-
getAttributesInOrder
-
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
-
getAttributeTypeName
Gets name of the attribute type. For collection and map type attribute, the name is appended with generic type argument names.- Parameters:
attr
-
-