use of org.dbflute.exception.SpecifyExceptColumnAlreadySpecifiedColumnException in project dbflute-core by dbflute.
the class ConditionBeanExceptionThrower method throwSpecifyExceptColumnAlreadySpecifiedColumnException.
public void throwSpecifyExceptColumnAlreadySpecifiedColumnException(String tableDbName, Map<String, SpecifiedColumn> specifiedColumnMap) {
final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
br.addNotice("The SpecifyExceptColumn is specified after SpecifyColumn.");
br.addItem("Advice");
br.addElement("You cannot specify columns with except columns.");
br.addElement("For example:");
br.addElement(" (x):");
br.addElement(" ... = memberBhv.selectList(cb -> {");
br.addElement(" cb.specify().columnMemberName(");
br.addElement(" cb.specify().exceptRecordMetaColumn(); // *No");
br.addElement(" });");
br.addElement(" (o):");
br.addElement(" ... = memberBhv.selectList(cb -> {");
br.addElement(" cb.specify().exceptRecordMetaColumn();");
br.addElement(" });");
br.addElement(" (o):");
br.addElement(" ... = memberBhv.selectList(cb -> {");
br.addElement(" cb.specify().columnMemberName()");
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 SpecifyExceptColumnAlreadySpecifiedColumnException(msg);
}
Aggregations