dbflute / dbflute-core

DBFlute core libraries for Java8
http://dbflute.seasar.org/
23 stars 18 forks source link

add schema policy check statement of classification(...) #108

Closed shin-kinoshita closed 5 years ago

shin-kinoshita commented 5 years ago

Developers can add a new statement of classification(...) in schemaPolicyMap.dfprop. It should be written like below.

; if columnName is suffix:_SERVICE_RANK then classification(ServiceRank)

In this case, table columns of which suffix is _SERVICE_RANK must be ServiceRank classification defined in classificationDefinitionMap.dfprop.

jflute commented 5 years ago

Does it need to fix doEvaluateColumnThenItemValue()'s classification handling? e.g. if ... then column is classification(MemberStatus)

            } else if ("classification".equalsIgnoreCase(thenValue)) {
                final boolean determination = column.hasClassification();
                if (!determination == !notThenValue) {
                    return violationCall.apply(String.valueOf(determination));
                }
            } else {
                throwSchemaPolicyCheckIllegalIfThenStatementException(statement, "Unknown then-value: " + thenValue);
            }