Search in sources :

Example 6 with DfAdditionalSchemaInfo

use of org.dbflute.properties.assistant.DfAdditionalSchemaInfo in project dbflute-core by dbflute.

the class DfTableExtractor method getRealObjectTypeTargetArray.

protected String[] getRealObjectTypeTargetArray(UnifiedSchema unifiedSchema) {
    if (unifiedSchema != null) {
        final DfAdditionalSchemaInfo schemaInfo = getAdditionalSchemaInfo(unifiedSchema);
        if (schemaInfo != null) {
            final List<String> objectTypeTargetList = schemaInfo.getObjectTypeTargetList();
            assertObjectTypeTargetListNotEmpty(unifiedSchema, objectTypeTargetList);
            return objectTypeTargetList.toArray(new String[objectTypeTargetList.size()]);
        }
    }
    final List<String> objectTypeTargetList = getProperties().getDatabaseProperties().getObjectTypeTargetList();
    assertObjectTypeTargetListNotEmpty(unifiedSchema, objectTypeTargetList);
    return objectTypeTargetList.toArray(new String[objectTypeTargetList.size()]);
}
Also used : DfAdditionalSchemaInfo(org.dbflute.properties.assistant.DfAdditionalSchemaInfo)

Example 7 with DfAdditionalSchemaInfo

use of org.dbflute.properties.assistant.DfAdditionalSchemaInfo in project dbflute-core by dbflute.

the class DfDatabaseProperties method getAdditionalSchemaList.

// -----------------------------------------------------
// Additional Schema Accessor
// --------------------------
public List<UnifiedSchema> getAdditionalSchemaList() {
    final Map<String, DfAdditionalSchemaInfo> schemaMap = getAdditionalSchemaMap();
    final Set<Entry<String, DfAdditionalSchemaInfo>> entrySet = schemaMap.entrySet();
    final List<UnifiedSchema> schemaList = new ArrayList<UnifiedSchema>();
    for (Entry<String, DfAdditionalSchemaInfo> entry : entrySet) {
        final DfAdditionalSchemaInfo info = entry.getValue();
        final UnifiedSchema unifiedSchema = info.getUnifiedSchema();
        schemaList.add(unifiedSchema);
    }
    return schemaList;
}
Also used : Entry(java.util.Map.Entry) DfAdditionalSchemaInfo(org.dbflute.properties.assistant.DfAdditionalSchemaInfo) UnifiedSchema(org.apache.torque.engine.database.model.UnifiedSchema) ArrayList(java.util.ArrayList)

Aggregations

DfAdditionalSchemaInfo (org.dbflute.properties.assistant.DfAdditionalSchemaInfo)7 UnifiedSchema (org.apache.torque.engine.database.model.UnifiedSchema)4 DfDatabaseProperties (org.dbflute.properties.DfDatabaseProperties)4 Entry (java.util.Map.Entry)2 ArrayList (java.util.ArrayList)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1 DfIllegalPropertyTypeException (org.dbflute.exception.DfIllegalPropertyTypeException)1 DfRequiredPropertyNotFoundException (org.dbflute.exception.DfRequiredPropertyNotFoundException)1 StringKeyMap (org.dbflute.helper.StringKeyMap)1 DfProcedureMeta (org.dbflute.logic.jdbc.metadata.info.DfProcedureMeta)1 DfSynonymMeta (org.dbflute.logic.jdbc.metadata.info.DfSynonymMeta)1