Search in sources :

Example 6 with DfSchemaSource

use of org.dbflute.helper.jdbc.context.DfSchemaSource in project dbflute-core by dbflute.

the class Table method getSequenceMinimumValue.

public BigDecimal getSequenceMinimumValue() {
    if (!isUseSequence()) {
        return null;
    }
    final DfSequenceIdentityProperties prop = getSequenceIdentityProperties();
    final DfSchemaSource ds = getDatabase().getDataSource();
    BigDecimal value = prop.getSequenceMinimumValueByTableName(ds, getUnifiedSchema(), getTableDbName());
    if (value == null) {
        final String sequenceName = extractPostgreSQLSerialSequenceName();
        if (sequenceName != null && sequenceName.trim().length() > 0) {
            value = prop.getSequenceMinimumValueBySequenceName(ds, getUnifiedSchema(), sequenceName);
        }
    }
    return value;
}
Also used : DfSchemaSource(org.dbflute.helper.jdbc.context.DfSchemaSource) DfSequenceIdentityProperties(org.dbflute.properties.DfSequenceIdentityProperties) BigDecimal(java.math.BigDecimal)

Example 7 with DfSchemaSource

use of org.dbflute.helper.jdbc.context.DfSchemaSource in project dbflute-core by dbflute.

the class Table method getSequenceCacheSize.

public Integer getSequenceCacheSize() {
    if (!isUseSequence()) {
        return null;
    }
    final DfSequenceIdentityProperties prop = getSequenceIdentityProperties();
    final DfSchemaSource ds = getDatabase().getDataSource();
    return prop.getSequenceCacheSize(ds, getUnifiedSchema(), getTableDbName());
}
Also used : DfSchemaSource(org.dbflute.helper.jdbc.context.DfSchemaSource) DfSequenceIdentityProperties(org.dbflute.properties.DfSequenceIdentityProperties)

Example 8 with DfSchemaSource

use of org.dbflute.helper.jdbc.context.DfSchemaSource in project dbflute-core by dbflute.

the class DfSchemaHtmlDataProcedure method getAvailableProcedureList.

// ===================================================================================
// Available Procedure
// ===================
public List<DfProcedureMeta> getAvailableProcedureList(Supplier<DfSchemaSource> dataSourceProvider) throws SQLException {
    if (_procedureMetaInfoList != null) {
        return _procedureMetaInfoList;
    }
    _log.info(" ");
    _log.info("...Setting up procedures for documents");
    final DfProcedureExtractor handler = new DfProcedureExtractor();
    final DfSchemaSource dataSource = dataSourceProvider.get();
    handler.includeProcedureSynonym(dataSource);
    handler.includeProcedureToDBLink(dataSource);
    if (getDocumentProperties().isShowSchemaHtmlProcedureRegardlessOfGeneration()) {
        handler.suppressGenerationRestriction();
    }
    // ordered by schema
    _procedureMetaInfoList = handler.getAvailableProcedureList(dataSource);
    return _procedureMetaInfoList;
}
Also used : DfSchemaSource(org.dbflute.helper.jdbc.context.DfSchemaSource) DfProcedureExtractor(org.dbflute.logic.jdbc.metadata.basic.DfProcedureExtractor)

Aggregations

DfSchemaSource (org.dbflute.helper.jdbc.context.DfSchemaSource)8 DfSequenceIdentityProperties (org.dbflute.properties.DfSequenceIdentityProperties)4 BigDecimal (java.math.BigDecimal)2 UnifiedSchema (org.apache.torque.engine.database.model.UnifiedSchema)2 DfProcedureExtractor (org.dbflute.logic.jdbc.metadata.basic.DfProcedureExtractor)2 DataSource (javax.sql.DataSource)1