Search in sources :

Example 11 with DfIllegalPropertyTypeException

use of org.dbflute.exception.DfIllegalPropertyTypeException in project dbflute-core by dbflute.

the class DfDocumentProperties method getLoadDataReverseRecordLimit.

// -----------------------------------------------------
// Record Limit
// ------------
public Integer getLoadDataReverseRecordLimit() {
    final Map<String, Object> loadDataReverseMap = getLoadDataReverseMap();
    String limitExp = null;
    if (!loadDataReverseMap.isEmpty()) {
        limitExp = (String) loadDataReverseMap.get("recordLimit");
    }
    if (limitExp == null) {
        return null;
    }
    try {
        return Integer.valueOf(limitExp);
    } catch (NumberFormatException e) {
        String msg = "The property 'recordLimit' of loadDataReverse in " + KEY_oldDocumentMap;
        msg = msg + " should be number but: value=" + limitExp;
        throw new DfIllegalPropertyTypeException(msg, e);
    }
}
Also used : DfIllegalPropertyTypeException(org.dbflute.exception.DfIllegalPropertyTypeException)

Aggregations

DfIllegalPropertyTypeException (org.dbflute.exception.DfIllegalPropertyTypeException)11 ArrayList (java.util.ArrayList)5 List (java.util.List)5 Map (java.util.Map)5 LinkedHashMap (java.util.LinkedHashMap)4 Entry (java.util.Map.Entry)3 StringKeyMap (org.dbflute.helper.StringKeyMap)3 DfIllegalPropertySettingException (org.dbflute.exception.DfIllegalPropertySettingException)2 Properties (java.util.Properties)1 UnifiedSchema (org.apache.torque.engine.database.model.UnifiedSchema)1 DfRequiredPropertyNotFoundException (org.dbflute.exception.DfRequiredPropertyNotFoundException)1 DfLanguageDependency (org.dbflute.logic.generate.language.DfLanguageDependency)1 DfOutsideSqlLocation (org.dbflute.logic.sql2entity.analyzer.DfOutsideSqlLocation)1 DfAdditionalSchemaInfo (org.dbflute.properties.assistant.database.DfAdditionalSchemaInfo)1 DfConnectionProperties (org.dbflute.properties.assistant.database.DfConnectionProperties)1 DfConventionalTakeAssertMap (org.dbflute.properties.assistant.reps.DfConventionalTakeAssertMap)1 ScopeInfo (org.dbflute.util.Srl.ScopeInfo)1