Search in sources :

Example 16 with IllegalConditionBeanOperationException

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

the class HpQDRParameter method throwRangeOfMaxNumberOnlyNullNotAllowedException.

protected void throwRangeOfMaxNumberOnlyNullNotAllowedException(Number minNumber, RangeOfOption option) {
    final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
    br.addNotice("The max-mumber of range-of for (Query)DerivedReferrer were null.");
    br.addItem("Advice");
    br.addElement("Basically it cannot allow max-mumber to be null.");
    br.addElement("If you need to specify null, use allowOneSide() option.");
    br.addItem("minNumber");
    br.addElement(minNumber);
    br.addItem("RangeOfOption");
    br.addElement(option);
    final String msg = br.buildExceptionMessage();
    throw new IllegalConditionBeanOperationException(msg);
}
Also used : ExceptionMessageBuilder(org.dbflute.helper.message.ExceptionMessageBuilder) IllegalConditionBeanOperationException(org.dbflute.exception.IllegalConditionBeanOperationException)

Example 17 with IllegalConditionBeanOperationException

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

the class HpQDRParameter method throwFromToToDateOnlyNullNotAllowedException.

protected void throwFromToToDateOnlyNullNotAllowedException(Date fromDate, FromToOption option) {
    final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
    br.addNotice("The to-date of from-to for (Query)DerivedReferrer were null.");
    br.addItem("Advice");
    br.addElement("Basically it cannot allow to-date to be null.");
    br.addElement("If you need to specify null, use allowOneSide() option.");
    br.addItem("fromDate");
    br.addElement(fromDate);
    br.addItem("FromToOption");
    br.addElement(option);
    final String msg = br.buildExceptionMessage();
    throw new IllegalConditionBeanOperationException(msg);
}
Also used : ExceptionMessageBuilder(org.dbflute.helper.message.ExceptionMessageBuilder) IllegalConditionBeanOperationException(org.dbflute.exception.IllegalConditionBeanOperationException)

Example 18 with IllegalConditionBeanOperationException

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

the class HpQDRParameter method throwFromToUnsupportedOptionException.

protected void throwFromToUnsupportedOptionException(Date fromDate, Date toDate, FromToOption option, String keyword) {
    final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
    br.addNotice("Unsupported option of from-to option.");
    br.addItem("Advice");
    br.addElement("Cannot use the option '" + keyword + "'");
    br.addElement(" of the from-to for (Query)DerivedReferrer.");
    br.addItem("From/To Date");
    br.addElement(fromDate + " / " + toDate);
    br.addItem("FromToOption");
    br.addElement(option);
    final String msg = br.buildExceptionMessage();
    throw new IllegalConditionBeanOperationException(msg);
}
Also used : ExceptionMessageBuilder(org.dbflute.helper.message.ExceptionMessageBuilder) IllegalConditionBeanOperationException(org.dbflute.exception.IllegalConditionBeanOperationException)

Example 19 with IllegalConditionBeanOperationException

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

the class HpQDRParameter method throwRangeOfUnsupportedOptionException.

protected void throwRangeOfUnsupportedOptionException(Number minNumber, Number maxNumber, RangeOfOption option, String keyword) {
    final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
    br.addNotice("Unsupported option of range-of option.");
    br.addItem("Advice");
    br.addElement("Cannot use the option '" + keyword + "'");
    br.addElement(" of the range-of for (Query)DerivedReferrer.");
    br.addItem("Max/Min Number");
    br.addElement(minNumber + " / " + maxNumber);
    br.addItem("RangeOfOption");
    br.addElement(option);
    final String msg = br.buildExceptionMessage();
    throw new IllegalConditionBeanOperationException(msg);
}
Also used : ExceptionMessageBuilder(org.dbflute.helper.message.ExceptionMessageBuilder) IllegalConditionBeanOperationException(org.dbflute.exception.IllegalConditionBeanOperationException)

Example 20 with IllegalConditionBeanOperationException

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

the class HpQDRParameter method throwRangeOfMinNumberOnlyNullNotAllowedException.

protected void throwRangeOfMinNumberOnlyNullNotAllowedException(Number maxNumber, RangeOfOption option) {
    final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
    br.addNotice("The min-number of range-of for (Query)DerivedReferrer were null.");
    br.addItem("Advice");
    br.addElement("Basically it cannot allow min-mumber to be null.");
    br.addElement("If you need to specify null, use allowOneSide() option.");
    br.addItem("maxNumber");
    br.addElement(maxNumber);
    br.addItem("RangeOfOption");
    br.addElement(option);
    final String msg = br.buildExceptionMessage();
    throw new IllegalConditionBeanOperationException(msg);
}
Also used : ExceptionMessageBuilder(org.dbflute.helper.message.ExceptionMessageBuilder) IllegalConditionBeanOperationException(org.dbflute.exception.IllegalConditionBeanOperationException)

Aggregations

IllegalConditionBeanOperationException (org.dbflute.exception.IllegalConditionBeanOperationException)36 ExceptionMessageBuilder (org.dbflute.helper.message.ExceptionMessageBuilder)24 HpMobCaseWhenElement (org.dbflute.cbean.chelper.HpMobCaseWhenElement)3 SpecifiedColumn (org.dbflute.cbean.dream.SpecifiedColumn)3 DBMeta (org.dbflute.dbmeta.DBMeta)3 ColumnInfo (org.dbflute.dbmeta.info.ColumnInfo)3 ColumnSqlName (org.dbflute.dbmeta.name.ColumnSqlName)3 ArrayList (java.util.ArrayList)2 Method (java.lang.reflect.Method)1 LocalDate (java.time.LocalDate)1 LocalDateTime (java.time.LocalDateTime)1 Collection (java.util.Collection)1 Date (java.util.Date)1 List (java.util.List)1 Entity (org.dbflute.Entity)1 HpCBPurpose (org.dbflute.cbean.chelper.HpCBPurpose)1 SqlClause (org.dbflute.cbean.sqlclause.SqlClause)1 OrderByClause (org.dbflute.cbean.sqlclause.orderby.OrderByClause)1 OrderByElement (org.dbflute.cbean.sqlclause.orderby.OrderByElement)1 ColumnRealName (org.dbflute.dbmeta.name.ColumnRealName)1