Search in sources :

Example 1 with DfParameterBeanDuplicateException

use of org.dbflute.exception.DfParameterBeanDuplicateException in project dbflute-core by dbflute.

the class DfOutsideSqlAnalyzer method assertDuplicateParameterBean.

protected void assertDuplicateParameterBean(String pmbName, File currentSqlFile) {
    final DfPmbMetaData metaData = _sql2entityMeta.getPmbMetaDataMap().get(pmbName);
    if (metaData == null) {
        return;
    }
    final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
    br.addNotice("The same-name parameter-beans were found.");
    br.addItem("ParameterBean");
    br.addElement(pmbName);
    br.addItem("SQL Files");
    br.addElement(metaData.getOutsideSqlFile());
    br.addElement(currentSqlFile);
    final String msg = br.buildExceptionMessage();
    throw new DfParameterBeanDuplicateException(msg);
}
Also used : ExceptionMessageBuilder(org.dbflute.helper.message.ExceptionMessageBuilder) DfParameterBeanDuplicateException(org.dbflute.exception.DfParameterBeanDuplicateException) DfPmbMetaData(org.dbflute.logic.sql2entity.pmbean.DfPmbMetaData)

Aggregations

DfParameterBeanDuplicateException (org.dbflute.exception.DfParameterBeanDuplicateException)1 ExceptionMessageBuilder (org.dbflute.helper.message.ExceptionMessageBuilder)1 DfPmbMetaData (org.dbflute.logic.sql2entity.pmbean.DfPmbMetaData)1