Search in sources :

Example 11 with ClassificationUndefinedHandlingType

use of org.dbflute.jdbc.ClassificationUndefinedHandlingType in project dbflute-core by dbflute.

the class FunCustodial method checkClassificationCode.

// ===================================================================================
// Classification
// ==============
public static void checkClassificationCode(Entity entity, String columnDbName, ClassificationMeta meta, Object code) {
    if (code == null) {
        return;
    }
    final ClassificationUndefinedHandlingType undefinedHandlingType = meta.undefinedHandlingType();
    if (!undefinedHandlingType.isChecked()) {
        // basically no way (not called if no check)
        return;
    }
    if (meta.codeOf(code) != null) {
        return;
    }
    final boolean allowedByOption = entity.myundefinedClassificationAccessAllowed();
    handleUndefinedClassificationCode(entity.asTableDbName(), columnDbName, meta, code, allowedByOption);
}
Also used : ClassificationUndefinedHandlingType(org.dbflute.jdbc.ClassificationUndefinedHandlingType)

Aggregations

ClassificationUndefinedHandlingType (org.dbflute.jdbc.ClassificationUndefinedHandlingType)11 DfIllegalPropertySettingException (org.dbflute.exception.DfIllegalPropertySettingException)3 ExceptionMessageBuilder (org.dbflute.helper.message.ExceptionMessageBuilder)3 PreparedStatement (java.sql.PreparedStatement)2 ResultSet (java.sql.ResultSet)2 ArrayList (java.util.ArrayList)2 DfClassificationProperties (org.dbflute.properties.DfClassificationProperties)2 DfClassificationTop (org.dbflute.properties.assistant.classification.DfClassificationTop)2 Classification (org.dbflute.jdbc.Classification)1 ClassificationMeta (org.dbflute.jdbc.ClassificationMeta)1 DfLittleAdjustmentProperties (org.dbflute.properties.DfLittleAdjustmentProperties)1