java.lang.Object
org.eclipse.persistence.tools.dbws.BaseDBWSBuilderHelper
org.eclipse.persistence.tools.dbws.oracle.OracleHelper
All Implemented Interfaces:
DBWSBuilderHelper

public class OracleHelper extends BaseDBWSBuilderHelper implements DBWSBuilderHelper
  • Field Details

  • Constructor Details

    • OracleHelper

      public OracleHelper(DBWSBuilder dbwsBuilder)
  • Method Details

    • hasTables

      public boolean hasTables()
      Indicates if this helper instance contains one or more TableType instances in TableType List "dbTables".
      Specified by:
      hasTables in interface DBWSBuilderHelper
      Specified by:
      hasTables in class BaseDBWSBuilderHelper
    • buildDbArtifacts

      public void buildDbArtifacts()
      Description copied from class: BaseDBWSBuilderHelper
      Gather table and procedure information based on TableOperation and ProcedureOperation. End result will be List<TableType> and List<ProcedureType>.
      Specified by:
      buildDbArtifacts in interface DBWSBuilderHelper
      Overrides:
      buildDbArtifacts in class BaseDBWSBuilderHelper
    • buildProcedureOperation

      public void buildProcedureOperation(ProcedureOperationModel procedureOperationModel)
      Builds query operations for a given ProcedureOperationModel.
      Specified by:
      buildProcedureOperation in interface DBWSBuilderHelper
    • buildResultForStoredFunction

      protected Result buildResultForStoredFunction(ArgumentType returnArgument, String returnType)
      Build and return a Result instance based on a given ProcedureType and return type name.
    • getNameForQueryOperation

      protected String getNameForQueryOperation(ProcedureOperationModel opModel, ProcedureType storedProcedure)
      Returns the name to be used for a QueryOperation (or Query) based on a given ProcedureType and ProcedureOperationModel. The returned string will be: 1) If the given ProcedureOperationModel 'name' is a non-null & non-empty string, the returned string will be one of the following: a) 'modelName' if no pattern matching or overloading b) 'modelName_procedureName' if pattern matching and no overloading c) 'modelName_overload' if overloading and no pattern matching d) 'modelName_procedureName_overload' if pattern matching & overloading OR 2) If the given ProcedureOperationModel 'name' is a null or empty string, the returned string will be in the format: 'overload_catalog_schema_procedureName'
    • getQualifiedProcedureName

      protected String getQualifiedProcedureName(ProcedureOperationModel procedureOperationModel, ProcedureType storedProcedure)
      Returns the qualified stored procedure name based on a given ProcedureType and ProcedureOperationModel. The returned string will be in the format: 'schema.catalog.procedureName'
    • loadTables

      protected List<TableType> loadTables(List<String> catalogPatterns, List<String> schemaPatterns, List<String> tableNamePatterns)
      Generates a List<TableType> based on a given set of patterns.
      Specified by:
      loadTables in class BaseDBWSBuilderHelper
    • loadProcedures

      protected List<ProcedureType> loadProcedures(List<String> catalogPatterns, List<String> schemaPatterns, List<String> procedureNamePatterns)
      Generates a List<ProcedureType> based on a given set of patterns.
      Specified by:
      loadProcedures in class BaseDBWSBuilderHelper
    • addToOROXProjectsForComplexTypes

      public void addToOROXProjectsForComplexTypes(List<CompositeDatabaseType> types, Project orProject, Project oxProject)
      Create OR/OX projects for complex types, i.e. PLSQLTypes, VArray, etc.
      Specified by:
      addToOROXProjectsForComplexTypes in class BaseDBWSBuilderHelper
    • addToOXProjectForPLSQLRecordArg

      protected void addToOXProjectForPLSQLRecordArg(DatabaseType dbType, Project oxProject, String recordName, String recordAlias, String targetTypeName, String catalogPattern)
      Build descriptor and mappings for a PL/SQL record argument. The newly created descriptor will be added to the given OX project.
    • addToORProjectForPLSQLRecordArg

      protected void addToORProjectForPLSQLRecordArg(DatabaseType dbType, Project orProject, String recordName, String recordAlias, String targetTypeName, String catalogPattern)
      Build descriptor and mappings for a PL/SQL record argument. The newly created descriptor will be added to the given OR project.
    • addToOXProjectForPLSQLTableArg

      protected void addToOXProjectForPLSQLTableArg(DatabaseType dbType, Project oxProject, String tableName, String tableAlias, String targetTypeName, String catalogPattern)
      Build descriptor and mappings for a PL/SQL collection argument. The newly created descriptor will be added to the given OX project.
    • addToORProjectForPLSQLTableArg

      protected void addToORProjectForPLSQLTableArg(DatabaseType dbType, Project orProject, String tableName, String tableAlias, String targetTypeName, String catalogPattern)
      Build descriptor and mappings for a PL/SQL collection argument. The newly created descriptor will be added to the given OR project.
    • addToOXProjectForVArrayArg

      protected void addToOXProjectForVArrayArg(DatabaseType dbType, Project oxProject, String arrayName, String arrayAlias)
      Build descriptor and mappings for a VArray argument. The newly created descriptor will be added to the given OX project.
    • addToORProjectForVArrayArg

      protected void addToORProjectForVArrayArg(DatabaseType dbType, Project orProject, String arrayName, String arrayAlias)
      Build descriptor and mappings for a VArray argument. The newly created descriptor will be added to the given OX project.
    • addToOXProjectForObjectTypeArg

      protected void addToOXProjectForObjectTypeArg(DatabaseType dbType, Project oxProject, String objectName, String objectAlias)
      Build descriptor and mappings for an Object type argument. The newly created descriptor will be added to the given OX project.
    • addToORProjectForObjectTypeArg

      protected void addToORProjectForObjectTypeArg(DatabaseType dbType, Project orProject, String objectName, String objectAlias)
      Build descriptor and mappings for an Object type argument. The newly created descriptor will be added to the given OX project.
    • addToOXProjectForObjectTableTypeArg

      protected void addToOXProjectForObjectTableTypeArg(DatabaseType dbType, Project oxProject, String objectTableName, String objectTableAlias)
      Build descriptor and mappings for an OracleTableType argument. The newly created descriptor will be added to the given OX project.
    • addToORProjectForObjectTableTypeArg

      protected void addToORProjectForObjectTableTypeArg(DatabaseType dbType, Project orProject, String objectTableName, String objectTableAlias)
      Build descriptor and mappings for an OracleTableType argument. The newly created descriptor will be added to the given OR project.
    • buildQueryForProcedureType

      protected void buildQueryForProcedureType(ProcedureType procType, Project orProject, Project oxProject, ProcedureOperationModel opModel, boolean hasPLSQLArgs)
      Build a Query for the given ProcedureType instance and add it to the given OR project's list of queries.
      Specified by:
      buildQueryForProcedureType in class BaseDBWSBuilderHelper
    • buildFieldForNestedType

      protected ObjectRelationalDatabaseField buildFieldForNestedType(DatabaseType owningType)
      Build an OR database field for a given type's nested type.
    • addDirectMappingForFieldType

      protected void addDirectMappingForFieldType(XMLDescriptor xdesc, String attributeName, FieldType fType)
      Create an XMLDirectMapping for a given FieldType instance, and add the newly created mapping to the given XMLDescriptor.
    • buildAndAddXMLCompositeObjectMapping

      protected void buildAndAddXMLCompositeObjectMapping(XMLDescriptor xdesc, String attributeName, String referenceClassName)
      Build an XMLCompositeObjectMapping based on given attribute and reference class names, and add the newly created mapping to the given descriptor.
    • buildAndAddXMLCompositeObjectMapping

      protected void buildAndAddXMLCompositeObjectMapping(XMLDescriptor xdesc, String attributeName, String xpath, String referenceClassName)
      Build an XMLCompositeObjectMapping based on given attribute and reference class names, and add the newly created mapping to the given descriptor.
    • buildXMLCompositeObjectMapping

      protected XMLCompositeObjectMapping buildXMLCompositeObjectMapping(String attributeName, String referenceClassName)
      Build an XMLCompositeObjectMapping based on given attribute and reference class names.
    • buildXMLCompositeObjectMapping

      protected XMLCompositeObjectMapping buildXMLCompositeObjectMapping(String attributeName, String xpath, String referenceClassName)
      Build an XMLCompositeObjectMapping based on given attribute and reference class names.
    • buildAndAddXMLCompositeCollectionMapping

      protected void buildAndAddXMLCompositeCollectionMapping(XMLDescriptor xdesc, String attributeName, String xPath, String referenceClassName)
      Build an XMLCompositeCollectionMapping based on a given attribute name, xpath, and reference class, and add the newly created mapping to the given descriptor.
    • buildAndAddXMLCompositeCollectionMapping

      protected void buildAndAddXMLCompositeCollectionMapping(XMLDescriptor xdesc, String referenceClassName)
      Build an XMLCompositeCollectionMapping based on a given reference class name, and add the newly created mapping to the given descriptor.
    • buildXMLCompositeCollectionMapping

      protected XMLCompositeCollectionMapping buildXMLCompositeCollectionMapping(String referenceClassName)
      Build an XMLCompositeCollectionMapping based on a given reference class name. The attribute name will be set to 'items', and the xpath set to 'item'.
    • buildXMLCompositeCollectionMapping

      protected XMLCompositeCollectionMapping buildXMLCompositeCollectionMapping(String attributeName, String xPath, String referenceClassName)
      Build an XMLCompositeCollectionMapping based on a given attribute name, xpath, and reference class.
    • buildAndAddXMLCompositeDirectCollectionMapping

      protected XMLCompositeDirectCollectionMapping buildAndAddXMLCompositeDirectCollectionMapping(XMLDescriptor xdesc, String attributeName, String xPath, Class<?> attributeElementClass)
      Build an XMLCompositeDirectCollectionMapping based on a given attribute name, xpath, and attribute element class. The newly created mapping will be added to the given XML descriptor.
    • buildXMLCompositeDirectCollectionMapping

      protected XMLCompositeDirectCollectionMapping buildXMLCompositeDirectCollectionMapping(String attributeName, String xPath, Class<?> attributeElementClass)
      Build an XMLCompositeDirectCollectionMapping based on a given attribute name, xpath, and attribute element class.
    • buildAndAddStructureMapping

      protected StructureMapping buildAndAddStructureMapping(ObjectRelationalDataTypeDescriptor orDesc, String attributeName, String fieldName, String referenceClassName)
      Builds a StructureMapping based on a given attributeName, fieldName and reference class name, and adds the newly created mapping to the given OR descriptor.
    • buildStructureMapping

      protected StructureMapping buildStructureMapping(String attributeName, String fieldName, String referenceClassName)
      Builds a StructureMapping based on a given attributeName, fieldName and reference class name.
    • buildAndAddObjectArrayMapping

      protected ObjectArrayMapping buildAndAddObjectArrayMapping(ObjectRelationalDataTypeDescriptor orDesc, String attributeName, String fieldName, String referenceClassName, String structureName)
      Builds an ObjectArrayMapping based on a given attribute name, field name, reference class name, field type and package name, and adds the newly created mapping to the given OR descriptor.
    • buildObjectArrayMapping

      protected ObjectArrayMapping buildObjectArrayMapping(String attributeName, String fieldName, String referenceClassName, String structureName)
      Builds an ObjectArrayMapping based on a given attribute name, field name, reference class name and structureName.
    • buildAndAddArrayMapping

      protected ArrayMapping buildAndAddArrayMapping(ObjectRelationalDataTypeDescriptor orDesc, String attributeName, String fieldName, String structureName, String nestedTypeName)
      Build an ArrayMapping based on a given attribute name, field name, structure name and nested type name. The newly created mapping will be added to the given OR descriptor.
    • buildAndAddArrayMapping

      protected ArrayMapping buildAndAddArrayMapping(ObjectRelationalDataTypeDescriptor orDesc, String attributeName, String fieldName, String structureName)
      Build an ArrayMapping based on a given attribute name, field name and structure name. The newly created mapping will be added to the given OR descriptor.
    • buildArrayMapping

      protected ArrayMapping buildArrayMapping(String attributeName, String fieldName, String structureName)
      Build an ArrayMapping based on a given attribute name, field name and structure name.
    • buildAndAddNewXMLDescriptor

      protected XMLDescriptor buildAndAddNewXMLDescriptor(Project oxProject, String objectAlias, String userType, String targetNamespace)
      Build an XMLDescriptor based on a given descriptor alias, schema alias and target namespace, and add the newly created descriptor to the given OX Project.
    • buildAndAddNewXMLDescriptor

      protected XMLDescriptor buildAndAddNewXMLDescriptor(Project oxProject, String objectAlias, String javaClassName, String userType, String targetNamespace)
      Build an XMLDescriptor based on a given descriptor alias, schema alias, java class name and target namespace, and add the newly created descriptor to the given OX Project.
    • buildNewXMLDescriptor

      protected XMLDescriptor buildNewXMLDescriptor(String objectAlias, String userType, String targetNamespace)
      Build an XMLDescriptor based on a given descriptor alias, schema alias, and target namespace.
    • buildNewXMLDescriptor

      protected XMLDescriptor buildNewXMLDescriptor(String objectAlias, String javaClassName, String userType, String targetNamespace)
      Build an XMLDescriptor based on a given descriptor alias, java class name schema alias, and target namespace.
    • buildAndAddNewObjectRelationalDataTypeDescriptor

      protected ObjectRelationalDataTypeDescriptor buildAndAddNewObjectRelationalDataTypeDescriptor(Project orProject, String alias)
      Build an ObjectRelationalDataTypeDescriptor based on a given descriptor alias and add it to the given OR Project.
    • buildAndAddNewObjectRelationalDataTypeDescriptor

      protected ObjectRelationalDataTypeDescriptor buildAndAddNewObjectRelationalDataTypeDescriptor(Project orProject, String alias, String javaClassName)
      Build an ObjectRelationalDataTypeDescriptor based on a given descriptor alias and java class name, and add it to the given OR Project.
    • buildNewObjectRelationalDataTypeDescriptor

      protected ObjectRelationalDataTypeDescriptor buildNewObjectRelationalDataTypeDescriptor(String alias)
      Build an ObjectRelationalDataTypeDescriptor based on a given descriptor alias.
    • buildNewObjectRelationalDataTypeDescriptor

      protected ObjectRelationalDataTypeDescriptor buildNewObjectRelationalDataTypeDescriptor(String alias, String javaClassName)
      Build an ObjectRelationalDataTypeDescriptor based on a given descriptor alias and java class name.
    • getStructureNameForField

      protected String getStructureNameForField(FieldType fType, String packageName)
      Return the structure name to be set on a mapping based on a given FieldType and packageName.
    • customizeSimpleXMLTagNames

      protected void customizeSimpleXMLTagNames(PLSQLCursorType plsqlCursor, ProcedureOperationModel procedureOperationModel)
      Customizes the simple-xml-format tags names to better represent the PL/SQL record/table/column type. This is possible only with strongly-typed ref cursors, since for weakly-typed ones we don't know anything about the cursor's output type.
    • buildDatabaseTypeFromMetadataType

      protected DatabaseType buildDatabaseTypeFromMetadataType(DatabaseType dType, String catalog)
      Overridden for wrapping call with call to translateToOracleType(org.eclipse.persistence.internal.helper.DatabaseType) method.
      Overrides:
      buildDatabaseTypeFromMetadataType in class BaseDBWSBuilderHelper