public class MetamodelHelper extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MetamodelHelper.AttributeComparator
Compares attribute by their qualification.
|
static class |
MetamodelHelper.EntityComparator
Compares EntityType by their dependency of derived targets.
|
Modifier and Type | Field and Description |
---|---|
static int |
ATTR_BASIC |
static int |
ATTR_ID |
static int |
ATTR_PLURAL_RELATION |
static int |
ATTR_SINGULAR_RELATION |
static int |
ATTR_VERSION |
static Color |
DARK_GREEN |
static Color |
KHAKI |
static Color |
MIDNIGHT_BLUE |
Constructor and Description |
---|
MetamodelHelper() |
Modifier and Type | Method and Description |
---|---|
static <T> javax.persistence.metamodel.EntityType<?> |
derivedTarget(javax.persistence.metamodel.EntityType<T> type)
Finds the derived target of the given type, if any.
|
static <T> List<javax.persistence.metamodel.Attribute<? super T,?>> |
getAttributes(javax.persistence.metamodel.EntityType<T> type) |
static int |
getAttributeType(javax.persistence.metamodel.Attribute<?,?> a) |
static Integer |
getAttributeTypeCode(javax.persistence.metamodel.Attribute<?,?> attr) |
static Color |
getColor(javax.persistence.metamodel.Attribute.PersistentAttributeType type) |
static Color |
getColor(javax.persistence.metamodel.Attribute<?,?> attr) |
static String |
getDisplayName(javax.persistence.metamodel.Attribute<?,?> attr) |
static String |
getDisplayName(Class<?> cls) |
static String |
getDisplayName(javax.persistence.metamodel.EntityType<?> type)
Gets the displayed name of a given entity type.
|
static String |
getDisplayName(javax.persistence.metamodel.Type<?> type) |
static <T> Set<javax.persistence.metamodel.SingularAttribute<? super T,?>> |
getIdAttributes(javax.persistence.metamodel.EntityType<T> type) |
static javax.persistence.metamodel.EntityType<?> |
getParentType(javax.persistence.metamodel.SingularAttribute<?,?> id) |
static Object |
getValue(javax.persistence.metamodel.Attribute<?,?> attr,
Object instance)
Gets the value of the given persistent attribute for the given instance.
|
static boolean |
isId(javax.persistence.metamodel.Attribute<?,?> a) |
static boolean |
isVersion(javax.persistence.metamodel.Attribute<?,?> a) |
public static final int ATTR_ID
public static final int ATTR_VERSION
public static final int ATTR_BASIC
public static final int ATTR_SINGULAR_RELATION
public static final int ATTR_PLURAL_RELATION
public static final Color MIDNIGHT_BLUE
public static final Color DARK_GREEN
public static final Color KHAKI
public static String getDisplayName(javax.persistence.metamodel.Type<?> type)
public static String getDisplayName(javax.persistence.metamodel.EntityType<?> type)
public static String getDisplayName(javax.persistence.metamodel.Attribute<?,?> attr)
public static <T> List<javax.persistence.metamodel.Attribute<? super T,?>> getAttributes(javax.persistence.metamodel.EntityType<T> type)
public static int getAttributeType(javax.persistence.metamodel.Attribute<?,?> a)
public static <T> Set<javax.persistence.metamodel.SingularAttribute<? super T,?>> getIdAttributes(javax.persistence.metamodel.EntityType<T> type)
public static <T> javax.persistence.metamodel.EntityType<?> derivedTarget(javax.persistence.metamodel.EntityType<T> type)
public static javax.persistence.metamodel.EntityType<?> getParentType(javax.persistence.metamodel.SingularAttribute<?,?> id)
public static boolean isId(javax.persistence.metamodel.Attribute<?,?> a)
public static boolean isVersion(javax.persistence.metamodel.Attribute<?,?> a)
public static Color getColor(javax.persistence.metamodel.Attribute<?,?> attr)
public static Color getColor(javax.persistence.metamodel.Attribute.PersistentAttributeType type)
public static Integer getAttributeTypeCode(javax.persistence.metamodel.Attribute<?,?> attr)
Copyright © 2006–2018 Apache Software Foundation. All rights reserved.