Search in sources :

Example 1 with DfProcedureSupplementExtractorOracle

use of org.dbflute.logic.jdbc.metadata.procedure.DfProcedureSupplementExtractorOracle in project dbflute-core by dbflute.

the class DfProcedureExtractor method doResolveAssistInfoOracleToDBLink.

protected void doResolveAssistInfoOracleToDBLink(DfSchemaSource dataSource, List<DfProcedureMeta> metaInfoList, String dbLinkName) {
    final DfProcedureSupplementExtractorOracle extractor = getSupplementExtractorOracle(dataSource);
    // Overload
    final Map<String, Integer> overloadInfoMapMap = extractor.extractParameterOverloadInfoToDBLinkMap(dbLinkName);
    doSetupOverloadInfoOracleToDBLink(overloadInfoMapMap, metaInfoList, extractor);
    // GreatWall
    // DBLink procedure's GreatWalls are unsupported yet
    // final StringKeyMap<DfTypeArrayInfo> parameterArrayInfoMap = extractor.extractParameterArrayInfoToDBLinkMap();
    // final StringKeyMap<DfTypeStructInfo> structInfoMap = extractor.extractStructInfoToDBLinkMap();
    // empty
    final StringKeyMap<DfTypeArrayInfo> parameterArrayInfoMap = StringKeyMap.createAsFlexible();
    // empty
    final StringKeyMap<DfTypeStructInfo> structInfoMap = StringKeyMap.createAsFlexible();
    doSetupGreatWallOracle(parameterArrayInfoMap, structInfoMap, metaInfoList, extractor);
}
Also used : DfTypeStructInfo(org.dbflute.logic.jdbc.metadata.info.DfTypeStructInfo) DfTypeArrayInfo(org.dbflute.logic.jdbc.metadata.info.DfTypeArrayInfo) DfProcedureSupplementExtractorOracle(org.dbflute.logic.jdbc.metadata.procedure.DfProcedureSupplementExtractorOracle)

Example 2 with DfProcedureSupplementExtractorOracle

use of org.dbflute.logic.jdbc.metadata.procedure.DfProcedureSupplementExtractorOracle in project dbflute-core by dbflute.

the class DfProcedureExtractor method doResolveAssistInfoOracle.

// -----------------------------------------------------
// Oracle
// ------
protected void doResolveAssistInfoOracle(DfSchemaSource dataSource, List<DfProcedureMeta> metaInfoList) {
    final UnifiedSchema mainSchema = dataSource.getSchema();
    final List<UnifiedSchema> additionalSchemaList = getDatabaseProperties().getAdditionalSchemaList();
    // overload
    final DfProcedureSupplementExtractorOracle extractor = getSupplementExtractorOracle(dataSource);
    final Map<UnifiedSchema, Map<String, Integer>> overloadInfoMapMap = newHashMap();
    overloadInfoMapMap.put(mainSchema, extractor.extractParameterOverloadInfoMap(mainSchema));
    for (UnifiedSchema additionalSchema : additionalSchemaList) {
        overloadInfoMapMap.put(additionalSchema, extractor.extractParameterOverloadInfoMap(additionalSchema));
    }
    doSetupOverloadInfoOracle(overloadInfoMapMap, metaInfoList, extractor);
    // great wall
    // get all available schema's info to use other schema's type
    // same-name type between schema is unsupported
    final StringKeyMap<DfTypeArrayInfo> arrayInfoMap = extractor.extractParameterArrayInfoMap(mainSchema);
    for (UnifiedSchema additionalSchema : additionalSchemaList) {
        arrayInfoMap.putAll(extractor.extractParameterArrayInfoMap(additionalSchema));
    }
    final StringKeyMap<DfTypeStructInfo> structInfoMap = extractor.extractStructInfoMap(mainSchema);
    for (UnifiedSchema additionalSchema : additionalSchemaList) {
        structInfoMap.putAll(extractor.extractStructInfoMap(additionalSchema));
    }
    doSetupGreatWallOracle(arrayInfoMap, structInfoMap, metaInfoList, extractor);
    // source info
    // can get parameter definition code from Oracle
    final boolean reflectParamsToHash = false;
    doSetupSourceInfo(dataSource, metaInfoList, extractor, mainSchema, reflectParamsToHash);
    for (UnifiedSchema additionalSchema : additionalSchemaList) {
        doSetupSourceInfo(dataSource, metaInfoList, extractor, additionalSchema, reflectParamsToHash);
    }
}
Also used : UnifiedSchema(org.apache.torque.engine.database.model.UnifiedSchema) DfTypeStructInfo(org.dbflute.logic.jdbc.metadata.info.DfTypeStructInfo) DfTypeArrayInfo(org.dbflute.logic.jdbc.metadata.info.DfTypeArrayInfo) DfProcedureSupplementExtractorOracle(org.dbflute.logic.jdbc.metadata.procedure.DfProcedureSupplementExtractorOracle) HashMap(java.util.HashMap) Map(java.util.Map) StringKeyMap(org.dbflute.helper.StringKeyMap)

Aggregations

DfTypeArrayInfo (org.dbflute.logic.jdbc.metadata.info.DfTypeArrayInfo)2 DfTypeStructInfo (org.dbflute.logic.jdbc.metadata.info.DfTypeStructInfo)2 DfProcedureSupplementExtractorOracle (org.dbflute.logic.jdbc.metadata.procedure.DfProcedureSupplementExtractorOracle)2 HashMap (java.util.HashMap)1 Map (java.util.Map)1 UnifiedSchema (org.apache.torque.engine.database.model.UnifiedSchema)1 StringKeyMap (org.dbflute.helper.StringKeyMap)1