use of org.dbflute.exception.SpecifyEveryColumnAlreadySpecifiedColumnException in project dbflute-core by dbflute.
the class ConditionBeanExceptionThrower method throwSpecifyEveryColumnAlreadySpecifiedColumnException.
public void throwSpecifyEveryColumnAlreadySpecifiedColumnException(String tableDbName, Map<String, SpecifiedColumn> specifiedColumnMap) {
final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
br.addNotice("The SpecifyEveryColumn is specified after SpecifyColumn.");
br.addItem("Advice");
br.addElement("You cannot specify columns with every column.");
br.addElement("For example:");
br.addElement(" (x):");
br.addElement(" memberBhv.batchUpdate(memberList, colCB -> {");
br.addElement(" colCB.specify().columnMemberName();");
br.addElement(" colCB.specify().everyColumn(); // *No");
br.addElement(" });");
br.addElement(" (o):");
br.addElement(" memberBhv.batchUpdate(memberList, colCB -> {");
br.addElement(" colCB.specify().everyColumn();");
br.addElement(" });");
br.addItem("Base Table");
br.addElement(tableDbName);
if (specifiedColumnMap != null) {
// basically true
br.addItem("Specified Column");
final Collection<SpecifiedColumn> columnList = specifiedColumnMap.values();
for (SpecifiedColumn column : columnList) {
br.addElement(column);
}
}
final String msg = br.buildExceptionMessage();
throw new SpecifyEveryColumnAlreadySpecifiedColumnException(msg);
}
Aggregations