update to dbflute 1.1.1
This commit is contained in:
parent
b0bbf01909
commit
8d364e7621
6 changed files with 45 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
set ANT_OPTS=-Xmx512m
|
||||
|
||||
set DBFLUTE_HOME=..\mydbflute\dbflute-1.1.0-sp9
|
||||
set DBFLUTE_HOME=..\mydbflute\dbflute-1.1.1
|
||||
|
||||
set MY_PROPERTIES_PATH=build.properties
|
||||
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
export ANT_OPTS=-Xmx512m
|
||||
|
||||
export DBFLUTE_HOME=../mydbflute/dbflute-1.1.0-sp9
|
||||
export DBFLUTE_HOME=../mydbflute/dbflute-1.1.1
|
||||
|
||||
export MY_PROPERTIES_PATH=build.properties
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -40,7 +40,7 @@
|
|||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
||||
<!-- Main Framework -->
|
||||
<dbflute.version>1.1.0-sp9</dbflute.version>
|
||||
<dbflute.version>1.1.1</dbflute.version>
|
||||
<lastaflute.version>0.7.5-RC2</lastaflute.version>
|
||||
<lasta.taglib.version>0.6.7</lasta.taglib.version>
|
||||
<servlet.version>3.1.0</servlet.version>
|
||||
|
|
|
@ -36,6 +36,7 @@ import org.dbflute.bhv.writable.UpdateOption;
|
|||
import org.dbflute.cbean.ConditionBean;
|
||||
import org.dbflute.cbean.coption.CursorSelectOption;
|
||||
import org.dbflute.cbean.result.ListResultBean;
|
||||
import org.dbflute.exception.FetchingOverSafetySizeException;
|
||||
import org.dbflute.exception.IllegalBehaviorStateException;
|
||||
import org.dbflute.util.DfTypeUtil;
|
||||
import org.elasticsearch.action.bulk.BulkItemResponse;
|
||||
|
@ -87,6 +88,19 @@ public abstract class EsAbstractBehavior<ENTITY extends Entity, CB extends Condi
|
|||
return (int) ((EsAbstractConditionBean) cb).build(builder).execute().actionGet().getCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected <RESULT extends ENTITY> RESULT delegateSelectEntity(final ConditionBean cb, final Class<? extends RESULT> entityType) {
|
||||
final List<? extends RESULT> list = delegateSelectList(cb, entityType);
|
||||
if (list.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
if (list.size() >= 2) {
|
||||
String msg = "The size of selected list is over 1: " + list.size();
|
||||
throw new FetchingOverSafetySizeException(msg, 1); // immediatly catched by caller and tranlated
|
||||
}
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected <RESULT extends ENTITY> List<RESULT> delegateSelectList(final ConditionBean cb, final Class<? extends RESULT> entityType) {
|
||||
// #pending check response
|
||||
|
|
|
@ -36,6 +36,7 @@ import org.dbflute.bhv.writable.UpdateOption;
|
|||
import org.dbflute.cbean.ConditionBean;
|
||||
import org.dbflute.cbean.coption.CursorSelectOption;
|
||||
import org.dbflute.cbean.result.ListResultBean;
|
||||
import org.dbflute.exception.FetchingOverSafetySizeException;
|
||||
import org.dbflute.exception.IllegalBehaviorStateException;
|
||||
import org.dbflute.util.DfTypeUtil;
|
||||
import org.elasticsearch.action.bulk.BulkItemResponse;
|
||||
|
@ -87,6 +88,19 @@ public abstract class EsAbstractBehavior<ENTITY extends Entity, CB extends Condi
|
|||
return (int) ((EsAbstractConditionBean) cb).build(builder).execute().actionGet().getCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected <RESULT extends ENTITY> RESULT delegateSelectEntity(final ConditionBean cb, final Class<? extends RESULT> entityType) {
|
||||
final List<? extends RESULT> list = delegateSelectList(cb, entityType);
|
||||
if (list.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
if (list.size() >= 2) {
|
||||
String msg = "The size of selected list is over 1: " + list.size();
|
||||
throw new FetchingOverSafetySizeException(msg, 1); // immediatly catched by caller and tranlated
|
||||
}
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected <RESULT extends ENTITY> List<RESULT> delegateSelectList(final ConditionBean cb, final Class<? extends RESULT> entityType) {
|
||||
// #pending check response
|
||||
|
|
|
@ -36,6 +36,7 @@ import org.dbflute.bhv.writable.UpdateOption;
|
|||
import org.dbflute.cbean.ConditionBean;
|
||||
import org.dbflute.cbean.coption.CursorSelectOption;
|
||||
import org.dbflute.cbean.result.ListResultBean;
|
||||
import org.dbflute.exception.FetchingOverSafetySizeException;
|
||||
import org.dbflute.exception.IllegalBehaviorStateException;
|
||||
import org.dbflute.util.DfTypeUtil;
|
||||
import org.elasticsearch.action.bulk.BulkItemResponse;
|
||||
|
@ -87,6 +88,19 @@ public abstract class EsAbstractBehavior<ENTITY extends Entity, CB extends Condi
|
|||
return (int) ((EsAbstractConditionBean) cb).build(builder).execute().actionGet().getCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected <RESULT extends ENTITY> RESULT delegateSelectEntity(final ConditionBean cb, final Class<? extends RESULT> entityType) {
|
||||
final List<? extends RESULT> list = delegateSelectList(cb, entityType);
|
||||
if (list.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
if (list.size() >= 2) {
|
||||
String msg = "The size of selected list is over 1: " + list.size();
|
||||
throw new FetchingOverSafetySizeException(msg, 1); // immediatly catched by caller and tranlated
|
||||
}
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected <RESULT extends ENTITY> List<RESULT> delegateSelectList(final ConditionBean cb, final Class<? extends RESULT> entityType) {
|
||||
// #pending check response
|
||||
|
|
Loading…
Add table
Reference in a new issue