|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.metadata.MetaDataUtils
public class MetaDataUtils
Utilities needed for the processing of MetaData.
| Field Summary | |
|---|---|
protected static Localiser |
LOCALISER
|
| Constructor Summary | |
|---|---|
protected |
MetaDataUtils()
Protected constructor to prevent outside instantiation |
| Method Summary | |
|---|---|
boolean |
arrayStorableAsByteArrayInSingleColumn(AbstractMemberMetaData fmd)
Convenience method to determine if an array is storable in a single column as a byte array. |
static boolean |
getBooleanForString(java.lang.String str,
boolean dflt)
Convenience method to return a boolean from the String value. |
static java.lang.String |
getClassNameFromDiscriminatorValue(java.lang.String discrimValue,
DiscriminatorMetaData dismd,
ExecutionContext ec)
Convenience method that takes a result set that contains a discriminator column and returns the class name that it represents. |
java.lang.String[] |
getImplementationNamesForReferenceField(AbstractMemberMetaData fmd,
int fieldRole,
ClassLoaderResolver clr,
MetaDataManager mmgr)
Convenience method to return the class names of the available implementation types for an interface/Object field, given its required role. |
static MetaDataUtils |
getInstance()
Gets an instance of MetaDataUtils |
static java.lang.String |
getValueForExtensionRecursively(MetaData metadata,
java.lang.String key)
Searches the meta data tree upwards starting with the given leaf, stops as soon as it finds an extension with the given key. |
java.lang.String[] |
getValuesForCommaSeparatedAttribute(java.lang.String attr)
Convenience method that splits a comma-separated list of values into a String array (removing whitespace). |
static java.lang.String[] |
getValuesForExtensionRecursively(MetaData metadata,
java.lang.String key)
Searches the meta data tree upwards starting with the given leaf, stops as soon as it finds an extension with the given key. |
static boolean |
isJdbcTypeNumeric(java.lang.String jdbcType)
Convenience method to return if a jdbc-type is numeric. |
static boolean |
isJdbcTypeString(java.lang.String jdbcType)
Convenience method to return if a jdbc-type is character based. |
boolean |
storesFCO(AbstractMemberMetaData fmd,
ExecutionContext ec)
Convenience method that returns if a field stores a First-Class object (FCO). |
boolean |
storesPersistable(AbstractMemberMetaData fmd,
ExecutionContext ec)
Convenience method that returns if a field stores a persistable object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Localiser LOCALISER
| Constructor Detail |
|---|
protected MetaDataUtils()
| Method Detail |
|---|
public static MetaDataUtils getInstance()
public boolean arrayStorableAsByteArrayInSingleColumn(AbstractMemberMetaData fmd)
fmd - The field
public boolean storesPersistable(AbstractMemberMetaData fmd,
ExecutionContext ec)
fmd - MetaData for the fieldec - ObjectManager
public boolean storesFCO(AbstractMemberMetaData fmd,
ExecutionContext ec)
fmd - MetaData for the fieldec - ExecutionContext
public java.lang.String[] getValuesForCommaSeparatedAttribute(java.lang.String attr)
attr - The attribute value
public java.lang.String[] getImplementationNamesForReferenceField(AbstractMemberMetaData fmd,
int fieldRole,
ClassLoaderResolver clr,
MetaDataManager mmgr)
fmd - MetaData for the fieldfieldRole - The role of the fieldclr - the ClassLoaderResolvermmgr - MetaData manager
NucleusUserException - if no implementation types are found for the reference type field
public static boolean getBooleanForString(java.lang.String str,
boolean dflt)
str - The string (should be "true", "false")dflt - The default
public static java.lang.String getClassNameFromDiscriminatorValue(java.lang.String discrimValue,
DiscriminatorMetaData dismd,
ExecutionContext ec)
discrimValue - Discriminator valuedismd - Metadata for the discriminator at the root (defining the strategy)ec - ExecutionContext
public static java.lang.String getValueForExtensionRecursively(MetaData metadata,
java.lang.String key)
metadata - Leaf of the meta data tree, where the search should startkey - The key of the extension
public static java.lang.String[] getValuesForExtensionRecursively(MetaData metadata,
java.lang.String key)
metadata - Leaf of the meta data tree, where the search should startkey - The key of the extension
public static boolean isJdbcTypeNumeric(java.lang.String jdbcType)
jdbcType - The type string
public static boolean isJdbcTypeString(java.lang.String jdbcType)
jdbcType - The type string
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||