protected static Classification gcls(ColumnInfo columnInfo, Object code) { // getClassification if (code == null) { return null; } final ClassificationMeta meta = columnInfo.getClassificationMeta(); if (meta == null) { // no way (just in case) return null; } return meta.codeOf(code); }
// ----------------------------------------------------- // Write Converter // --------------- // these are static to avoid the FindBugs headache // (implementations of PropertyGateway can be static class) protected static void ccls(ColumnInfo columnInfo, Object code) { // checkClassification // old style, for compatibility, check only on entity after Java8 if (code == null) { return; // no check null value which means no existence on DB } final ClassificationMeta meta = columnInfo.getClassificationMeta(); if (meta == null) { // no way (just in case) return; } final ClassificationUndefinedHandlingType undefinedHandlingType = meta.undefinedHandlingType(); if (!undefinedHandlingType.isChecked()) { // basically no way (not called if no check) return; } final Classification classification = gcls(columnInfo, code); if (classification == null) { final String tableDbName = columnInfo.getDBMeta().getTableDbName(); final String columnDbName = columnInfo.getColumnDbName(); FunCustodial.handleUndefinedClassificationCode(tableDbName, columnDbName, meta, code); } }