|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.types.TypeManager
public class TypeManager
Registry of java type support. Provides information applicable to all datastores for how a field of a class is treated; whether it is by default persistent, whether it is by default embedded, whether it is in the DFG, and if it has a wrapper for SCO operations. Also stores whether the type can be converted to/from a String (for datastores that don't provide storage natively). Uses the plugin mechanism extension-point "org.datanucleus.java_type". TODO Consider adding "api" as an attribute to the "java_type" extension-point so that we can have some a type definition for JDO, and also for JPA.
| Field Summary | |
|---|---|
protected ClassLoaderResolver |
clr
|
| Constructor Summary | |
|---|---|
TypeManager(ApiAdapter api,
PluginManager mgr,
ClassLoaderResolver clr)
Constructor, loading support for type mappings using the plugin mechanism. |
|
| Method Summary | |
|---|---|
protected void |
addJavaType(org.datanucleus.store.types.TypeManager.JavaType type,
java.lang.String javaVersion,
boolean versionRestricted)
|
java.lang.String[] |
filterOutSupportedSecondClassNames(java.lang.String[] inputClassNames)
Convenience method to filter out any supported classes from a list. |
protected org.datanucleus.store.types.TypeManager.JavaType |
findJavaTypeForClass(java.lang.Class cls)
Convenience method to return the JavaType for the specified class. |
ObjectLongConverter |
getLongConverter(java.lang.Class type)
Method to return a long converter for the specified type. |
ObjectStringConverter |
getStringConverter(java.lang.Class type)
Method to return a string converter for the specified type. |
java.util.Set<java.lang.String> |
getSupportedSecondClassTypes()
Accessor for the supported second-class Types. |
java.lang.Class |
getTypeForSecondClassWrapper(java.lang.String className)
Accessor for a java type that the supplied class is a SCO wrapper for. |
java.lang.Class |
getWrappedTypeBackedForType(java.lang.String className)
Accessor for the backing-store Second Class Wrapper class for the supplied class. |
java.lang.Class |
getWrapperTypeForType(java.lang.String className)
Accessor for the SCO wrapper for the type |
boolean |
isDefaultEmbeddedType(java.lang.Class c)
Accessor for whether the type is by default embedded. |
boolean |
isDefaultFetchGroup(java.lang.Class c)
Accessor for whether the type is by default in the DFG. |
boolean |
isDefaultPersistent(java.lang.Class c)
Accessor for whether the type is by default persistent. |
boolean |
isSecondClassMutableType(java.lang.String className)
Accessor for whether the type is SCO mutable. |
boolean |
isSecondClassWrapper(java.lang.String className)
Accessor for whether the type is a SCO wrapper itself. |
boolean |
isSupportedSecondClassType(java.lang.String className)
Accessor for whether a class is supported as being second class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final ClassLoaderResolver clr
| Constructor Detail |
|---|
public TypeManager(ApiAdapter api,
PluginManager mgr,
ClassLoaderResolver clr)
api - The API in use // NEVER USED currentlyclr - the ClassLoader Resolvermgr - the PluginManager| Method Detail |
|---|
public java.util.Set<java.lang.String> getSupportedSecondClassTypes()
public boolean isSupportedSecondClassType(java.lang.String className)
className - The class name
public java.lang.String[] filterOutSupportedSecondClassNames(java.lang.String[] inputClassNames)
inputClassNames - Names of the classes
public boolean isDefaultPersistent(java.lang.Class c)
c - The type
public boolean isDefaultFetchGroup(java.lang.Class c)
c - The type
public boolean isDefaultEmbeddedType(java.lang.Class c)
c - The type
public boolean isSecondClassMutableType(java.lang.String className)
className - The type
public java.lang.Class getWrapperTypeForType(java.lang.String className)
className - The type
public java.lang.Class getWrappedTypeBackedForType(java.lang.String className)
className - The class name
public boolean isSecondClassWrapper(java.lang.String className)
className - The type
public java.lang.Class getTypeForSecondClassWrapper(java.lang.String className)
className - Name of the class
public ObjectStringConverter getStringConverter(java.lang.Class type)
type - The type
public ObjectLongConverter getLongConverter(java.lang.Class type)
type - The type
protected org.datanucleus.store.types.TypeManager.JavaType findJavaTypeForClass(java.lang.Class cls)
cls - The class required
protected void addJavaType(org.datanucleus.store.types.TypeManager.JavaType type,
java.lang.String javaVersion,
boolean versionRestricted)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||