oracle.owb.foundation.reflection
Class ClassDefinitionManager

java.lang.Object
  |
  +--oracle.owb.foundation.reflection.ClassDefinitionManager

public class ClassDefinitionManager
extends java.lang.Object

ClassDefinitionManager is a factory class that can be used to obtain ClassDefinition objects, from the class names.


Field Summary
static java.lang.String ADVANCED_QUEUE
          Constant for ADVANCED_QUEUE.
protected  int apiSet
          apiSet is the elementId for the set of public API definitions.
static java.lang.String BUSINESS_AREA
          Constant for BUSINESS_AREA.
static java.lang.String CONNECTOR
          Constant for CONNECTOR.
static java.lang.String CUBE
          Constant for CUBE.
static java.lang.String DATA_FILE
          Constant for DATA_FILE.
static java.lang.String DIMENSION
          Constant for DIMENSION.
static java.lang.String EXTERNAL_TABLE
          Constant for EXTERNAL_TABLE.
static java.lang.String FLATFILE
          Constant for FLATFILE.
static java.lang.String FLATFILE_MODULE
          Constant for FLATFILE_MODULE.
static java.lang.String FUNCTION
          Constant for FUNCTION.
static java.lang.String INTELLIGENCE_MODULE
          Constant for INTELLIGENCE_MODULE.
static java.lang.String IO_FUNCTION
          Constant for IO_FUNCTION.
static java.lang.String LEVEL
          Constant for LEVEL.
static java.lang.String LOCATION
          Constant for LOCATION.
static java.lang.String MAP
          Constant for MAP.
static java.lang.String MAP_OPERATOR
          Constant for MAP_OPERATOR.
static java.lang.String MATERIALIZED_VIEW
          Constant for MATERIALIZED_VIEW.
static java.lang.String OBJECT_TYPE
          Constant for OBJECT_TYPE.
static java.lang.String PACKAGE
          Constant for PACKAGE.
static java.lang.String PLSQL_RECORD_TYPE
          Constant for PLSQL_RECORD_TYPE.
static java.lang.String PLSQL_TABLE_TYPE
          Constant for PLSQL_TABLE_TYPE.
static java.lang.String PROCEDURE
          Constant for PROCEDURE.
static java.lang.String QUERY_OBJECT
          Constant for QUERY_OBJECT.
static java.lang.String RECORD
          Constant for RECORD.
static java.lang.String REF_CURSOR_TYPE
          Constant for REF_CURSOR_TYPE.
static java.lang.String REPORT
          Constant for REPORT.
static java.lang.String REPORT_GROUP
          Constant for REPORT_GROUP.
static java.lang.String REPORT_MODULE
          Constant for REPORT_MODULE.
static java.lang.String RUNTIME_REPOSITORY_CONNECTION
          Constant for RUNTIME_REPOSITORY_CONNECTION.
static java.lang.String SEQUENCE
          Constant for SEQUENCE.
protected static oracle.wh.repos.impl.metaModel.ModelDefinitionServiceImpl service
          service is the handle to the model definition service.
static java.lang.String TABLE
          Constant for TABLE.
static java.lang.String TABLE_FUNCTION
          Constant for TABLE_FUNCTION.
static java.lang.String VIEW
          Constant for VIEW.
 
Method Summary
 oracle.owb.foundation.reflection.ComponentImpl constructComponent(oracle.wh.repos.sdk.WBContext ctx)
          Construct Component with context of private CMP elements.
protected  java.lang.Object constructObject(java.lang.reflect.Constructor con, java.lang.Object par)
          Construct object with the constructor which takes one parameter.
 oracle.owb.foundation.OWBNamedObjectImpl constructOWBNamedObject(oracle.wh.repos.sdk.WBElement elem)
          Construct OWBNamedObject from private CMP object.
 ClassDefinition[] getAllClassDefinitions()
          Return all public class definitions in the system.
 Type[] getAllTypeDefinitions()
          Return all types in the system.
 ClassDefinition getClassDefinition(oracle.wh.repos.sdk.metaModel.ClassDefinition privCdef)
          Get public class definition from private class definition.
 ClassDefinition getClassDefinition(OWBNamedObject elem)
          Get public class definition from public API object.
 ClassDefinition getClassDefinition(java.lang.String name)
          Get the class definition with the name of the public API class name.
 ClassDefinition getClassDefinition(java.lang.String[] classes)
          pass in the path of private class names from root to current node.
 ClassDefinition getClassDefinition(oracle.wh.repos.sdk.WBContext ctx)
          Get class definition from context of private CMP object.
 ClassDefinition getClassDefinition(oracle.wh.repos.sdk.WBElement elem)
          Get class definition with private CMP elements.
 ClassDefinition getClassDefinitionByScriptName(java.lang.String name)
          Get class definition with scripting name.
 ClassDefinition getClassDefinitionByScriptName(java.lang.String[] scriptNames)
          Get class definition with an array of scripting names.
protected  ClassDefinition getConcreteClassDefinition(oracle.owb.foundation.reflection.DefinitionInterestUsageImpl parent, oracle.wh.repos.sdk.metaModel.ClassDefinition pcdef)
          Get class definition under the context of the parent and the private class definition.
protected  ClassDefinition getConcreteClassDefinition(oracle.wh.repos.sdk.WBContext ctx)
          Get class definition with the context of private CMP object.
protected  ClassDefinition getConcreteClassDefinition(oracle.wh.repos.sdk.WBElement elem)
          Get class definition with private CMP elements.
 java.lang.String getConcretePrivateClassName(java.lang.String name)
          Get concrete private class name from public class name.
 ClassDefinition[] getFolderContentTypes(Folder folder)
          Get the possible aggregate children types in this folder.
static ClassDefinitionManager getInstance()
          Return the singleton handle.
 oracle.wh.repos.sdk.metaModel.ClassDefinition getPrivateClassDefinition(java.lang.String name)
          Get private class definition object with name.
 java.lang.String getPrivateClassName(java.lang.String name)
          Get private class name from public class name.
protected  void init()
          Initialize when connect to repository.
static void release()
          Release memory and handles when disconnect to the repository.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLE

public static final java.lang.String TABLE
Constant for TABLE.

VIEW

public static final java.lang.String VIEW
Constant for VIEW.

SEQUENCE

public static final java.lang.String SEQUENCE
Constant for SEQUENCE.

MATERIALIZED_VIEW

public static final java.lang.String MATERIALIZED_VIEW
Constant for MATERIALIZED_VIEW.

EXTERNAL_TABLE

public static final java.lang.String EXTERNAL_TABLE
Constant for EXTERNAL_TABLE.

DATA_FILE

public static final java.lang.String DATA_FILE
Constant for DATA_FILE.

DIMENSION

public static final java.lang.String DIMENSION
Constant for DIMENSION.

LEVEL

public static final java.lang.String LEVEL
Constant for LEVEL.

CUBE

public static final java.lang.String CUBE
Constant for CUBE.

FLATFILE_MODULE

public static final java.lang.String FLATFILE_MODULE
Constant for FLATFILE_MODULE.

FLATFILE

public static final java.lang.String FLATFILE
Constant for FLATFILE.

RECORD

public static final java.lang.String RECORD
Constant for RECORD.

MAP_OPERATOR

public static final java.lang.String MAP_OPERATOR
Constant for MAP_OPERATOR.

MAP

public static final java.lang.String MAP
Constant for MAP.

PACKAGE

public static final java.lang.String PACKAGE
Constant for PACKAGE.

FUNCTION

public static final java.lang.String FUNCTION
Constant for FUNCTION.

IO_FUNCTION

public static final java.lang.String IO_FUNCTION
Constant for IO_FUNCTION.

PROCEDURE

public static final java.lang.String PROCEDURE
Constant for PROCEDURE.

TABLE_FUNCTION

public static final java.lang.String TABLE_FUNCTION
Constant for TABLE_FUNCTION.

PLSQL_RECORD_TYPE

public static final java.lang.String PLSQL_RECORD_TYPE
Constant for PLSQL_RECORD_TYPE.

PLSQL_TABLE_TYPE

public static final java.lang.String PLSQL_TABLE_TYPE
Constant for PLSQL_TABLE_TYPE.

REF_CURSOR_TYPE

public static final java.lang.String REF_CURSOR_TYPE
Constant for REF_CURSOR_TYPE.

INTELLIGENCE_MODULE

public static final java.lang.String INTELLIGENCE_MODULE
Constant for INTELLIGENCE_MODULE.

QUERY_OBJECT

public static final java.lang.String QUERY_OBJECT
Constant for QUERY_OBJECT.

BUSINESS_AREA

public static final java.lang.String BUSINESS_AREA
Constant for BUSINESS_AREA.

REPORT_MODULE

public static final java.lang.String REPORT_MODULE
Constant for REPORT_MODULE.

REPORT

public static final java.lang.String REPORT
Constant for REPORT.

REPORT_GROUP

public static final java.lang.String REPORT_GROUP
Constant for REPORT_GROUP.

LOCATION

public static final java.lang.String LOCATION
Constant for LOCATION.

RUNTIME_REPOSITORY_CONNECTION

public static final java.lang.String RUNTIME_REPOSITORY_CONNECTION
Constant for RUNTIME_REPOSITORY_CONNECTION.

CONNECTOR

public static final java.lang.String CONNECTOR
Constant for CONNECTOR.

OBJECT_TYPE

public static final java.lang.String OBJECT_TYPE
Constant for OBJECT_TYPE.

ADVANCED_QUEUE

public static final java.lang.String ADVANCED_QUEUE
Constant for ADVANCED_QUEUE.

service

protected static oracle.wh.repos.impl.metaModel.ModelDefinitionServiceImpl service
service is the handle to the model definition service.

apiSet

protected int apiSet
apiSet is the elementId for the set of public API definitions.
Method Detail

release

public static void release()
Release memory and handles when disconnect to the repository.

init

protected void init()
Initialize when connect to repository.

getInstance

public static ClassDefinitionManager getInstance()
Return the singleton handle.
Returns:
the ClassDefinitionManager object.

getPrivateClassName

public java.lang.String getPrivateClassName(java.lang.String name)
                                     throws ClassDefNotFoundException
Get private class name from public class name.
Parameters:
name - is the public class name.
Returns:
the name of the private class.
Throws:
ClassDefNotFoundException - if class not found.

getConcretePrivateClassName

public java.lang.String getConcretePrivateClassName(java.lang.String name)
                                             throws ClassDefNotFoundException
Get concrete private class name from public class name.
Parameters:
name - is the public class name.
Returns:
the name of the concrete parent class of the private class. Concrete is the non-abstract non-weakly typed class.
Throws:
ClassDefNotFoundException - if class not found.

getPrivateClassDefinition

public oracle.wh.repos.sdk.metaModel.ClassDefinition getPrivateClassDefinition(java.lang.String name)
                                                                        throws ClassDefNotFoundException
Get private class definition object with name.
Parameters:
name - is the name of the private class.
Returns:
the private class definition.
Throws:
ClassDefNotFoundException - if class not found.

getClassDefinition

public ClassDefinition getClassDefinition(OWBNamedObject elem)
                                   throws ClassDefNotFoundException
Get public class definition from public API object.
Parameters:
elem - is the public API object.
Returns:
the class definition for this object.
Throws:
ClassDefNotFoundException - if class not found.
See Also:
OWBNamedObject

getClassDefinition

public ClassDefinition getClassDefinition(oracle.wh.repos.sdk.WBElement elem)
                                   throws ClassDefNotFoundException
Get class definition with private CMP elements.
Parameters:
elem - is the private API object.
Returns:
class definition for the object.
Throws:
ClassDefNotFoundException - if class not found.

getClassDefinition

public ClassDefinition getClassDefinition(java.lang.String[] classes)
                                   throws ClassDefNotFoundException
pass in the path of private class names from root to current node. for example: if the array is: oracle.wh.repos.impl.items.CMPRelationalDBItem, oracle.wh.repos.impl.relational.CMPWBTable, oracle.wh.repos.impl.application.CMPWBDataWarehouse, oracle.wh.repos.impl.project.CMPWBProject the function will return public class definition: oracle.owb.relational.Column The array doesn't have to be complete parentage. For example: in above example, the array only has to be oracle.wh.repos.impl.items.CMPRelationalDBItem, oracle.wh.repos.impl.relational.CMPWBTable because after I saw Table, I can figure out that this is Column not LevelAttribute
Parameters:
classes - are the names of private class definitions.
Returns:
public class definition.
Throws:
ClassDefNotFoundException - if class definition is not found.

getClassDefinitionByScriptName

public ClassDefinition getClassDefinitionByScriptName(java.lang.String[] scriptNames)
                                               throws ClassDefNotFoundException
Get class definition with an array of scripting names.
Parameters:
scriptNames - are the scripting names.
Returns:
public class definition.
Throws:
ClassDefNotFoundException - if class definition is not found.

getConcreteClassDefinition

protected ClassDefinition getConcreteClassDefinition(oracle.owb.foundation.reflection.DefinitionInterestUsageImpl parent,
                                                     oracle.wh.repos.sdk.metaModel.ClassDefinition pcdef)
                                              throws ClassDefNotFoundException
Get class definition under the context of the parent and the private class definition.
Parameters:
parent - is the aggregate parent class.
pcdef - is the private class definition.
Returns:
public class definition.
Throws:
ClassDefNotFoundException - if class definition is not found.

getConcreteClassDefinition

protected ClassDefinition getConcreteClassDefinition(oracle.wh.repos.sdk.WBContext ctx)
                                              throws ClassDefNotFoundException
Get class definition with the context of private CMP object.
Parameters:
ctx - is the context for some CMP object.
Returns:
the concrete class definition.
Throws:
ClassDefNotFoundException - if class definition is not found.

getConcreteClassDefinition

protected ClassDefinition getConcreteClassDefinition(oracle.wh.repos.sdk.WBElement elem)
                                              throws ClassDefNotFoundException
Get class definition with private CMP elements.
Parameters:
elem - is the private API CMP object.
Returns:
public class definition.
Throws:
ClassDefNotFoundException - if class definition is not found.

getClassDefinition

public ClassDefinition getClassDefinition(oracle.wh.repos.sdk.WBContext ctx)
                                   throws ClassDefNotFoundException
Get class definition from context of private CMP object.
Parameters:
ctx - is the context for CMP object.
Returns:
public class definition.
Throws:
ClassDefNotFoundException - if class definition is not found.

getClassDefinition

public ClassDefinition getClassDefinition(oracle.wh.repos.sdk.metaModel.ClassDefinition privCdef)
                                   throws ClassDefNotFoundException
Get public class definition from private class definition. sometime it will fail, because private class def to public class def is not 1-1 mapping.
Parameters:
privCdef - is the private class definition.
Returns:
public class definition.
Throws:
ClassDefNotFoundException - if class definition is not found.

constructObject

protected java.lang.Object constructObject(java.lang.reflect.Constructor con,
                                           java.lang.Object par)
Construct object with the constructor which takes one parameter.
Parameters:
con - is the constructor which takes one parameter.
par - is the parameter passed to the constructor.
Returns:
the constructed object.

constructComponent

public oracle.owb.foundation.reflection.ComponentImpl constructComponent(oracle.wh.repos.sdk.WBContext ctx)
Construct Component with context of private CMP elements.
Parameters:
ctx - is the context for the private CMP element.
Returns:
the public component object.

constructOWBNamedObject

public oracle.owb.foundation.OWBNamedObjectImpl constructOWBNamedObject(oracle.wh.repos.sdk.WBElement elem)
Construct OWBNamedObject from private CMP object.
Parameters:
elem - is the private CMP object.
Returns:
public API object.

getClassDefinition

public ClassDefinition getClassDefinition(java.lang.String name)
                                   throws ClassDefNotFoundException
Get the class definition with the name of the public API class name.
Parameters:
name - is the name of the class definition.
Returns:
the class definition.
Throws:
ClassDefNotFoundException - if class definition does not exist for this name.

getClassDefinitionByScriptName

public ClassDefinition getClassDefinitionByScriptName(java.lang.String name)
                                               throws ClassDefNotFoundException
Get class definition with scripting name.
Parameters:
name - is the scripting name of the class definition.
Returns:
the class definition.
Throws:
ClassDefNotFoundException - if class definition does not exist for this name.

getFolderContentTypes

public ClassDefinition[] getFolderContentTypes(Folder folder)
Get the possible aggregate children types in this folder.
Parameters:
folder - is the folder object.
Returns:
the class definitions for the possible children of the folder.
See Also:
Folder

getAllClassDefinitions

public ClassDefinition[] getAllClassDefinitions()
Return all public class definitions in the system.
Returns:
an array of ClassDefinition objects.

getAllTypeDefinitions

public Type[] getAllTypeDefinitions()
Return all types in the system.
Returns:
an array of Type objects.