Search in sources :

Example 1 with DfProcedureSupplementExtractor

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

the class DfProcedureExtractor method doResolveAssistInfoH2.

// -----------------------------------------------------
// H2 Database
// -----------
protected void doResolveAssistInfoH2(DfSchemaSource dataSource, List<DfProcedureMeta> metaInfoList) {
    final DfProcedureSupplementExtractor extractor = getSupplementExtractorH2(dataSource);
    // source info
    // can get parameter definition code from H2
    final boolean reflectParamsToHash = false;
    doSetupSourceInfo(dataSource, metaInfoList, extractor, dataSource.getSchema(), reflectParamsToHash);
    final List<UnifiedSchema> additionalSchemaList = getDatabaseProperties().getAdditionalSchemaList();
    for (UnifiedSchema additionalSchema : additionalSchemaList) {
        doSetupSourceInfo(dataSource, metaInfoList, extractor, additionalSchema, reflectParamsToHash);
    }
}
Also used : UnifiedSchema(org.apache.torque.engine.database.model.UnifiedSchema) DfProcedureSupplementExtractor(org.dbflute.logic.jdbc.metadata.procedure.DfProcedureSupplementExtractor)

Example 2 with DfProcedureSupplementExtractor

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

the class DfProcedureExtractor method doResolveAssistInfoMySQL.

// -----------------------------------------------------
// MySQL
// -----
protected void doResolveAssistInfoMySQL(DfSchemaSource dataSource, List<DfProcedureMeta> metaInfoList) {
    final DfProcedureSupplementExtractor extractor = getSupplementExtractorMySQL(dataSource);
    // source info
    // cannot get parameter info from MySQL
    final boolean reflectParamsToHash = true;
    doSetupSourceInfo(dataSource, metaInfoList, extractor, dataSource.getSchema(), reflectParamsToHash);
    final List<UnifiedSchema> additionalSchemaList = getDatabaseProperties().getAdditionalSchemaList();
    for (UnifiedSchema additionalSchema : additionalSchemaList) {
        doSetupSourceInfo(dataSource, metaInfoList, extractor, additionalSchema, reflectParamsToHash);
    }
}
Also used : UnifiedSchema(org.apache.torque.engine.database.model.UnifiedSchema) DfProcedureSupplementExtractor(org.dbflute.logic.jdbc.metadata.procedure.DfProcedureSupplementExtractor)

Example 3 with DfProcedureSupplementExtractor

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

the class DfProcedureExtractor method doResolveAssistInfoDB2.

// -----------------------------------------------------
// DB2
// ---
protected void doResolveAssistInfoDB2(DfSchemaSource dataSource, List<DfProcedureMeta> metaInfoList) {
    final DfProcedureSupplementExtractor extractor = getSupplementExtractorDB2(dataSource);
    // source info
    // can get parameter definition code from DB2
    final boolean reflectParamsToHash = false;
    doSetupSourceInfo(dataSource, metaInfoList, extractor, dataSource.getSchema(), reflectParamsToHash);
    final List<UnifiedSchema> additionalSchemaList = getDatabaseProperties().getAdditionalSchemaList();
    for (UnifiedSchema additionalSchema : additionalSchemaList) {
        doSetupSourceInfo(dataSource, metaInfoList, extractor, additionalSchema, reflectParamsToHash);
    }
}
Also used : UnifiedSchema(org.apache.torque.engine.database.model.UnifiedSchema) DfProcedureSupplementExtractor(org.dbflute.logic.jdbc.metadata.procedure.DfProcedureSupplementExtractor)

Example 4 with DfProcedureSupplementExtractor

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

the class DfProcedureExtractor method doGetSupplementExtractor.

protected <EXTRACTOR extends DfProcedureSupplementExtractor> EXTRACTOR doGetSupplementExtractor(DfSchemaSource dataSource, DfProcedureSupplementExtractorCreator creator) {
    final int dataSourceKey = dataSource.hashCode();
    Map<String, DfProcedureSupplementExtractor> cacheMap = _supplementExtractorMap.get(dataSourceKey);
    if (cacheMap == null) {
        cacheMap = newHashMap();
        _supplementExtractorMap.put(dataSourceKey, cacheMap);
    }
    final String databaseKey = getBasicProperties().getTargetDatabase();
    DfProcedureSupplementExtractor extractor = cacheMap.get(databaseKey);
    if (extractor == null) {
        extractor = creator.create(dataSource);
        cacheMap.put(databaseKey, extractor);
    }
    if (_suppressLogging) {
        extractor.suppressLogging();
    }
    @SuppressWarnings("unchecked") final EXTRACTOR castExtractor = (EXTRACTOR) extractor;
    return castExtractor;
}
Also used : DfProcedureSupplementExtractor(org.dbflute.logic.jdbc.metadata.procedure.DfProcedureSupplementExtractor)

Example 5 with DfProcedureSupplementExtractor

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

the class DfProcedureExtractor method doResolveAssistInfoPostgreSQL.

// -----------------------------------------------------
// PostgreSQL
// ----------
protected void doResolveAssistInfoPostgreSQL(DfSchemaSource dataSource, List<DfProcedureMeta> metaInfoList) {
    final DfProcedureSupplementExtractor extractor = getSupplementExtractorPostgreSQL(dataSource);
    // source info
    // cannot get parameter info from MySQL
    final boolean reflectParamsToHash = true;
    doSetupSourceInfo(dataSource, metaInfoList, extractor, dataSource.getSchema(), reflectParamsToHash);
    final List<UnifiedSchema> additionalSchemaList = getDatabaseProperties().getAdditionalSchemaList();
    for (UnifiedSchema additionalSchema : additionalSchemaList) {
        doSetupSourceInfo(dataSource, metaInfoList, extractor, additionalSchema, reflectParamsToHash);
    }
}
Also used : UnifiedSchema(org.apache.torque.engine.database.model.UnifiedSchema) DfProcedureSupplementExtractor(org.dbflute.logic.jdbc.metadata.procedure.DfProcedureSupplementExtractor)

Aggregations

DfProcedureSupplementExtractor (org.dbflute.logic.jdbc.metadata.procedure.DfProcedureSupplementExtractor)5 UnifiedSchema (org.apache.torque.engine.database.model.UnifiedSchema)4