Module org.eclipse.persistence.sdo
Class SDOTypeHelperDelegate
java.lang.Object
org.eclipse.persistence.sdo.helper.delegates.SDOTypeHelperDelegate
- All Implemented Interfaces:
TypeHelper,SDOTypeHelper
Purpose: Helper to provide access to declared SDO Types.
Responsibilities:
- Look up a Type given the uri and typeName or interfaceClass.
- SDO Types are available through the getType("commonj.sdo", typeName) method.
- Defines Types from DataObjects.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface commonj.sdo.helper.TypeHelper
INSTANCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddNamespace(String prefix, String uri) INTERNAL: Add the given namespace uri and prefix to the global namespace resolver.voidINTERNAL:voidaddWrappersToProject(org.eclipse.persistence.sessions.Project project) define(DataObject dataObject) Define the DataObject as a Type.define(DataObject dataObject, List types) Define the DataObject as a Type.Define the list of DataObjects as Types.defineOpenContentProperty(String uri, DataObject propertyDO) Define the DataObject as a Property for setting open content.INTERNAL: Return the current helperContext associated with this delegate.Class<?>INTERNAL:org.eclipse.persistence.oxm.NamespaceResolverINTERNAL: Return the NamespaceResolverINTERNAL: Return the Map of Open Content PropertiesgetOpenContentProperty(String uri, String propertyName) Get the open Property with the specified uri and name, or null if not found.INTERNAL: Return the prefix for the given uri, or generate a new one if necessarygetSDOTypeFromXSDType(QName aName) A function to access the values stored in sdoToXSDTypes HashMapReturn the Type for this interfaceClass or null if not found.Return the Type specified by typeName with the given uri, or null if not found.getTypeForImplClass(Class<?> implClass) getTypeForSimpleJavaType(Class<?> implClass) INTERNAL: Used to determine which SDO Type corresponds the given Java simple typeINTERNAL:INTERNAL: Return the map of Wrapper objects (SDOWrapperTypes that wrap a primitive document).getXSDTypeFromSDOType(Type aType) A function to access the values stored in xsdToSDOType HashMapvoidvoidreset()INTERNAL:voidsetHelperContext(HelperContext helperContext) INTERNAL: Set the current helperContext to be associated with this delegatevoidsetTypesHashMap(Map typesHashMap) INTERNAL:voidsetWrappersHashMap(Map aMap) INTERNAL: Set the map of Wrapper objects (SDOWrapperTypes that wrap a primitive document).
-
Constructor Details
-
SDOTypeHelperDelegate
-
-
Method Details
-
initWrapperTypes
public void initWrapperTypes() -
addWrappersToProject
public void addWrappersToProject(org.eclipse.persistence.sessions.Project project) - Specified by:
addWrappersToProjectin interfaceSDOTypeHelper
-
getJavaWrapperTypeForSDOType
Description copied from interface:SDOTypeHelperINTERNAL:- Specified by:
getJavaWrapperTypeForSDOTypein interfaceSDOTypeHelper- Returns:
-
getType
Return the Type specified by typeName with the given uri, or null if not found.- Specified by:
getTypein interfaceTypeHelper- Parameters:
uri- The uri of the Type - type.getURI();typeName- The name of the Type - type.getName();- Returns:
- the Type specified by typeName with the given uri, or null if not found.
-
addType
Description copied from interface:SDOTypeHelperINTERNAL:- Specified by:
addTypein interfaceSDOTypeHelper
-
getType
Return the Type for this interfaceClass or null if not found.- Specified by:
getTypein interfaceTypeHelper- Parameters:
interfaceClass- is the interface for the DataObject's Type - type.getInstanceClass();- Returns:
- the Type for this interfaceClass or null if not found.
-
getTypeForImplClass
- Specified by:
getTypeForImplClassin interfaceSDOTypeHelper
-
getTypeForSimpleJavaType
INTERNAL: Used to determine which SDO Type corresponds the given Java simple type- Specified by:
getTypeForSimpleJavaTypein interfaceSDOTypeHelper- Returns:
-
define
Description copied from interface:TypeHelperDefine the DataObject as a Type. The Type is available throughTypeHelper.getType(java.lang.String, java.lang.String)methods. If a type with the same name already exists, it is returned and no new definition takes place. If theuriproperty of the type to be defined is set to"", then the resulting type will have no uri, same as if theuriproperty was set tonull.- Specified by:
definein interfaceTypeHelper- Parameters:
dataObject- the DataObject representing the Type.- Returns:
- the defined Type.
-
define
Define the DataObject as a Type. The Type is available through TypeHelper and DataGraph getType() methods.- Parameters:
dataObject- the DataObject representing the Type.- Returns:
- the defined Type.
- Throws:
IllegalArgumentException- if the Type could not be defined.
-
define
Define the list of DataObjects as Types. The Types are available through TypeHelper and DataGraph getType() methods.- Specified by:
definein interfaceTypeHelper- Parameters:
types- a List of DataObjects representing the Types.- Returns:
- the defined Types.
- Throws:
IllegalArgumentException- if the Types could not be defined.
-
getXSDTypeFromSDOType
A function to access the values stored in xsdToSDOType HashMap- Specified by:
getXSDTypeFromSDOTypein interfaceSDOTypeHelper- Parameters:
aType- a SDO Type Object- Returns:
- the corresponding XSD QName Object
-
getSDOTypeFromXSDType
A function to access the values stored in sdoToXSDTypes HashMap- Specified by:
getSDOTypeFromXSDTypein interfaceSDOTypeHelper- Parameters:
aName-- Returns:
-
setTypesHashMap
Description copied from interface:SDOTypeHelperINTERNAL:- Specified by:
setTypesHashMapin interfaceSDOTypeHelper
-
getTypesHashMap
Description copied from interface:SDOTypeHelperINTERNAL:- Specified by:
getTypesHashMapin interfaceSDOTypeHelper- Returns:
-
getWrappersHashMap
INTERNAL: Return the map of Wrapper objects (SDOWrapperTypes that wrap a primitive document).- Specified by:
getWrappersHashMapin interfaceSDOTypeHelper- Returns:
- a HashMap of SDOWrapperTypes, keyed on the XSD type that it wraps.
-
setWrappersHashMap
INTERNAL: Set the map of Wrapper objects (SDOWrapperTypes that wrap a primitive document).- Specified by:
setWrappersHashMapin interfaceSDOTypeHelper- Parameters:
aMap- a HashMap of SDOWrapperTypes, keyed on the XSD type that it wraps.
-
reset
public void reset()Description copied from interface:SDOTypeHelperINTERNAL:- Specified by:
resetin interfaceSDOTypeHelper
-
defineOpenContentProperty
Define the DataObject as a Property for setting open content. The new property or, if already defined, an existing property is returned. The containing Type of the open property is not specified by SDO. If the specified uri is not null the defined property is accessible through TypeHelper.getOpenProperty(uri, propertyName). If a null uri is specified, the location and management of the open property is not specified by SDO.- Specified by:
defineOpenContentPropertyin interfaceTypeHelper- Parameters:
uri- the namespace URI of the open Property or null.- Returns:
- the defined open Property.
- Throws:
IllegalArgumentException- if the Property could not be defined.
-
getOpenContentProperty
Get the open Property with the specified uri and name, or null if not found.- Specified by:
getOpenContentPropertyin interfaceTypeHelper- Parameters:
uri- the namespace URI of the open Property.propertyName- the name of the open Property.- Returns:
- the open Property.
-
getHelperContext
INTERNAL: Return the current helperContext associated with this delegate.- Specified by:
getHelperContextin interfaceSDOTypeHelper- Returns:
-
setHelperContext
INTERNAL: Set the current helperContext to be associated with this delegate- Specified by:
setHelperContextin interfaceSDOTypeHelper
-
getPrefix
INTERNAL: Return the prefix for the given uri, or generate a new one if necessary- Specified by:
getPrefixin interfaceSDOTypeHelper
-
addNamespace
INTERNAL: Add the given namespace uri and prefix to the global namespace resolver.- Specified by:
addNamespacein interfaceSDOTypeHelper
-
getNamespaceResolver
public org.eclipse.persistence.oxm.NamespaceResolver getNamespaceResolver()INTERNAL: Return the NamespaceResolver- Specified by:
getNamespaceResolverin interfaceSDOTypeHelper
-
getOpenContentProperties
INTERNAL: Return the Map of Open Content Properties- Specified by:
getOpenContentPropertiesin interfaceSDOTypeHelper
-
getInterfacesToSDOTypeHashMap
- Specified by:
getInterfacesToSDOTypeHashMapin interfaceSDOTypeHelper
-
getImplClassesToSDOType
- Specified by:
getImplClassesToSDOTypein interfaceSDOTypeHelper
-
getAnonymousTypes
- Specified by:
getAnonymousTypesin interfaceSDOTypeHelper
-