Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.3.0)

E17483-04


oracle.jbo.common.sdo
Class SDOHelper

java.lang.Object
  extended by oracle.jbo.common.sdo.SDOHelper


public class SDOHelper
extends java.lang.Object

Field Summary
static SDOHelper INSTANCE
           
static java.lang.String MDS_DOCUMENT_MAP
           
static java.lang.String NAME_SPACE_SEPERATOR
           
static java.lang.String RESOURCE_LOCATION
           
static java.lang.String RESOURCE_NAME
           

 

Method Summary
 java.lang.Object convertToBC4JValue(java.lang.Class targetClass, java.lang.Object sdoValue)
          convert sdo property value ot bc4j value based on the target class type
 java.lang.Object convertToSDOValue(java.lang.Class sdoClassType, java.lang.Object bc4jValue)
           
 java.lang.Object convertToSDOValue(commonj.sdo.Type sdoType, java.lang.Object bc4jValue)
          convert bc4j attribute value to sdo type
 java.util.List defineSchema(java.lang.String resourceLoc, java.lang.String resourceName)
          Defines XML Schema as SDO Types.
 java.util.List defineSchema(java.lang.String localHelperContextId, java.lang.String resourceLoc, java.lang.String resourceName)
          Defines XML Schema as SDO Types with a specified local sdo helper context id.
 commonj.sdo.helper.CopyHelper getCopyHelper()
          get local copyhelper
 commonj.sdo.helper.DataFactory getDataFactory()
          get local DataFactory
 commonj.sdo.DataObject getDataObject(Element xmlelement, Row vrow)
           
protected  java.net.URL getResource(java.lang.String resourcePath)
           
 javax.xml.transform.stream.StreamSource getResourceAsSource(java.lang.String absoluteDocName)
          Finds the resource with the given name.
 org.eclipse.persistence.sdo.helper.SDOHelperContext getSDOHelperContext()
          get local helper context by helperContextId
 org.eclipse.persistence.sdo.helper.SDOHelperContext getSDOHelperContext(java.lang.String helperContextId)
           
 java.lang.String getSDOHelperContextId()
           
 java.lang.String getSDOHelperContextId(java.lang.Class serviceInterface)
           
 java.lang.String getSDOHelperContextId(java.lang.String serviceClassName)
           
 org.eclipse.persistence.sdo.SDOProperty getSDOProperty(commonj.sdo.Property property)
          helper method to enfore toplink's SDOProperty
 org.eclipse.persistence.sdo.SDOType getSDOType(commonj.sdo.Type type)
          helper method to enfore toplink's SDOType
 commonj.sdo.helper.TypeHelper getTypeHelper()
          get local typehelpre
 commonj.sdo.helper.XMLHelper getXMLHelper()
          get local xml helper
 commonj.sdo.helper.XSDHelper getXSDHelper()
          get local XSDHelper
 boolean isComplexDataType(commonj.sdo.Type type)
           
 boolean isDataType(commonj.sdo.Type type)
           
 boolean isMultiTenantEnabled()
           
 boolean isReadOnly(commonj.sdo.Property property)
           
 void printDataObject(java.lang.String indent, commonj.sdo.DataObject dataobject, java.io.PrintWriter writer)
          for testing purpose
 java.util.List redefineSchema(commonj.sdo.helper.HelperContext sdoHelperContext, java.lang.String absoluteDocName)
          Defines XML Schema as SDO Types into the specified SDO helper context.
protected  java.util.List redefineSchema(java.lang.String localHelperContextId, java.lang.String resourceLoc, java.lang.String resourceName)
           
 void removeLocalSDOHelperContextId()
          remove local helperContext id
 java.lang.String setLocalSDOHelperContextId(java.lang.Class serviceClass)
          set local helpercontext id in ADFContext's requestScope

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

INSTANCE

public static SDOHelper INSTANCE

NAME_SPACE_SEPERATOR

public static java.lang.String NAME_SPACE_SEPERATOR

RESOURCE_LOCATION

public static java.lang.String RESOURCE_LOCATION

RESOURCE_NAME

public static java.lang.String RESOURCE_NAME

MDS_DOCUMENT_MAP

public static java.lang.String MDS_DOCUMENT_MAP

Method Detail

isMultiTenantEnabled

public boolean isMultiTenantEnabled()

getSDOHelperContext

public org.eclipse.persistence.sdo.helper.SDOHelperContext getSDOHelperContext()
get local helper context by helperContextId

getSDOHelperContext

public org.eclipse.persistence.sdo.helper.SDOHelperContext getSDOHelperContext(java.lang.String helperContextId)

getSDOHelperContextId

public java.lang.String getSDOHelperContextId()

setLocalSDOHelperContextId

public java.lang.String setLocalSDOHelperContextId(java.lang.Class serviceClass)
set local helpercontext id in ADFContext's requestScope

removeLocalSDOHelperContextId

public void removeLocalSDOHelperContextId()
remove local helperContext id

getXMLHelper

public commonj.sdo.helper.XMLHelper getXMLHelper()
get local xml helper

getXSDHelper

public commonj.sdo.helper.XSDHelper getXSDHelper()
get local XSDHelper

getTypeHelper

public commonj.sdo.helper.TypeHelper getTypeHelper()
get local typehelpre

getDataFactory

public commonj.sdo.helper.DataFactory getDataFactory()
get local DataFactory

getCopyHelper

public commonj.sdo.helper.CopyHelper getCopyHelper()
get local copyhelper

defineSchema

public java.util.List defineSchema(java.lang.String localHelperContextId,
                                   java.lang.String resourceLoc,
                                   java.lang.String resourceName)
                            throws java.io.IOException
Defines XML Schema as SDO Types with a specified local sdo helper context id. The schema file is assumed to be a resource that can be accessed by class code.
Parameters:
localHelperContextId - local SDOHelperContext id
resourceLoc - location of the schema file
resourceName - name of the schema file
Returns:
the defined Types, or null if the resource cannot be found or the invoker does not have adequate privileges to get the resource.
Throws:
java.io.IOException - if an I/O exception occurs

redefineSchema

protected java.util.List redefineSchema(java.lang.String localHelperContextId,
                                        java.lang.String resourceLoc,
                                        java.lang.String resourceName)
                                 throws java.io.IOException
Throws:
java.io.IOException

redefineSchema

public java.util.List redefineSchema(commonj.sdo.helper.HelperContext sdoHelperContext,
                                     java.lang.String absoluteDocName)
                              throws java.io.IOException
Defines XML Schema as SDO Types into the specified SDO helper context. This method tries to load the resource from MDS, and if it is not found then tries to load from classloader.
Parameters:
sdoHelperContext - an SDO helper context
absoluteDocName - absolute path name of the schema file
Returns:
the defined Types, or null if the resource cannot be found or the invoker does not have adequate privileges to get the resource.
Throws:
java.io.IOException - if an I/O exception occurs

defineSchema

public java.util.List defineSchema(java.lang.String resourceLoc,
                                   java.lang.String resourceName)
                            throws java.io.IOException
Defines XML Schema as SDO Types. The schema file is assumed to be a resource that can be accessed by class code.
Parameters:
resourceLoc - location of the schema file
resourceName - name of the schema file
Returns:
the defined Types, or null if the resource cannot be found or the invoker does not have adequate privileges to get the resource.
Throws:
java.io.IOException - if an I/O exception occurs

getResourceAsSource

public javax.xml.transform.stream.StreamSource getResourceAsSource(java.lang.String absoluteDocName)
                                                            throws java.io.IOException
Finds the resource with the given name. If the resource does not exist in any of the configured Metadata Stores, it will search the class path.
Parameters:
absoluteDocName - the resource name (starts with '/')
Returns:
an input stream for reading the specified resource.
Throws:
java.io.IOException - an error occurs finding the resource or opening the stream

getResource

protected java.net.URL getResource(java.lang.String resourcePath)
                            throws java.io.IOException
Throws:
java.io.IOException

convertToSDOValue

public java.lang.Object convertToSDOValue(commonj.sdo.Type sdoType,
                                          java.lang.Object bc4jValue)
convert bc4j attribute value to sdo type
Parameters:
sdoType -
bc4jValue -
Returns:

convertToSDOValue

public java.lang.Object convertToSDOValue(java.lang.Class sdoClassType,
                                          java.lang.Object bc4jValue)

convertToBC4JValue

public java.lang.Object convertToBC4JValue(java.lang.Class targetClass,
                                           java.lang.Object sdoValue)
convert sdo property value ot bc4j value based on the target class type
Parameters:
targetClass -
sdoValue -
Returns:

printDataObject

public void printDataObject(java.lang.String indent,
                            commonj.sdo.DataObject dataobject,
                            java.io.PrintWriter writer)
for testing purpose
Parameters:
indent -
dataobject -

getDataObject

public commonj.sdo.DataObject getDataObject(Element xmlelement,
                                            Row vrow)

getSDOHelperContextId

public java.lang.String getSDOHelperContextId(java.lang.String serviceClassName)

getSDOHelperContextId

public java.lang.String getSDOHelperContextId(java.lang.Class serviceInterface)

getSDOType

public org.eclipse.persistence.sdo.SDOType getSDOType(commonj.sdo.Type type)
helper method to enfore toplink's SDOType

getSDOProperty

public org.eclipse.persistence.sdo.SDOProperty getSDOProperty(commonj.sdo.Property property)
helper method to enfore toplink's SDOProperty

isDataType

public boolean isDataType(commonj.sdo.Type type)

isReadOnly

public boolean isReadOnly(commonj.sdo.Property property)

isComplexDataType

public boolean isComplexDataType(commonj.sdo.Type type)

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.3.0)

E17483-04


Copyright © 1997, 2012, Oracle. All rights reserved.