use of org.dbflute.exception.DfCustomizeEntityDuplicateException in project dbflute-core by dbflute.
the class DfOutsideSqlAnalyzer method assertDuplicateEntity.
// ===================================================================================
// Assert Definition
// =================
protected void assertDuplicateEntity(String entityName, File currentSqlFile) {
final DfCustomizeEntityInfo entityInfo = _sql2entityMeta.getEntityInfoMap().get(entityName);
if (entityInfo == null) {
return;
}
final File sqlFile = entityInfo.getSqlFile();
final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
br.addNotice("The same-name customize-entities were found.");
br.addItem("CustomizeEntity");
br.addElement(entityName);
br.addItem("SQL Files");
br.addElement(sqlFile);
br.addElement(currentSqlFile);
final String msg = br.buildExceptionMessage();
throw new DfCustomizeEntityDuplicateException(msg);
}
Aggregations