This commit is contained in:
Shinsuke Sugaya 2014-10-12 17:52:15 +09:00
parent 4c00d81a7b
commit 1c1de46c43
215 changed files with 27669 additions and 12623 deletions

View file

@ -1,3 +1,142 @@
boostDocumentRule.ignored=false
boostDocumentRule.importPackages=import jp.sf.fess.Constants;import jp.sf.fess.annotation.UriType;import org.seasar.struts.annotation.Maxbytelength;import org.seasar.struts.annotation.IntRange;import org.seasar.struts.annotation.LongRange;import org.seasar.struts.annotation.FloatRange;
boostDocumentRule.converterToSearchParams=
boostDocumentRule.converterToPager=
boostDocumentRule.converterToActionForm=
boostDocumentRule.converterToEntity=
boostDocumentRule.id.requiredParam=
boostDocumentRule.id.additionalAnnotation=
boostDocumentRule.id.annotation=
boostDocumentRule.id.enableJavaType=true
boostDocumentRule.id.longTypeParam=
boostDocumentRule.id.integerTypeParam=
boostDocumentRule.id.shortTypeParam=
boostDocumentRule.id.byteTypeParam=
boostDocumentRule.id.floatTypeParam=
boostDocumentRule.id.doubleTypeParam=
boostDocumentRule.id.dateTypeParam=
boostDocumentRule.id.defaultValue=
boostDocumentRule.urlExpr.requiredParam=
boostDocumentRule.urlExpr.additionalAnnotation=@Maxbytelength(maxbytelength = 4000)
boostDocumentRule.urlExpr.annotation=
boostDocumentRule.urlExpr.enableJavaType=true
boostDocumentRule.urlExpr.longTypeParam=
boostDocumentRule.urlExpr.integerTypeParam=
boostDocumentRule.urlExpr.shortTypeParam=
boostDocumentRule.urlExpr.byteTypeParam=
boostDocumentRule.urlExpr.floatTypeParam=
boostDocumentRule.urlExpr.doubleTypeParam=
boostDocumentRule.urlExpr.dateTypeParam=
boostDocumentRule.urlExpr.defaultValue=
boostDocumentRule.boostExpr.requiredParam=
boostDocumentRule.boostExpr.additionalAnnotation=@Maxbytelength(maxbytelength = 4000)
boostDocumentRule.boostExpr.annotation=
boostDocumentRule.boostExpr.enableJavaType=true
boostDocumentRule.boostExpr.longTypeParam=
boostDocumentRule.boostExpr.integerTypeParam=
boostDocumentRule.boostExpr.shortTypeParam=
boostDocumentRule.boostExpr.byteTypeParam=
boostDocumentRule.boostExpr.floatTypeParam=
boostDocumentRule.boostExpr.doubleTypeParam=
boostDocumentRule.boostExpr.dateTypeParam=
boostDocumentRule.boostExpr.defaultValue=
boostDocumentRule.sortOrder.requiredParam=
boostDocumentRule.sortOrder.additionalAnnotation=@IntRange(min = 0, max = 2147483647)
boostDocumentRule.sortOrder.annotation=
boostDocumentRule.sortOrder.enableJavaType=true
boostDocumentRule.sortOrder.longTypeParam=
boostDocumentRule.sortOrder.integerTypeParam=
boostDocumentRule.sortOrder.shortTypeParam=
boostDocumentRule.sortOrder.byteTypeParam=
boostDocumentRule.sortOrder.floatTypeParam=
boostDocumentRule.sortOrder.doubleTypeParam=
boostDocumentRule.sortOrder.dateTypeParam=
boostDocumentRule.sortOrder.defaultValue=
boostDocumentRule.createdBy.requiredParam=(target = "confirmfromupdate,update,delete")
boostDocumentRule.createdBy.additionalAnnotation=@Maxbytelength(maxbytelength = 255)
boostDocumentRule.createdBy.annotation=
boostDocumentRule.createdBy.enableJavaType=true
boostDocumentRule.createdBy.longTypeParam=
boostDocumentRule.createdBy.integerTypeParam=
boostDocumentRule.createdBy.shortTypeParam=
boostDocumentRule.createdBy.byteTypeParam=
boostDocumentRule.createdBy.floatTypeParam=
boostDocumentRule.createdBy.doubleTypeParam=
boostDocumentRule.createdBy.dateTypeParam=
boostDocumentRule.createdBy.defaultValue=
boostDocumentRule.createdTime.requiredParam=(target = "confirmfromupdate,update,delete")
boostDocumentRule.createdTime.additionalAnnotation=
boostDocumentRule.createdTime.annotation=
boostDocumentRule.createdTime.enableJavaType=true
boostDocumentRule.createdTime.longTypeParam=
boostDocumentRule.createdTime.integerTypeParam=
boostDocumentRule.createdTime.shortTypeParam=
boostDocumentRule.createdTime.byteTypeParam=
boostDocumentRule.createdTime.floatTypeParam=
boostDocumentRule.createdTime.doubleTypeParam=
boostDocumentRule.createdTime.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
boostDocumentRule.createdTime.defaultValue=
boostDocumentRule.updatedBy.requiredParam=
boostDocumentRule.updatedBy.additionalAnnotation=@Maxbytelength(maxbytelength = 255)
boostDocumentRule.updatedBy.annotation=
boostDocumentRule.updatedBy.enableJavaType=true
boostDocumentRule.updatedBy.longTypeParam=
boostDocumentRule.updatedBy.integerTypeParam=
boostDocumentRule.updatedBy.shortTypeParam=
boostDocumentRule.updatedBy.byteTypeParam=
boostDocumentRule.updatedBy.floatTypeParam=
boostDocumentRule.updatedBy.doubleTypeParam=
boostDocumentRule.updatedBy.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
boostDocumentRule.updatedBy.defaultValue=
boostDocumentRule.updatedTime.requiredParam=
boostDocumentRule.updatedTime.additionalAnnotation=
boostDocumentRule.updatedTime.annotation=
boostDocumentRule.updatedTime.enableJavaType=true
boostDocumentRule.updatedTime.longTypeParam=
boostDocumentRule.updatedTime.integerTypeParam=
boostDocumentRule.updatedTime.shortTypeParam=
boostDocumentRule.updatedTime.byteTypeParam=
boostDocumentRule.updatedTime.floatTypeParam=
boostDocumentRule.updatedTime.doubleTypeParam=
boostDocumentRule.updatedTime.dateTypeParam=
boostDocumentRule.updatedTime.defaultValue=
boostDocumentRule.deletedBy.requiredParam=
boostDocumentRule.deletedBy.additionalAnnotation=
boostDocumentRule.deletedBy.annotation=
boostDocumentRule.deletedBy.enableJavaType=true
boostDocumentRule.deletedBy.longTypeParam=
boostDocumentRule.deletedBy.integerTypeParam=
boostDocumentRule.deletedBy.shortTypeParam=
boostDocumentRule.deletedBy.byteTypeParam=
boostDocumentRule.deletedBy.floatTypeParam=
boostDocumentRule.deletedBy.doubleTypeParam=
boostDocumentRule.deletedBy.dateTypeParam=
boostDocumentRule.deletedBy.defaultValue=
boostDocumentRule.deletedTime.requiredParam=
boostDocumentRule.deletedTime.additionalAnnotation=
boostDocumentRule.deletedTime.annotation=
boostDocumentRule.deletedTime.enableJavaType=true
boostDocumentRule.deletedTime.longTypeParam=
boostDocumentRule.deletedTime.integerTypeParam=
boostDocumentRule.deletedTime.shortTypeParam=
boostDocumentRule.deletedTime.byteTypeParam=
boostDocumentRule.deletedTime.floatTypeParam=
boostDocumentRule.deletedTime.doubleTypeParam=
boostDocumentRule.deletedTime.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
boostDocumentRule.deletedTime.defaultValue=
boostDocumentRule.versionNo.requiredParam=(target = "confirmfromupdate,update,delete")
boostDocumentRule.versionNo.additionalAnnotation=
boostDocumentRule.versionNo.annotation=
boostDocumentRule.versionNo.enableJavaType=true
boostDocumentRule.versionNo.longTypeParam=
boostDocumentRule.versionNo.integerTypeParam=
boostDocumentRule.versionNo.shortTypeParam=
boostDocumentRule.versionNo.byteTypeParam=
boostDocumentRule.versionNo.floatTypeParam=
boostDocumentRule.versionNo.doubleTypeParam=
boostDocumentRule.versionNo.dateTypeParam=
boostDocumentRule.versionNo.defaultValue=
clickLog.ignored=true
crawlingSession.ignored=false
@ -164,7 +303,7 @@ dataCrawlingConfig.available.doubleTypeParam=
dataCrawlingConfig.available.dateTypeParam=
dataCrawlingConfig.available.defaultValue=
dataCrawlingConfig.sortOrder.requiredParam=(target = "confirmfromupdate,update,delete")
dataCrawlingConfig.sortOrder.additionalAnnotation=
dataCrawlingConfig.sortOrder.additionalAnnotation=@IntRange(min = 0, max = 2147483647)
dataCrawlingConfig.sortOrder.annotation=
dataCrawlingConfig.sortOrder.enableJavaType=true
dataCrawlingConfig.sortOrder.longTypeParam=
@ -784,7 +923,7 @@ fileCrawlingConfig.available.doubleTypeParam=
fileCrawlingConfig.available.dateTypeParam=
fileCrawlingConfig.available.defaultValue=
fileCrawlingConfig.sortOrder.requiredParam=(target = "confirmfromupdate,update,delete")
fileCrawlingConfig.sortOrder.additionalAnnotation=
fileCrawlingConfig.sortOrder.additionalAnnotation=@IntRange(min = 0, max = 2147483647)
fileCrawlingConfig.sortOrder.annotation=
fileCrawlingConfig.sortOrder.enableJavaType=true
fileCrawlingConfig.sortOrder.longTypeParam=
@ -2255,6 +2394,308 @@ searchLog.userId.doubleTypeParam=
searchLog.userId.dateTypeParam=
searchLog.userId.defaultValue=
suggestBadWord.ignored=false
suggestBadWord.importPackages=import jp.sf.fess.Constants;import jp.sf.fess.annotation.UriType;import org.seasar.struts.annotation.Maxbytelength;import org.seasar.struts.annotation.IntRange;import org.seasar.struts.annotation.LongRange;import org.seasar.struts.annotation.FloatRange;
suggestBadWord.converterToSearchParams=
suggestBadWord.converterToPager=
suggestBadWord.converterToActionForm=
suggestBadWord.converterToEntity=
suggestBadWord.id.requiredParam=
suggestBadWord.id.additionalAnnotation=
suggestBadWord.id.annotation=
suggestBadWord.id.enableJavaType=true
suggestBadWord.id.longTypeParam=
suggestBadWord.id.integerTypeParam=
suggestBadWord.id.shortTypeParam=
suggestBadWord.id.byteTypeParam=
suggestBadWord.id.floatTypeParam=
suggestBadWord.id.doubleTypeParam=
suggestBadWord.id.dateTypeParam=
suggestBadWord.id.defaultValue=
suggestBadWord.suggestWord.requiredParam=
suggestBadWord.suggestWord.additionalAnnotation=
suggestBadWord.suggestWord.annotation=
suggestBadWord.suggestWord.enableJavaType=true
suggestBadWord.suggestWord.longTypeParam=
suggestBadWord.suggestWord.integerTypeParam=
suggestBadWord.suggestWord.shortTypeParam=
suggestBadWord.suggestWord.byteTypeParam=
suggestBadWord.suggestWord.floatTypeParam=
suggestBadWord.suggestWord.doubleTypeParam=
suggestBadWord.suggestWord.dateTypeParam=
suggestBadWord.suggestWord.defaultValue=
suggestBadWord.targetRole.requiredParam=
suggestBadWord.targetRole.additionalAnnotation=
suggestBadWord.targetRole.annotation=
suggestBadWord.targetRole.enableJavaType=true
suggestBadWord.targetRole.longTypeParam=
suggestBadWord.targetRole.integerTypeParam=
suggestBadWord.targetRole.shortTypeParam=
suggestBadWord.targetRole.byteTypeParam=
suggestBadWord.targetRole.floatTypeParam=
suggestBadWord.targetRole.doubleTypeParam=
suggestBadWord.targetRole.dateTypeParam=
suggestBadWord.targetRole.defaultValue=
suggestBadWord.targetLabel.requiredParam=
suggestBadWord.targetLabel.additionalAnnotation=
suggestBadWord.targetLabel.annotation=
suggestBadWord.targetLabel.enableJavaType=true
suggestBadWord.targetLabel.longTypeParam=
suggestBadWord.targetLabel.integerTypeParam=
suggestBadWord.targetLabel.shortTypeParam=
suggestBadWord.targetLabel.byteTypeParam=
suggestBadWord.targetLabel.floatTypeParam=
suggestBadWord.targetLabel.doubleTypeParam=
suggestBadWord.targetLabel.dateTypeParam=
suggestBadWord.targetLabel.defaultValue=
suggestBadWord.createdBy.requiredParam=(target = "confirmfromupdate,update,delete")
suggestBadWord.createdBy.additionalAnnotation=@Maxbytelength(maxbytelength = 255)
suggestBadWord.createdBy.annotation=
suggestBadWord.createdBy.enableJavaType=true
suggestBadWord.createdBy.longTypeParam=
suggestBadWord.createdBy.integerTypeParam=
suggestBadWord.createdBy.shortTypeParam=
suggestBadWord.createdBy.byteTypeParam=
suggestBadWord.createdBy.floatTypeParam=
suggestBadWord.createdBy.doubleTypeParam=
suggestBadWord.createdBy.dateTypeParam=
suggestBadWord.createdBy.defaultValue=
suggestBadWord.createdTime.requiredParam=(target = "confirmfromupdate,update,delete")
suggestBadWord.createdTime.additionalAnnotation=
suggestBadWord.createdTime.annotation=
suggestBadWord.createdTime.enableJavaType=true
suggestBadWord.createdTime.longTypeParam=
suggestBadWord.createdTime.integerTypeParam=
suggestBadWord.createdTime.shortTypeParam=
suggestBadWord.createdTime.byteTypeParam=
suggestBadWord.createdTime.floatTypeParam=
suggestBadWord.createdTime.doubleTypeParam=
suggestBadWord.createdTime.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
suggestBadWord.createdTime.defaultValue=
suggestBadWord.updatedBy.requiredParam=
suggestBadWord.updatedBy.additionalAnnotation=@Maxbytelength(maxbytelength = 255)
suggestBadWord.updatedBy.annotation=
suggestBadWord.updatedBy.enableJavaType=true
suggestBadWord.updatedBy.longTypeParam=
suggestBadWord.updatedBy.integerTypeParam=
suggestBadWord.updatedBy.shortTypeParam=
suggestBadWord.updatedBy.byteTypeParam=
suggestBadWord.updatedBy.floatTypeParam=
suggestBadWord.updatedBy.doubleTypeParam=
suggestBadWord.updatedBy.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
suggestBadWord.updatedBy.defaultValue=
suggestBadWord.updatedTime.requiredParam=
suggestBadWord.updatedTime.additionalAnnotation=
suggestBadWord.updatedTime.annotation=
suggestBadWord.updatedTime.enableJavaType=true
suggestBadWord.updatedTime.longTypeParam=
suggestBadWord.updatedTime.integerTypeParam=
suggestBadWord.updatedTime.shortTypeParam=
suggestBadWord.updatedTime.byteTypeParam=
suggestBadWord.updatedTime.floatTypeParam=
suggestBadWord.updatedTime.doubleTypeParam=
suggestBadWord.updatedTime.dateTypeParam=
suggestBadWord.updatedTime.defaultValue=
suggestBadWord.deletedBy.requiredParam=
suggestBadWord.deletedBy.additionalAnnotation=
suggestBadWord.deletedBy.annotation=
suggestBadWord.deletedBy.enableJavaType=true
suggestBadWord.deletedBy.longTypeParam=
suggestBadWord.deletedBy.integerTypeParam=
suggestBadWord.deletedBy.shortTypeParam=
suggestBadWord.deletedBy.byteTypeParam=
suggestBadWord.deletedBy.floatTypeParam=
suggestBadWord.deletedBy.doubleTypeParam=
suggestBadWord.deletedBy.dateTypeParam=
suggestBadWord.deletedBy.defaultValue=
suggestBadWord.deletedTime.requiredParam=
suggestBadWord.deletedTime.additionalAnnotation=
suggestBadWord.deletedTime.annotation=
suggestBadWord.deletedTime.enableJavaType=true
suggestBadWord.deletedTime.longTypeParam=
suggestBadWord.deletedTime.integerTypeParam=
suggestBadWord.deletedTime.shortTypeParam=
suggestBadWord.deletedTime.byteTypeParam=
suggestBadWord.deletedTime.floatTypeParam=
suggestBadWord.deletedTime.doubleTypeParam=
suggestBadWord.deletedTime.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
suggestBadWord.deletedTime.defaultValue=
suggestBadWord.versionNo.requiredParam=(target = "confirmfromupdate,update,delete")
suggestBadWord.versionNo.additionalAnnotation=
suggestBadWord.versionNo.annotation=
suggestBadWord.versionNo.enableJavaType=true
suggestBadWord.versionNo.longTypeParam=
suggestBadWord.versionNo.integerTypeParam=
suggestBadWord.versionNo.shortTypeParam=
suggestBadWord.versionNo.byteTypeParam=
suggestBadWord.versionNo.floatTypeParam=
suggestBadWord.versionNo.doubleTypeParam=
suggestBadWord.versionNo.dateTypeParam=
suggestBadWord.versionNo.defaultValue=
suggestElevateWord.ignored=false
suggestElevateWord.importPackages=import jp.sf.fess.Constants;import jp.sf.fess.annotation.UriType;import org.seasar.struts.annotation.Maxbytelength;import org.seasar.struts.annotation.IntRange;import org.seasar.struts.annotation.LongRange;import org.seasar.struts.annotation.FloatRange;
suggestElevateWord.converterToSearchParams=
suggestElevateWord.converterToPager=
suggestElevateWord.converterToActionForm=
suggestElevateWord.converterToEntity=
suggestElevateWord.id.requiredParam=
suggestElevateWord.id.additionalAnnotation=
suggestElevateWord.id.annotation=
suggestElevateWord.id.enableJavaType=true
suggestElevateWord.id.longTypeParam=
suggestElevateWord.id.integerTypeParam=
suggestElevateWord.id.shortTypeParam=
suggestElevateWord.id.byteTypeParam=
suggestElevateWord.id.floatTypeParam=
suggestElevateWord.id.doubleTypeParam=
suggestElevateWord.id.dateTypeParam=
suggestElevateWord.id.defaultValue=
suggestElevateWord.suggestWord.requiredParam=
suggestElevateWord.suggestWord.additionalAnnotation=
suggestElevateWord.suggestWord.annotation=
suggestElevateWord.suggestWord.enableJavaType=true
suggestElevateWord.suggestWord.longTypeParam=
suggestElevateWord.suggestWord.integerTypeParam=
suggestElevateWord.suggestWord.shortTypeParam=
suggestElevateWord.suggestWord.byteTypeParam=
suggestElevateWord.suggestWord.floatTypeParam=
suggestElevateWord.suggestWord.doubleTypeParam=
suggestElevateWord.suggestWord.dateTypeParam=
suggestElevateWord.suggestWord.defaultValue=
suggestElevateWord.reading.requiredParam=
suggestElevateWord.reading.additionalAnnotation=
suggestElevateWord.reading.annotation=
suggestElevateWord.reading.enableJavaType=true
suggestElevateWord.reading.longTypeParam=
suggestElevateWord.reading.integerTypeParam=
suggestElevateWord.reading.shortTypeParam=
suggestElevateWord.reading.byteTypeParam=
suggestElevateWord.reading.floatTypeParam=
suggestElevateWord.reading.doubleTypeParam=
suggestElevateWord.reading.dateTypeParam=
suggestElevateWord.reading.defaultValue=
suggestElevateWord.targetRole.requiredParam=
suggestElevateWord.targetRole.additionalAnnotation=
suggestElevateWord.targetRole.annotation=
suggestElevateWord.targetRole.enableJavaType=true
suggestElevateWord.targetRole.longTypeParam=
suggestElevateWord.targetRole.integerTypeParam=
suggestElevateWord.targetRole.shortTypeParam=
suggestElevateWord.targetRole.byteTypeParam=
suggestElevateWord.targetRole.floatTypeParam=
suggestElevateWord.targetRole.doubleTypeParam=
suggestElevateWord.targetRole.dateTypeParam=
suggestElevateWord.targetRole.defaultValue=
suggestElevateWord.targetLabel.requiredParam=
suggestElevateWord.targetLabel.additionalAnnotation=
suggestElevateWord.targetLabel.annotation=
suggestElevateWord.targetLabel.enableJavaType=true
suggestElevateWord.targetLabel.longTypeParam=
suggestElevateWord.targetLabel.integerTypeParam=
suggestElevateWord.targetLabel.shortTypeParam=
suggestElevateWord.targetLabel.byteTypeParam=
suggestElevateWord.targetLabel.floatTypeParam=
suggestElevateWord.targetLabel.doubleTypeParam=
suggestElevateWord.targetLabel.dateTypeParam=
suggestElevateWord.targetLabel.defaultValue=
suggestElevateWord.boost.requiredParam=
suggestElevateWord.boost.additionalAnnotation=@IntRange(min = 0, max = 2147483647)
suggestElevateWord.boost.annotation=
suggestElevateWord.boost.enableJavaType=true
suggestElevateWord.boost.longTypeParam=
suggestElevateWord.boost.integerTypeParam=
suggestElevateWord.boost.shortTypeParam=
suggestElevateWord.boost.byteTypeParam=
suggestElevateWord.boost.floatTypeParam=
suggestElevateWord.boost.doubleTypeParam=
suggestElevateWord.boost.dateTypeParam=
suggestElevateWord.boost.defaultValue=
suggestElevateWord.createdBy.requiredParam=(target = "confirmfromupdate,update,delete")
suggestElevateWord.createdBy.additionalAnnotation=@Maxbytelength(maxbytelength = 255)
suggestElevateWord.createdBy.annotation=
suggestElevateWord.createdBy.enableJavaType=true
suggestElevateWord.createdBy.longTypeParam=
suggestElevateWord.createdBy.integerTypeParam=
suggestElevateWord.createdBy.shortTypeParam=
suggestElevateWord.createdBy.byteTypeParam=
suggestElevateWord.createdBy.floatTypeParam=
suggestElevateWord.createdBy.doubleTypeParam=
suggestElevateWord.createdBy.dateTypeParam=
suggestElevateWord.createdBy.defaultValue=
suggestElevateWord.createdTime.requiredParam=(target = "confirmfromupdate,update,delete")
suggestElevateWord.createdTime.additionalAnnotation=
suggestElevateWord.createdTime.annotation=
suggestElevateWord.createdTime.enableJavaType=true
suggestElevateWord.createdTime.longTypeParam=
suggestElevateWord.createdTime.integerTypeParam=
suggestElevateWord.createdTime.shortTypeParam=
suggestElevateWord.createdTime.byteTypeParam=
suggestElevateWord.createdTime.floatTypeParam=
suggestElevateWord.createdTime.doubleTypeParam=
suggestElevateWord.createdTime.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
suggestElevateWord.createdTime.defaultValue=
suggestElevateWord.updatedBy.requiredParam=
suggestElevateWord.updatedBy.additionalAnnotation=@Maxbytelength(maxbytelength = 255)
suggestElevateWord.updatedBy.annotation=
suggestElevateWord.updatedBy.enableJavaType=true
suggestElevateWord.updatedBy.longTypeParam=
suggestElevateWord.updatedBy.integerTypeParam=
suggestElevateWord.updatedBy.shortTypeParam=
suggestElevateWord.updatedBy.byteTypeParam=
suggestElevateWord.updatedBy.floatTypeParam=
suggestElevateWord.updatedBy.doubleTypeParam=
suggestElevateWord.updatedBy.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
suggestElevateWord.updatedBy.defaultValue=
suggestElevateWord.updatedTime.requiredParam=
suggestElevateWord.updatedTime.additionalAnnotation=
suggestElevateWord.updatedTime.annotation=
suggestElevateWord.updatedTime.enableJavaType=true
suggestElevateWord.updatedTime.longTypeParam=
suggestElevateWord.updatedTime.integerTypeParam=
suggestElevateWord.updatedTime.shortTypeParam=
suggestElevateWord.updatedTime.byteTypeParam=
suggestElevateWord.updatedTime.floatTypeParam=
suggestElevateWord.updatedTime.doubleTypeParam=
suggestElevateWord.updatedTime.dateTypeParam=
suggestElevateWord.updatedTime.defaultValue=
suggestElevateWord.deletedBy.requiredParam=
suggestElevateWord.deletedBy.additionalAnnotation=
suggestElevateWord.deletedBy.annotation=
suggestElevateWord.deletedBy.enableJavaType=true
suggestElevateWord.deletedBy.longTypeParam=
suggestElevateWord.deletedBy.integerTypeParam=
suggestElevateWord.deletedBy.shortTypeParam=
suggestElevateWord.deletedBy.byteTypeParam=
suggestElevateWord.deletedBy.floatTypeParam=
suggestElevateWord.deletedBy.doubleTypeParam=
suggestElevateWord.deletedBy.dateTypeParam=
suggestElevateWord.deletedBy.defaultValue=
suggestElevateWord.deletedTime.requiredParam=
suggestElevateWord.deletedTime.additionalAnnotation=
suggestElevateWord.deletedTime.annotation=
suggestElevateWord.deletedTime.enableJavaType=true
suggestElevateWord.deletedTime.longTypeParam=
suggestElevateWord.deletedTime.integerTypeParam=
suggestElevateWord.deletedTime.shortTypeParam=
suggestElevateWord.deletedTime.byteTypeParam=
suggestElevateWord.deletedTime.floatTypeParam=
suggestElevateWord.deletedTime.doubleTypeParam=
suggestElevateWord.deletedTime.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
suggestElevateWord.deletedTime.defaultValue=
suggestElevateWord.versionNo.requiredParam=(target = "confirmfromupdate,update,delete")
suggestElevateWord.versionNo.additionalAnnotation=
suggestElevateWord.versionNo.annotation=
suggestElevateWord.versionNo.enableJavaType=true
suggestElevateWord.versionNo.longTypeParam=
suggestElevateWord.versionNo.integerTypeParam=
suggestElevateWord.versionNo.shortTypeParam=
suggestElevateWord.versionNo.byteTypeParam=
suggestElevateWord.versionNo.floatTypeParam=
suggestElevateWord.versionNo.doubleTypeParam=
suggestElevateWord.versionNo.dateTypeParam=
suggestElevateWord.versionNo.defaultValue=
userInfo.ignored=false
userInfo.importPackages=import jp.sf.fess.Constants;import jp.sf.fess.annotation.UriType;import org.seasar.struts.annotation.Maxbytelength;import org.seasar.struts.annotation.IntRange;import org.seasar.struts.annotation.LongRange;import org.seasar.struts.annotation.FloatRange;
userInfo.converterToSearchParams=

View file

@ -253,7 +253,7 @@ public class Constants extends CoreLibConstants {
public static final String SAMBA = "SAMBA";
public static final String[] RESERVED = { "+", "-", "&&", "||", "!", "(",
")", "{", "}", "[", "]", "^", "~", "*", "?", "\\", ";", ":", "/" };
")", "{", "}", "[", "]", "^", "~", "*", "?", "\\", ";", ":", "/" };
public static final Pattern SOLR_FIELD_RESERVED_PATTERN = Pattern
.compile("([+\\-!\\(\\){}\\[\\]^\"~\\\\:\\p{Zs}]|(&&)|(\\|\\|))"); // "*", "?",

View file

@ -0,0 +1,136 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.action.admin;
import java.sql.Timestamp;
import javax.annotation.Resource;
import jp.sf.fess.crud.CommonConstants;
import jp.sf.fess.crud.CrudMessageException;
import jp.sf.fess.crud.action.admin.BsBoostDocumentRuleAction;
import jp.sf.fess.crud.util.SAStrutsUtil;
import jp.sf.fess.db.exentity.BoostDocumentRule;
import jp.sf.fess.helper.SystemHelper;
import jp.sf.fess.util.FessBeans;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codelibs.sastruts.core.exception.SSCActionMessagesException;
import org.seasar.struts.annotation.Execute;
import org.seasar.struts.exception.ActionMessagesException;
public class BoostDocumentRuleAction extends BsBoostDocumentRuleAction {
private static final long serialVersionUID = 1L;
private static final Log log = LogFactory
.getLog(BoostDocumentRuleAction.class);
@Resource
protected SystemHelper systemHelper;
public String getHelpLink() {
return systemHelper.getHelpLink("boostDocumentRule");
}
@Override
protected void loadBoostDocumentRule() {
final BoostDocumentRule boostDocumentRule = boostDocumentRuleService
.getBoostDocumentRule(createKeyMap());
if (boostDocumentRule == null) {
// throw an exception
throw new SSCActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { boostDocumentRuleForm.id });
}
FessBeans.copy(boostDocumentRule, boostDocumentRuleForm)
.commonColumnDateConverter().excludes("searchParams", "mode")
.execute();
}
@Override
protected BoostDocumentRule createBoostDocumentRule() {
BoostDocumentRule boostDocumentRule;
final String username = systemHelper.getUsername();
final Timestamp timestamp = systemHelper.getCurrentTimestamp();
if (boostDocumentRuleForm.crudMode == CommonConstants.EDIT_MODE) {
boostDocumentRule = boostDocumentRuleService
.getBoostDocumentRule(createKeyMap());
if (boostDocumentRule == null) {
// throw an exception
throw new SSCActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { boostDocumentRuleForm.id });
}
} else {
boostDocumentRule = new BoostDocumentRule();
boostDocumentRule.setCreatedBy(username);
boostDocumentRule.setCreatedTime(timestamp);
}
boostDocumentRule.setUpdatedBy(username);
boostDocumentRule.setUpdatedTime(timestamp);
FessBeans.copy(boostDocumentRuleForm, boostDocumentRule)
.excludesCommonColumns().execute();
return boostDocumentRule;
}
@Override
@Execute(validator = false, input = "error.jsp")
public String delete() {
if (boostDocumentRuleForm.crudMode != CommonConstants.DELETE_MODE) {
throw new SSCActionMessagesException("errors.crud_invalid_mode",
new Object[] { CommonConstants.DELETE_MODE,
boostDocumentRuleForm.crudMode });
}
try {
final BoostDocumentRule boostDocumentRule = boostDocumentRuleService
.getBoostDocumentRule(createKeyMap());
if (boostDocumentRule == null) {
// throw an exception
throw new SSCActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { boostDocumentRuleForm.id });
}
// boostDocumentRuleService.delete(boostDocumentRule);
final String username = systemHelper.getUsername();
final Timestamp timestamp = systemHelper.getCurrentTimestamp();
boostDocumentRule.setDeletedBy(username);
boostDocumentRule.setDeletedTime(timestamp);
boostDocumentRuleService.store(boostDocumentRule);
SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table");
return displayList(true);
} catch (final ActionMessagesException e) {
log.error(e.getMessage(), e);
throw e;
} catch (final CrudMessageException e) {
log.error(e.getMessage(), e);
throw new SSCActionMessagesException(e, e.getMessageId(),
e.getArgs());
} catch (final Exception e) {
log.error(e.getMessage(), e);
throw new SSCActionMessagesException(e,
"errors.crud_failed_to_delete_crud_table");
}
}
}

View file

@ -133,74 +133,74 @@ public class CrawlAction implements Serializable {
@Execute(validator = true, input = "index.jsp")
public String update() {
crawlerProperties
.setProperty(
Constants.DIFF_CRAWLING_PROPERTY,
crawlForm.diffCrawling != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.diffCrawling) ? Constants.TRUE
: Constants.FALSE);
.setProperty(
Constants.DIFF_CRAWLING_PROPERTY,
crawlForm.diffCrawling != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.diffCrawling) ? Constants.TRUE
: Constants.FALSE);
crawlerProperties
.setProperty(
Constants.USE_ACL_AS_ROLE,
crawlForm.useAclAsRole != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.useAclAsRole) ? Constants.TRUE
: Constants.FALSE);
.setProperty(
Constants.USE_ACL_AS_ROLE,
crawlForm.useAclAsRole != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.useAclAsRole) ? Constants.TRUE
: Constants.FALSE);
crawlerProperties
.setProperty(
Constants.SERVER_ROTATION_PROPERTY,
crawlForm.serverRotation != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.serverRotation) ? Constants.TRUE
: Constants.FALSE);
.setProperty(
Constants.SERVER_ROTATION_PROPERTY,
crawlForm.serverRotation != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.serverRotation) ? Constants.TRUE
: Constants.FALSE);
crawlerProperties.setProperty(Constants.DAY_FOR_CLEANUP_PROPERTY,
crawlForm.dayForCleanup);
crawlerProperties.setProperty(Constants.CRAWLING_THREAD_COUNT_PROPERTY,
crawlForm.crawlingThreadCount);
crawlerProperties
.setProperty(
Constants.SEARCH_LOG_PROPERTY,
crawlForm.searchLog != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.searchLog) ? Constants.TRUE
: Constants.FALSE);
.setProperty(
Constants.SEARCH_LOG_PROPERTY,
crawlForm.searchLog != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.searchLog) ? Constants.TRUE
: Constants.FALSE);
crawlerProperties
.setProperty(
Constants.USER_INFO_PROPERTY,
crawlForm.userInfo != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.userInfo) ? Constants.TRUE
: Constants.FALSE);
.setProperty(
Constants.USER_INFO_PROPERTY,
crawlForm.userInfo != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.userInfo) ? Constants.TRUE
: Constants.FALSE);
crawlerProperties
.setProperty(
Constants.USER_FAVORITE_PROPERTY,
crawlForm.userFavorite != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.userFavorite) ? Constants.TRUE
: Constants.FALSE);
.setProperty(
Constants.USER_FAVORITE_PROPERTY,
crawlForm.userFavorite != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.userFavorite) ? Constants.TRUE
: Constants.FALSE);
crawlerProperties
.setProperty(
Constants.WEB_API_XML_PROPERTY,
crawlForm.webApiXml != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.webApiXml) ? Constants.TRUE
: Constants.FALSE);
.setProperty(
Constants.WEB_API_XML_PROPERTY,
crawlForm.webApiXml != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.webApiXml) ? Constants.TRUE
: Constants.FALSE);
crawlerProperties
.setProperty(
Constants.WEB_API_JSON_PROPERTY,
crawlForm.webApiJson != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.webApiJson) ? Constants.TRUE
: Constants.FALSE);
.setProperty(
Constants.WEB_API_JSON_PROPERTY,
crawlForm.webApiJson != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.webApiJson) ? Constants.TRUE
: Constants.FALSE);
crawlerProperties.setProperty(Constants.DEFAULT_LABEL_VALUE_PROPERTY,
crawlForm.defaultLabelValue);
crawlerProperties
.setProperty(
Constants.APPEND_QUERY_PARAMETER_PROPERTY,
crawlForm.appendQueryParameter != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.appendQueryParameter) ? Constants.TRUE
: Constants.FALSE);
.setProperty(
Constants.APPEND_QUERY_PARAMETER_PROPERTY,
crawlForm.appendQueryParameter != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.appendQueryParameter) ? Constants.TRUE
: Constants.FALSE);
crawlerProperties.setProperty(
Constants.SUPPORTED_SEARCH_FEATURE_PROPERTY,
crawlForm.supportedSearch);
@ -210,12 +210,12 @@ public class CrawlAction implements Serializable {
Constants.FAILURE_COUNT_THRESHOLD_PROPERTY,
crawlForm.failureCountThreshold);
crawlerProperties
.setProperty(
Constants.WEB_API_HOT_SEARCH_WORD_PROPERTY,
crawlForm.hotSearchWord != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.hotSearchWord) ? Constants.TRUE
: Constants.FALSE);
.setProperty(
Constants.WEB_API_HOT_SEARCH_WORD_PROPERTY,
crawlForm.hotSearchWord != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.hotSearchWord) ? Constants.TRUE
: Constants.FALSE);
crawlerProperties.setProperty(Constants.CSV_FILE_ENCODING_PROPERTY,
crawlForm.csvFileEncoding);
crawlerProperties.setProperty(Constants.PURGE_SEARCH_LOG_DAY_PROPERTY,
@ -229,12 +229,12 @@ public class CrawlAction implements Serializable {
crawlerProperties.setProperty(Constants.NOTIFICATION_TO_PROPERTY,
crawlForm.notificationTo);
crawlerProperties
.setProperty(
Constants.SUGGEST_SEARCH_LOG_PROPERTY,
crawlForm.suggestSearchLog != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.suggestSearchLog) ? Constants.TRUE
: Constants.FALSE);
.setProperty(
Constants.SUGGEST_SEARCH_LOG_PROPERTY,
crawlForm.suggestSearchLog != null
&& Constants.ON
.equalsIgnoreCase(crawlForm.suggestSearchLog) ? Constants.TRUE
: Constants.FALSE);
crawlerProperties.setProperty(
Constants.PURGE_SUGGEST_SEARCH_LOG_DAY_PROPERTY,
crawlForm.purgeSuggestSearchLogDay);

View file

@ -0,0 +1,136 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.action.admin;
import java.sql.Timestamp;
import javax.annotation.Resource;
import jp.sf.fess.crud.CommonConstants;
import jp.sf.fess.crud.CrudMessageException;
import jp.sf.fess.crud.action.admin.BsSuggestBadWordAction;
import jp.sf.fess.crud.util.SAStrutsUtil;
import jp.sf.fess.db.exentity.SuggestBadWord;
import jp.sf.fess.helper.SystemHelper;
import jp.sf.fess.util.FessBeans;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codelibs.sastruts.core.exception.SSCActionMessagesException;
import org.seasar.struts.annotation.Execute;
import org.seasar.struts.exception.ActionMessagesException;
public class SuggestBadWordAction extends BsSuggestBadWordAction {
private static final long serialVersionUID = 1L;
private static final Log log = LogFactory
.getLog(SuggestBadWordAction.class);
@Resource
protected SystemHelper systemHelper;
public String getHelpLink() {
return systemHelper.getHelpLink("suggestBadWord");
}
@Override
protected void loadSuggestBadWord() {
final SuggestBadWord suggestBadWord = suggestBadWordService
.getSuggestBadWord(createKeyMap());
if (suggestBadWord == null) {
// throw an exception
throw new SSCActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { suggestBadWordForm.id });
}
FessBeans.copy(suggestBadWord, suggestBadWordForm)
.commonColumnDateConverter().excludes("searchParams", "mode")
.execute();
}
@Override
protected SuggestBadWord createSuggestBadWord() {
SuggestBadWord suggestBadWord;
final String username = systemHelper.getUsername();
final Timestamp timestamp = systemHelper.getCurrentTimestamp();
if (suggestBadWordForm.crudMode == CommonConstants.EDIT_MODE) {
suggestBadWord = suggestBadWordService
.getSuggestBadWord(createKeyMap());
if (suggestBadWord == null) {
// throw an exception
throw new SSCActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { suggestBadWordForm.id });
}
} else {
suggestBadWord = new SuggestBadWord();
suggestBadWord.setCreatedBy(username);
suggestBadWord.setCreatedTime(timestamp);
}
suggestBadWord.setUpdatedBy(username);
suggestBadWord.setUpdatedTime(timestamp);
FessBeans.copy(suggestBadWordForm, suggestBadWord)
.excludesCommonColumns().execute();
return suggestBadWord;
}
@Override
@Execute(validator = false, input = "error.jsp")
public String delete() {
if (suggestBadWordForm.crudMode != CommonConstants.DELETE_MODE) {
throw new SSCActionMessagesException("errors.crud_invalid_mode",
new Object[] { CommonConstants.DELETE_MODE,
suggestBadWordForm.crudMode });
}
try {
final SuggestBadWord suggestBadWord = suggestBadWordService
.getSuggestBadWord(createKeyMap());
if (suggestBadWord == null) {
// throw an exception
throw new SSCActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { suggestBadWordForm.id });
}
// suggestBadWordService.delete(suggestBadWord);
final String username = systemHelper.getUsername();
final Timestamp timestamp = systemHelper.getCurrentTimestamp();
suggestBadWord.setDeletedBy(username);
suggestBadWord.setDeletedTime(timestamp);
suggestBadWordService.store(suggestBadWord);
SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table");
return displayList(true);
} catch (final ActionMessagesException e) {
log.error(e.getMessage(), e);
throw e;
} catch (final CrudMessageException e) {
log.error(e.getMessage(), e);
throw new SSCActionMessagesException(e, e.getMessageId(),
e.getArgs());
} catch (final Exception e) {
log.error(e.getMessage(), e);
throw new SSCActionMessagesException(e,
"errors.crud_failed_to_delete_crud_table");
}
}
}

View file

@ -0,0 +1,136 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.action.admin;
import java.sql.Timestamp;
import javax.annotation.Resource;
import jp.sf.fess.crud.CommonConstants;
import jp.sf.fess.crud.CrudMessageException;
import jp.sf.fess.crud.action.admin.BsSuggestElevateWordAction;
import jp.sf.fess.crud.util.SAStrutsUtil;
import jp.sf.fess.db.exentity.SuggestElevateWord;
import jp.sf.fess.helper.SystemHelper;
import jp.sf.fess.util.FessBeans;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codelibs.sastruts.core.exception.SSCActionMessagesException;
import org.seasar.struts.annotation.Execute;
import org.seasar.struts.exception.ActionMessagesException;
public class SuggestElevateWordAction extends BsSuggestElevateWordAction {
private static final long serialVersionUID = 1L;
private static final Log log = LogFactory
.getLog(SuggestElevateWordAction.class);
@Resource
protected SystemHelper systemHelper;
public String getHelpLink() {
return systemHelper.getHelpLink("suggestElevateWord");
}
@Override
protected void loadSuggestElevateWord() {
final SuggestElevateWord suggestElevateWord = suggestElevateWordService
.getSuggestElevateWord(createKeyMap());
if (suggestElevateWord == null) {
// throw an exception
throw new SSCActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { suggestElevateWordForm.id });
}
FessBeans.copy(suggestElevateWord, suggestElevateWordForm)
.commonColumnDateConverter().excludes("searchParams", "mode")
.execute();
}
@Override
protected SuggestElevateWord createSuggestElevateWord() {
SuggestElevateWord suggestElevateWord;
final String username = systemHelper.getUsername();
final Timestamp timestamp = systemHelper.getCurrentTimestamp();
if (suggestElevateWordForm.crudMode == CommonConstants.EDIT_MODE) {
suggestElevateWord = suggestElevateWordService
.getSuggestElevateWord(createKeyMap());
if (suggestElevateWord == null) {
// throw an exception
throw new SSCActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { suggestElevateWordForm.id });
}
} else {
suggestElevateWord = new SuggestElevateWord();
suggestElevateWord.setCreatedBy(username);
suggestElevateWord.setCreatedTime(timestamp);
}
suggestElevateWord.setUpdatedBy(username);
suggestElevateWord.setUpdatedTime(timestamp);
FessBeans.copy(suggestElevateWordForm, suggestElevateWord)
.excludesCommonColumns().execute();
return suggestElevateWord;
}
@Override
@Execute(validator = false, input = "error.jsp")
public String delete() {
if (suggestElevateWordForm.crudMode != CommonConstants.DELETE_MODE) {
throw new SSCActionMessagesException("errors.crud_invalid_mode",
new Object[] { CommonConstants.DELETE_MODE,
suggestElevateWordForm.crudMode });
}
try {
final SuggestElevateWord suggestElevateWord = suggestElevateWordService
.getSuggestElevateWord(createKeyMap());
if (suggestElevateWord == null) {
// throw an exception
throw new SSCActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { suggestElevateWordForm.id });
}
// suggestElevateWordService.delete(suggestElevateWord);
final String username = systemHelper.getUsername();
final Timestamp timestamp = systemHelper.getCurrentTimestamp();
suggestElevateWord.setDeletedBy(username);
suggestElevateWord.setDeletedTime(timestamp);
suggestElevateWordService.store(suggestElevateWord);
SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table");
return displayList(true);
} catch (final ActionMessagesException e) {
log.error(e.getMessage(), e);
throw e;
} catch (final CrudMessageException e) {
log.error(e.getMessage(), e);
throw new SSCActionMessagesException(e, e.getMessageId(),
e.getArgs());
} catch (final Exception e) {
log.error(e.getMessage(), e);
throw new SSCActionMessagesException(e,
"errors.crud_failed_to_delete_crud_table");
}
}
}

View file

@ -236,14 +236,14 @@ public class SystemAction implements Serializable {
}
SAStrutsUtil.addSessionMessage("success.start_crawl_process");
RequestUtil.getRequest().getSession()
.setAttribute(STARTING_CRAWL_PROCESS, Boolean.TRUE);
.setAttribute(STARTING_CRAWL_PROCESS, Boolean.TRUE);
} else {
SAStrutsUtil
.addSessionMessage("success.failed_to_start_crawl_process");
.addSessionMessage("success.failed_to_start_crawl_process");
}
} else {
SAStrutsUtil
.addSessionMessage("success.failed_to_start_crawl_process");
.addSessionMessage("success.failed_to_start_crawl_process");
}
return showIndex(true);
}

View file

@ -74,7 +74,7 @@ public class XmlApiManager extends BaseApiManager implements WebApiManager {
@Override
public void process(final HttpServletRequest request,
final HttpServletResponse response, final FilterChain chain)
throws IOException, ServletException {
throws IOException, ServletException {
final String formatType = request.getParameter("type");
switch (getFormatType(formatType)) {
case SEARCH:
@ -206,7 +206,7 @@ public class XmlApiManager extends BaseApiManager implements WebApiManager {
if (StringUtil.isNotBlank(name)
&& entry.getValue() != null
&& ComponentUtil.getQueryHelper()
.isApiResponseField(name)) {
.isApiResponseField(name)) {
final String tagName = convertTagName(name);
buf.append('<');
buf.append(tagName);
@ -523,12 +523,12 @@ public class XmlApiManager extends BaseApiManager implements WebApiManager {
.entrySet()) {
buf.append("<field name=\"")
.append(escapeXml(fEntry.getKey())).append("\">");
.append(escapeXml(fEntry.getKey())).append("\">");
for (final Map.Entry<String, List<Map<String, Object>>> aEntry : fEntry
.getValue().entrySet()) {
buf.append("<analysis name=\"")
.append(escapeXml(aEntry.getKey()))
.append("\">");
.append(escapeXml(aEntry.getKey()))
.append("\">");
for (final Map<String, Object> dataMap : aEntry
.getValue()) {
buf.append("<token>");
@ -538,10 +538,10 @@ public class XmlApiManager extends BaseApiManager implements WebApiManager {
final Object value = dEntry.getValue();
if (StringUtil.isNotBlank(key) && value != null) {
buf.append("<value name=\"")
.append(escapeXml(key))
.append("\">")
.append(escapeXml(value))
.append("</value>");
.append(escapeXml(key))
.append("\">")
.append(escapeXml(value))
.append("</value>");
}
}
buf.append("</token>");
@ -605,8 +605,8 @@ public class XmlApiManager extends BaseApiManager implements WebApiManager {
for (final Map.Entry<?, ?> entry : ((Map<?, ?>) obj).entrySet()) {
buf.append("<name>").append(escapeXml(entry.getKey()))
.append("</name><value>")
.append(escapeXml(entry.getValue())).append("</value>");
.append("</name><value>")
.append(escapeXml(entry.getValue())).append("</value>");
}
buf.append("</data>");
} else if (obj instanceof Date) {

View file

@ -0,0 +1,350 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.crud.action.admin;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import jp.sf.fess.crud.CommonConstants;
import jp.sf.fess.crud.CrudMessageException;
import jp.sf.fess.crud.util.SAStrutsUtil;
import jp.sf.fess.db.exentity.BoostDocumentRule;
import jp.sf.fess.form.admin.BoostDocumentRuleForm;
import jp.sf.fess.pager.BoostDocumentRulePager;
import jp.sf.fess.service.BoostDocumentRuleService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codelibs.sastruts.core.annotation.Token;
import org.seasar.framework.beans.util.Beans;
import org.seasar.framework.util.StringUtil;
import org.seasar.struts.annotation.ActionForm;
import org.seasar.struts.annotation.Execute;
import org.seasar.struts.exception.ActionMessagesException;
public class BsBoostDocumentRuleAction implements Serializable {
private static final long serialVersionUID = 1L;
private static final Log log = LogFactory
.getLog(BsBoostDocumentRuleAction.class);
// for list
public List<BoostDocumentRule> boostDocumentRuleItems;
// for edit/confirm/delete
@ActionForm
@Resource
protected BoostDocumentRuleForm boostDocumentRuleForm;
@Resource
protected BoostDocumentRuleService boostDocumentRuleService;
@Resource
protected BoostDocumentRulePager boostDocumentRulePager;
protected String displayList(final boolean redirect) {
// page navi
boostDocumentRuleItems = boostDocumentRuleService
.getBoostDocumentRuleList(boostDocumentRulePager);
// restore from pager
Beans.copy(boostDocumentRulePager, boostDocumentRuleForm.searchParams)
.excludes(CommonConstants.PAGER_CONVERSION_RULE)
.execute();
if (redirect) {
return "index?redirect=true";
} else {
return "index.jsp";
}
}
@Execute(validator = false, input = "error.jsp")
public String index() {
return displayList(false);
}
@Execute(validator = false, input = "error.jsp", urlPattern = "list/{pageNumber}")
public String list() {
// page navi
if (StringUtil.isNotBlank(boostDocumentRuleForm.pageNumber)) {
try {
boostDocumentRulePager.setCurrentPageNumber(Integer
.parseInt(boostDocumentRuleForm.pageNumber));
} catch (final NumberFormatException e) {
if (log.isDebugEnabled()) {
log.debug("Invalid value: "
+ boostDocumentRuleForm.pageNumber, e);
}
}
}
return displayList(false);
}
@Execute(validator = false, input = "error.jsp")
public String search() {
Beans.copy(boostDocumentRuleForm.searchParams, boostDocumentRulePager)
.excludes(CommonConstants.PAGER_CONVERSION_RULE)
.execute();
return displayList(false);
}
@Execute(validator = false, input = "error.jsp")
public String reset() {
boostDocumentRulePager.clear();
return displayList(false);
}
@Execute(validator = false, input = "error.jsp")
public String back() {
return displayList(false);
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp")
public String editagain() {
return "edit.jsp";
}
@Execute(validator = false, input = "error.jsp", urlPattern = "confirmpage/{crudMode}/{id}")
public String confirmpage() {
if (boostDocumentRuleForm.crudMode != CommonConstants.CONFIRM_MODE) {
throw new ActionMessagesException("errors.crud_invalid_mode",
new Object[] { CommonConstants.CONFIRM_MODE,
boostDocumentRuleForm.crudMode });
}
loadBoostDocumentRule();
return "confirm.jsp";
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp")
public String createpage() {
// page navi
boostDocumentRuleForm.initialize();
boostDocumentRuleForm.crudMode = CommonConstants.CREATE_MODE;
return "edit.jsp";
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp", urlPattern = "editpage/{crudMode}/{id}")
public String editpage() {
if (boostDocumentRuleForm.crudMode != CommonConstants.EDIT_MODE) {
throw new ActionMessagesException("errors.crud_invalid_mode",
new Object[] { CommonConstants.EDIT_MODE,
boostDocumentRuleForm.crudMode });
}
loadBoostDocumentRule();
return "edit.jsp";
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp")
public String editfromconfirm() {
boostDocumentRuleForm.crudMode = CommonConstants.EDIT_MODE;
loadBoostDocumentRule();
return "edit.jsp";
}
@Token(save = false, validate = true, keep = true)
@Execute(validator = true, input = "edit.jsp")
public String confirmfromcreate() {
return "confirm.jsp";
}
@Token(save = false, validate = true, keep = true)
@Execute(validator = true, input = "edit.jsp")
public String confirmfromupdate() {
return "confirm.jsp";
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp", urlPattern = "deletepage/{crudMode}/{id}")
public String deletepage() {
if (boostDocumentRuleForm.crudMode != CommonConstants.DELETE_MODE) {
throw new ActionMessagesException("errors.crud_invalid_mode",
new Object[] { CommonConstants.DELETE_MODE,
boostDocumentRuleForm.crudMode });
}
loadBoostDocumentRule();
return "confirm.jsp";
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp")
public String deletefromconfirm() {
boostDocumentRuleForm.crudMode = CommonConstants.DELETE_MODE;
loadBoostDocumentRule();
return "confirm.jsp";
}
@Token(save = false, validate = true)
@Execute(validator = true, input = "edit.jsp")
public String create() {
try {
final BoostDocumentRule boostDocumentRule = createBoostDocumentRule();
boostDocumentRuleService.store(boostDocumentRule);
SAStrutsUtil.addSessionMessage("success.crud_create_crud_table");
return displayList(true);
} catch (final ActionMessagesException e) {
log.error(e.getMessage(), e);
throw e;
} catch (final CrudMessageException e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(e.getMessageId(), e.getArgs());
} catch (final Exception e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(
"errors.crud_failed_to_create_crud_table");
}
}
@Token(save = false, validate = true)
@Execute(validator = true, input = "edit.jsp")
public String update() {
try {
final BoostDocumentRule boostDocumentRule = createBoostDocumentRule();
boostDocumentRuleService.store(boostDocumentRule);
SAStrutsUtil.addSessionMessage("success.crud_update_crud_table");
return displayList(true);
} catch (final ActionMessagesException e) {
log.error(e.getMessage(), e);
throw e;
} catch (final CrudMessageException e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(e.getMessageId(), e.getArgs());
} catch (final Exception e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(
"errors.crud_failed_to_update_crud_table");
}
}
@Token(save = false, validate = true)
@Execute(validator = false, input = "error.jsp")
public String delete() {
if (boostDocumentRuleForm.crudMode != CommonConstants.DELETE_MODE) {
throw new ActionMessagesException("errors.crud_invalid_mode",
new Object[] { CommonConstants.DELETE_MODE,
boostDocumentRuleForm.crudMode });
}
try {
final BoostDocumentRule boostDocumentRule = boostDocumentRuleService
.getBoostDocumentRule(createKeyMap());
if (boostDocumentRule == null) {
// throw an exception
throw new ActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { boostDocumentRuleForm.id });
}
boostDocumentRuleService.delete(boostDocumentRule);
SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table");
return displayList(true);
} catch (final ActionMessagesException e) {
log.error(e.getMessage(), e);
throw e;
} catch (final CrudMessageException e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(e.getMessageId(), e.getArgs());
} catch (final Exception e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(
"errors.crud_failed_to_delete_crud_table");
}
}
protected void loadBoostDocumentRule() {
final BoostDocumentRule boostDocumentRule = boostDocumentRuleService
.getBoostDocumentRule(createKeyMap());
if (boostDocumentRule == null) {
// throw an exception
throw new ActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { boostDocumentRuleForm.id });
}
Beans.copy(boostDocumentRule, boostDocumentRuleForm)
.excludes("searchParams", "mode")
.execute();
}
protected BoostDocumentRule createBoostDocumentRule() {
BoostDocumentRule boostDocumentRule;
if (boostDocumentRuleForm.crudMode == CommonConstants.EDIT_MODE) {
boostDocumentRule = boostDocumentRuleService
.getBoostDocumentRule(createKeyMap());
if (boostDocumentRule == null) {
// throw an exception
throw new ActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { boostDocumentRuleForm.id });
}
} else {
boostDocumentRule = new BoostDocumentRule();
}
Beans.copy(boostDocumentRuleForm, boostDocumentRule)
.excludes("searchParams", "mode")
.execute();
return boostDocumentRule;
}
protected Map<String, String> createKeyMap() {
final Map<String, String> keys = new HashMap<String, String>();
keys.put("id", boostDocumentRuleForm.id);
return keys;
}
}

View file

@ -0,0 +1,351 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.crud.action.admin;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import jp.sf.fess.crud.CommonConstants;
import jp.sf.fess.crud.CrudMessageException;
import jp.sf.fess.crud.util.SAStrutsUtil;
import jp.sf.fess.db.exentity.SuggestBadWord;
import jp.sf.fess.form.admin.SuggestBadWordForm;
import jp.sf.fess.pager.SuggestBadWordPager;
import jp.sf.fess.service.SuggestBadWordService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codelibs.sastruts.core.annotation.Token;
import org.seasar.framework.beans.util.Beans;
import org.seasar.framework.util.StringUtil;
import org.seasar.struts.annotation.ActionForm;
import org.seasar.struts.annotation.Execute;
import org.seasar.struts.exception.ActionMessagesException;
public class BsSuggestBadWordAction implements Serializable {
private static final long serialVersionUID = 1L;
private static final Log log = LogFactory
.getLog(BsSuggestBadWordAction.class);
// for list
public List<SuggestBadWord> suggestBadWordItems;
// for edit/confirm/delete
@ActionForm
@Resource
protected SuggestBadWordForm suggestBadWordForm;
@Resource
protected SuggestBadWordService suggestBadWordService;
@Resource
protected SuggestBadWordPager suggestBadWordPager;
protected String displayList(final boolean redirect) {
// page navi
suggestBadWordItems = suggestBadWordService
.getSuggestBadWordList(suggestBadWordPager);
// restore from pager
Beans.copy(suggestBadWordPager, suggestBadWordForm.searchParams)
.excludes(CommonConstants.PAGER_CONVERSION_RULE)
.execute();
if (redirect) {
return "index?redirect=true";
} else {
return "index.jsp";
}
}
@Execute(validator = false, input = "error.jsp")
public String index() {
return displayList(false);
}
@Execute(validator = false, input = "error.jsp", urlPattern = "list/{pageNumber}")
public String list() {
// page navi
if (StringUtil.isNotBlank(suggestBadWordForm.pageNumber)) {
try {
suggestBadWordPager.setCurrentPageNumber(Integer
.parseInt(suggestBadWordForm.pageNumber));
} catch (final NumberFormatException e) {
if (log.isDebugEnabled()) {
log.debug(
"Invalid value: " + suggestBadWordForm.pageNumber,
e);
}
}
}
return displayList(false);
}
@Execute(validator = false, input = "error.jsp")
public String search() {
Beans.copy(suggestBadWordForm.searchParams, suggestBadWordPager)
.excludes(CommonConstants.PAGER_CONVERSION_RULE)
.execute();
return displayList(false);
}
@Execute(validator = false, input = "error.jsp")
public String reset() {
suggestBadWordPager.clear();
return displayList(false);
}
@Execute(validator = false, input = "error.jsp")
public String back() {
return displayList(false);
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp")
public String editagain() {
return "edit.jsp";
}
@Execute(validator = false, input = "error.jsp", urlPattern = "confirmpage/{crudMode}/{id}")
public String confirmpage() {
if (suggestBadWordForm.crudMode != CommonConstants.CONFIRM_MODE) {
throw new ActionMessagesException("errors.crud_invalid_mode",
new Object[] { CommonConstants.CONFIRM_MODE,
suggestBadWordForm.crudMode });
}
loadSuggestBadWord();
return "confirm.jsp";
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp")
public String createpage() {
// page navi
suggestBadWordForm.initialize();
suggestBadWordForm.crudMode = CommonConstants.CREATE_MODE;
return "edit.jsp";
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp", urlPattern = "editpage/{crudMode}/{id}")
public String editpage() {
if (suggestBadWordForm.crudMode != CommonConstants.EDIT_MODE) {
throw new ActionMessagesException("errors.crud_invalid_mode",
new Object[] { CommonConstants.EDIT_MODE,
suggestBadWordForm.crudMode });
}
loadSuggestBadWord();
return "edit.jsp";
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp")
public String editfromconfirm() {
suggestBadWordForm.crudMode = CommonConstants.EDIT_MODE;
loadSuggestBadWord();
return "edit.jsp";
}
@Token(save = false, validate = true, keep = true)
@Execute(validator = true, input = "edit.jsp")
public String confirmfromcreate() {
return "confirm.jsp";
}
@Token(save = false, validate = true, keep = true)
@Execute(validator = true, input = "edit.jsp")
public String confirmfromupdate() {
return "confirm.jsp";
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp", urlPattern = "deletepage/{crudMode}/{id}")
public String deletepage() {
if (suggestBadWordForm.crudMode != CommonConstants.DELETE_MODE) {
throw new ActionMessagesException("errors.crud_invalid_mode",
new Object[] { CommonConstants.DELETE_MODE,
suggestBadWordForm.crudMode });
}
loadSuggestBadWord();
return "confirm.jsp";
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp")
public String deletefromconfirm() {
suggestBadWordForm.crudMode = CommonConstants.DELETE_MODE;
loadSuggestBadWord();
return "confirm.jsp";
}
@Token(save = false, validate = true)
@Execute(validator = true, input = "edit.jsp")
public String create() {
try {
final SuggestBadWord suggestBadWord = createSuggestBadWord();
suggestBadWordService.store(suggestBadWord);
SAStrutsUtil.addSessionMessage("success.crud_create_crud_table");
return displayList(true);
} catch (final ActionMessagesException e) {
log.error(e.getMessage(), e);
throw e;
} catch (final CrudMessageException e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(e.getMessageId(), e.getArgs());
} catch (final Exception e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(
"errors.crud_failed_to_create_crud_table");
}
}
@Token(save = false, validate = true)
@Execute(validator = true, input = "edit.jsp")
public String update() {
try {
final SuggestBadWord suggestBadWord = createSuggestBadWord();
suggestBadWordService.store(suggestBadWord);
SAStrutsUtil.addSessionMessage("success.crud_update_crud_table");
return displayList(true);
} catch (final ActionMessagesException e) {
log.error(e.getMessage(), e);
throw e;
} catch (final CrudMessageException e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(e.getMessageId(), e.getArgs());
} catch (final Exception e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(
"errors.crud_failed_to_update_crud_table");
}
}
@Token(save = false, validate = true)
@Execute(validator = false, input = "error.jsp")
public String delete() {
if (suggestBadWordForm.crudMode != CommonConstants.DELETE_MODE) {
throw new ActionMessagesException("errors.crud_invalid_mode",
new Object[] { CommonConstants.DELETE_MODE,
suggestBadWordForm.crudMode });
}
try {
final SuggestBadWord suggestBadWord = suggestBadWordService
.getSuggestBadWord(createKeyMap());
if (suggestBadWord == null) {
// throw an exception
throw new ActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { suggestBadWordForm.id });
}
suggestBadWordService.delete(suggestBadWord);
SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table");
return displayList(true);
} catch (final ActionMessagesException e) {
log.error(e.getMessage(), e);
throw e;
} catch (final CrudMessageException e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(e.getMessageId(), e.getArgs());
} catch (final Exception e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(
"errors.crud_failed_to_delete_crud_table");
}
}
protected void loadSuggestBadWord() {
final SuggestBadWord suggestBadWord = suggestBadWordService
.getSuggestBadWord(createKeyMap());
if (suggestBadWord == null) {
// throw an exception
throw new ActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { suggestBadWordForm.id });
}
Beans.copy(suggestBadWord, suggestBadWordForm)
.excludes("searchParams", "mode")
.execute();
}
protected SuggestBadWord createSuggestBadWord() {
SuggestBadWord suggestBadWord;
if (suggestBadWordForm.crudMode == CommonConstants.EDIT_MODE) {
suggestBadWord = suggestBadWordService
.getSuggestBadWord(createKeyMap());
if (suggestBadWord == null) {
// throw an exception
throw new ActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { suggestBadWordForm.id });
}
} else {
suggestBadWord = new SuggestBadWord();
}
Beans.copy(suggestBadWordForm, suggestBadWord)
.excludes("searchParams", "mode")
.execute();
return suggestBadWord;
}
protected Map<String, String> createKeyMap() {
final Map<String, String> keys = new HashMap<String, String>();
keys.put("id", suggestBadWordForm.id);
return keys;
}
}

View file

@ -0,0 +1,350 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.crud.action.admin;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import jp.sf.fess.crud.CommonConstants;
import jp.sf.fess.crud.CrudMessageException;
import jp.sf.fess.crud.util.SAStrutsUtil;
import jp.sf.fess.db.exentity.SuggestElevateWord;
import jp.sf.fess.form.admin.SuggestElevateWordForm;
import jp.sf.fess.pager.SuggestElevateWordPager;
import jp.sf.fess.service.SuggestElevateWordService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codelibs.sastruts.core.annotation.Token;
import org.seasar.framework.beans.util.Beans;
import org.seasar.framework.util.StringUtil;
import org.seasar.struts.annotation.ActionForm;
import org.seasar.struts.annotation.Execute;
import org.seasar.struts.exception.ActionMessagesException;
public class BsSuggestElevateWordAction implements Serializable {
private static final long serialVersionUID = 1L;
private static final Log log = LogFactory
.getLog(BsSuggestElevateWordAction.class);
// for list
public List<SuggestElevateWord> suggestElevateWordItems;
// for edit/confirm/delete
@ActionForm
@Resource
protected SuggestElevateWordForm suggestElevateWordForm;
@Resource
protected SuggestElevateWordService suggestElevateWordService;
@Resource
protected SuggestElevateWordPager suggestElevateWordPager;
protected String displayList(final boolean redirect) {
// page navi
suggestElevateWordItems = suggestElevateWordService
.getSuggestElevateWordList(suggestElevateWordPager);
// restore from pager
Beans.copy(suggestElevateWordPager, suggestElevateWordForm.searchParams)
.excludes(CommonConstants.PAGER_CONVERSION_RULE)
.execute();
if (redirect) {
return "index?redirect=true";
} else {
return "index.jsp";
}
}
@Execute(validator = false, input = "error.jsp")
public String index() {
return displayList(false);
}
@Execute(validator = false, input = "error.jsp", urlPattern = "list/{pageNumber}")
public String list() {
// page navi
if (StringUtil.isNotBlank(suggestElevateWordForm.pageNumber)) {
try {
suggestElevateWordPager.setCurrentPageNumber(Integer
.parseInt(suggestElevateWordForm.pageNumber));
} catch (final NumberFormatException e) {
if (log.isDebugEnabled()) {
log.debug("Invalid value: "
+ suggestElevateWordForm.pageNumber, e);
}
}
}
return displayList(false);
}
@Execute(validator = false, input = "error.jsp")
public String search() {
Beans.copy(suggestElevateWordForm.searchParams, suggestElevateWordPager)
.excludes(CommonConstants.PAGER_CONVERSION_RULE)
.execute();
return displayList(false);
}
@Execute(validator = false, input = "error.jsp")
public String reset() {
suggestElevateWordPager.clear();
return displayList(false);
}
@Execute(validator = false, input = "error.jsp")
public String back() {
return displayList(false);
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp")
public String editagain() {
return "edit.jsp";
}
@Execute(validator = false, input = "error.jsp", urlPattern = "confirmpage/{crudMode}/{id}")
public String confirmpage() {
if (suggestElevateWordForm.crudMode != CommonConstants.CONFIRM_MODE) {
throw new ActionMessagesException("errors.crud_invalid_mode",
new Object[] { CommonConstants.CONFIRM_MODE,
suggestElevateWordForm.crudMode });
}
loadSuggestElevateWord();
return "confirm.jsp";
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp")
public String createpage() {
// page navi
suggestElevateWordForm.initialize();
suggestElevateWordForm.crudMode = CommonConstants.CREATE_MODE;
return "edit.jsp";
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp", urlPattern = "editpage/{crudMode}/{id}")
public String editpage() {
if (suggestElevateWordForm.crudMode != CommonConstants.EDIT_MODE) {
throw new ActionMessagesException("errors.crud_invalid_mode",
new Object[] { CommonConstants.EDIT_MODE,
suggestElevateWordForm.crudMode });
}
loadSuggestElevateWord();
return "edit.jsp";
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp")
public String editfromconfirm() {
suggestElevateWordForm.crudMode = CommonConstants.EDIT_MODE;
loadSuggestElevateWord();
return "edit.jsp";
}
@Token(save = false, validate = true, keep = true)
@Execute(validator = true, input = "edit.jsp")
public String confirmfromcreate() {
return "confirm.jsp";
}
@Token(save = false, validate = true, keep = true)
@Execute(validator = true, input = "edit.jsp")
public String confirmfromupdate() {
return "confirm.jsp";
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp", urlPattern = "deletepage/{crudMode}/{id}")
public String deletepage() {
if (suggestElevateWordForm.crudMode != CommonConstants.DELETE_MODE) {
throw new ActionMessagesException("errors.crud_invalid_mode",
new Object[] { CommonConstants.DELETE_MODE,
suggestElevateWordForm.crudMode });
}
loadSuggestElevateWord();
return "confirm.jsp";
}
@Token(save = true, validate = false)
@Execute(validator = false, input = "error.jsp")
public String deletefromconfirm() {
suggestElevateWordForm.crudMode = CommonConstants.DELETE_MODE;
loadSuggestElevateWord();
return "confirm.jsp";
}
@Token(save = false, validate = true)
@Execute(validator = true, input = "edit.jsp")
public String create() {
try {
final SuggestElevateWord suggestElevateWord = createSuggestElevateWord();
suggestElevateWordService.store(suggestElevateWord);
SAStrutsUtil.addSessionMessage("success.crud_create_crud_table");
return displayList(true);
} catch (final ActionMessagesException e) {
log.error(e.getMessage(), e);
throw e;
} catch (final CrudMessageException e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(e.getMessageId(), e.getArgs());
} catch (final Exception e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(
"errors.crud_failed_to_create_crud_table");
}
}
@Token(save = false, validate = true)
@Execute(validator = true, input = "edit.jsp")
public String update() {
try {
final SuggestElevateWord suggestElevateWord = createSuggestElevateWord();
suggestElevateWordService.store(suggestElevateWord);
SAStrutsUtil.addSessionMessage("success.crud_update_crud_table");
return displayList(true);
} catch (final ActionMessagesException e) {
log.error(e.getMessage(), e);
throw e;
} catch (final CrudMessageException e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(e.getMessageId(), e.getArgs());
} catch (final Exception e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(
"errors.crud_failed_to_update_crud_table");
}
}
@Token(save = false, validate = true)
@Execute(validator = false, input = "error.jsp")
public String delete() {
if (suggestElevateWordForm.crudMode != CommonConstants.DELETE_MODE) {
throw new ActionMessagesException("errors.crud_invalid_mode",
new Object[] { CommonConstants.DELETE_MODE,
suggestElevateWordForm.crudMode });
}
try {
final SuggestElevateWord suggestElevateWord = suggestElevateWordService
.getSuggestElevateWord(createKeyMap());
if (suggestElevateWord == null) {
// throw an exception
throw new ActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { suggestElevateWordForm.id });
}
suggestElevateWordService.delete(suggestElevateWord);
SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table");
return displayList(true);
} catch (final ActionMessagesException e) {
log.error(e.getMessage(), e);
throw e;
} catch (final CrudMessageException e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(e.getMessageId(), e.getArgs());
} catch (final Exception e) {
log.error(e.getMessage(), e);
throw new ActionMessagesException(
"errors.crud_failed_to_delete_crud_table");
}
}
protected void loadSuggestElevateWord() {
final SuggestElevateWord suggestElevateWord = suggestElevateWordService
.getSuggestElevateWord(createKeyMap());
if (suggestElevateWord == null) {
// throw an exception
throw new ActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { suggestElevateWordForm.id });
}
Beans.copy(suggestElevateWord, suggestElevateWordForm)
.excludes("searchParams", "mode")
.execute();
}
protected SuggestElevateWord createSuggestElevateWord() {
SuggestElevateWord suggestElevateWord;
if (suggestElevateWordForm.crudMode == CommonConstants.EDIT_MODE) {
suggestElevateWord = suggestElevateWordService
.getSuggestElevateWord(createKeyMap());
if (suggestElevateWord == null) {
// throw an exception
throw new ActionMessagesException(
"errors.crud_could_not_find_crud_table",
new Object[] { suggestElevateWordForm.id });
}
} else {
suggestElevateWord = new SuggestElevateWord();
}
Beans.copy(suggestElevateWordForm, suggestElevateWord)
.excludes("searchParams", "mode")
.execute();
return suggestElevateWord;
}
protected Map<String, String> createKeyMap() {
final Map<String, String> keys = new HashMap<String, String>();
keys.put("id", suggestElevateWordForm.id);
return keys;
}
}

View file

@ -0,0 +1,100 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.crud.form.admin;
import java.util.HashMap;
import java.util.Map;
import jp.sf.fess.Constants;
import org.seasar.struts.annotation.DateType;
import org.seasar.struts.annotation.IntRange;
import org.seasar.struts.annotation.IntegerType;
import org.seasar.struts.annotation.LongType;
import org.seasar.struts.annotation.Maxbytelength;
import org.seasar.struts.annotation.Required;
public abstract class BsBoostDocumentRuleForm {
@IntegerType
public String pageNumber;
public Map<String, String> searchParams = new HashMap<String, String>();
@IntegerType
public int crudMode;
public String getCurrentPageNumber() {
return pageNumber;
}
@Required(target = "confirmfromupdate,update,delete")
@LongType
public String id;
@Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
@Maxbytelength(maxbytelength = 4000)
public String urlExpr;
@Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
@Maxbytelength(maxbytelength = 4000)
public String boostExpr;
@Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
@IntegerType
@IntRange(min = 0, max = 2147483647)
public String sortOrder;
@Required(target = "confirmfromupdate,update,delete")
@Maxbytelength(maxbytelength = 255)
public String createdBy;
@Required(target = "confirmfromupdate,update,delete")
@DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
public String createdTime;
@Maxbytelength(maxbytelength = 255)
public String updatedBy;
@DateType
public String updatedTime;
public String deletedBy;
@DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
public String deletedTime;
@Required(target = "confirmfromupdate,update,delete")
@IntegerType
public String versionNo;
public void initialize() {
id = null;
urlExpr = null;
boostExpr = null;
sortOrder = null;
createdBy = null;
createdTime = null;
updatedBy = null;
updatedTime = null;
deletedBy = null;
deletedTime = null;
versionNo = null;
}
}

View file

@ -68,6 +68,7 @@ public abstract class BsDataCrawlingConfigForm {
@Required(target = "confirmfromupdate,update,delete")
@IntegerType
@IntRange(min = 0, max = 2147483647)
public String sortOrder;
@Required(target = "confirmfromupdate,update,delete")

View file

@ -95,6 +95,7 @@ public abstract class BsFileCrawlingConfigForm {
@Required(target = "confirmfromupdate,update,delete")
@IntegerType
@IntRange(min = 0, max = 2147483647)
public String sortOrder;
@Required(target = "confirmfromupdate,update,delete")

View file

@ -0,0 +1,93 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.crud.form.admin;
import java.util.HashMap;
import java.util.Map;
import jp.sf.fess.Constants;
import org.seasar.struts.annotation.DateType;
import org.seasar.struts.annotation.IntegerType;
import org.seasar.struts.annotation.LongType;
import org.seasar.struts.annotation.Maxbytelength;
import org.seasar.struts.annotation.Required;
public abstract class BsSuggestBadWordForm {
@IntegerType
public String pageNumber;
public Map<String, String> searchParams = new HashMap<String, String>();
@IntegerType
public int crudMode;
public String getCurrentPageNumber() {
return pageNumber;
}
@Required(target = "confirmfromupdate,update,delete")
@LongType
public String id;
@Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
public String suggestWord;
public String targetRole;
public String targetLabel;
@Required(target = "confirmfromupdate,update,delete")
@Maxbytelength(maxbytelength = 255)
public String createdBy;
@Required(target = "confirmfromupdate,update,delete")
@DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
public String createdTime;
@Maxbytelength(maxbytelength = 255)
public String updatedBy;
@DateType
public String updatedTime;
public String deletedBy;
@DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
public String deletedTime;
@Required(target = "confirmfromupdate,update,delete")
@IntegerType
public String versionNo;
public void initialize() {
id = null;
suggestWord = null;
targetRole = null;
targetLabel = null;
createdBy = null;
createdTime = null;
updatedBy = null;
updatedTime = null;
deletedBy = null;
deletedTime = null;
versionNo = null;
}
}

View file

@ -0,0 +1,102 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.crud.form.admin;
import java.util.HashMap;
import java.util.Map;
import jp.sf.fess.Constants;
import org.seasar.struts.annotation.DateType;
import org.seasar.struts.annotation.IntRange;
import org.seasar.struts.annotation.IntegerType;
import org.seasar.struts.annotation.LongType;
import org.seasar.struts.annotation.Maxbytelength;
import org.seasar.struts.annotation.Required;
public abstract class BsSuggestElevateWordForm {
@IntegerType
public String pageNumber;
public Map<String, String> searchParams = new HashMap<String, String>();
@IntegerType
public int crudMode;
public String getCurrentPageNumber() {
return pageNumber;
}
@Required(target = "confirmfromupdate,update,delete")
@LongType
public String id;
@Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
public String suggestWord;
public String reading;
public String targetRole;
public String targetLabel;
@Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
@IntRange(min = 0, max = 2147483647)
public String boost;
@Required(target = "confirmfromupdate,update,delete")
@Maxbytelength(maxbytelength = 255)
public String createdBy;
@Required(target = "confirmfromupdate,update,delete")
@DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
public String createdTime;
@Maxbytelength(maxbytelength = 255)
public String updatedBy;
@DateType
public String updatedTime;
public String deletedBy;
@DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
public String deletedTime;
@Required(target = "confirmfromupdate,update,delete")
@IntegerType
public String versionNo;
public void initialize() {
id = null;
suggestWord = null;
reading = null;
targetRole = null;
targetLabel = null;
boost = null;
createdBy = null;
createdTime = null;
updatedBy = null;
updatedTime = null;
deletedBy = null;
deletedTime = null;
versionNo = null;
}
}

View file

@ -0,0 +1,140 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.crud.pager;
import java.io.Serializable;
import java.util.List;
public abstract class BsBoostDocumentRulePager implements Serializable {
private static final long serialVersionUID = 1L;
public static final int DEFAULT_PAGE_SIZE = 20;
public static final int DEFAULT_CURRENT_PAGE_NUMBER = 1;
private int allRecordCount;
private int allPageCount;
private boolean existPrePage;
private boolean existNextPage;
private List<Integer> pageNumberList;
private int pageSize;
private int currentPageNumber;
public String id;
public String urlExpr;
public String boostExpr;
public String sortOrder;
public String createdBy;
public String createdTime;
public String versionNo;
public void clear() {
pageSize = getDefaultPageSize();
currentPageNumber = getDefaultCurrentPageNumber();
id = null;
urlExpr = null;
boostExpr = null;
sortOrder = null;
createdBy = null;
createdTime = null;
versionNo = null;
}
protected int getDefaultPageSize() {
return DEFAULT_PAGE_SIZE;
}
protected int getDefaultCurrentPageNumber() {
return DEFAULT_CURRENT_PAGE_NUMBER;
}
public int getAllRecordCount() {
return allRecordCount;
}
public void setAllRecordCount(final int allRecordCount) {
this.allRecordCount = allRecordCount;
}
public int getAllPageCount() {
return allPageCount;
}
public void setAllPageCount(final int allPageCount) {
this.allPageCount = allPageCount;
}
public boolean isExistPrePage() {
return existPrePage;
}
public void setExistPrePage(final boolean existPrePage) {
this.existPrePage = existPrePage;
}
public boolean isExistNextPage() {
return existNextPage;
}
public void setExistNextPage(final boolean existNextPage) {
this.existNextPage = existNextPage;
}
public int getPageSize() {
if (pageSize <= 0) {
pageSize = getDefaultPageSize();
}
return pageSize;
}
public void setPageSize(final int pageSize) {
this.pageSize = pageSize;
}
public int getCurrentPageNumber() {
if (currentPageNumber <= 0) {
currentPageNumber = getDefaultCurrentPageNumber();
}
return currentPageNumber;
}
public void setCurrentPageNumber(final int currentPageNumber) {
this.currentPageNumber = currentPageNumber;
}
public List<Integer> getPageNumberList() {
return pageNumberList;
}
public void setPageNumberList(final List<Integer> pageNumberList) {
this.pageNumberList = pageNumberList;
}
}

View file

@ -0,0 +1,134 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.crud.pager;
import java.io.Serializable;
import java.util.List;
public abstract class BsSuggestBadWordPager implements Serializable {
private static final long serialVersionUID = 1L;
public static final int DEFAULT_PAGE_SIZE = 20;
public static final int DEFAULT_CURRENT_PAGE_NUMBER = 1;
private int allRecordCount;
private int allPageCount;
private boolean existPrePage;
private boolean existNextPage;
private List<Integer> pageNumberList;
private int pageSize;
private int currentPageNumber;
public String id;
public String suggestWord;
public String createdBy;
public String createdTime;
public String versionNo;
public void clear() {
pageSize = getDefaultPageSize();
currentPageNumber = getDefaultCurrentPageNumber();
id = null;
suggestWord = null;
createdBy = null;
createdTime = null;
versionNo = null;
}
protected int getDefaultPageSize() {
return DEFAULT_PAGE_SIZE;
}
protected int getDefaultCurrentPageNumber() {
return DEFAULT_CURRENT_PAGE_NUMBER;
}
public int getAllRecordCount() {
return allRecordCount;
}
public void setAllRecordCount(final int allRecordCount) {
this.allRecordCount = allRecordCount;
}
public int getAllPageCount() {
return allPageCount;
}
public void setAllPageCount(final int allPageCount) {
this.allPageCount = allPageCount;
}
public boolean isExistPrePage() {
return existPrePage;
}
public void setExistPrePage(final boolean existPrePage) {
this.existPrePage = existPrePage;
}
public boolean isExistNextPage() {
return existNextPage;
}
public void setExistNextPage(final boolean existNextPage) {
this.existNextPage = existNextPage;
}
public int getPageSize() {
if (pageSize <= 0) {
pageSize = getDefaultPageSize();
}
return pageSize;
}
public void setPageSize(final int pageSize) {
this.pageSize = pageSize;
}
public int getCurrentPageNumber() {
if (currentPageNumber <= 0) {
currentPageNumber = getDefaultCurrentPageNumber();
}
return currentPageNumber;
}
public void setCurrentPageNumber(final int currentPageNumber) {
this.currentPageNumber = currentPageNumber;
}
public List<Integer> getPageNumberList() {
return pageNumberList;
}
public void setPageNumberList(final List<Integer> pageNumberList) {
this.pageNumberList = pageNumberList;
}
}

View file

@ -0,0 +1,137 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.crud.pager;
import java.io.Serializable;
import java.util.List;
public abstract class BsSuggestElevateWordPager implements Serializable {
private static final long serialVersionUID = 1L;
public static final int DEFAULT_PAGE_SIZE = 20;
public static final int DEFAULT_CURRENT_PAGE_NUMBER = 1;
private int allRecordCount;
private int allPageCount;
private boolean existPrePage;
private boolean existNextPage;
private List<Integer> pageNumberList;
private int pageSize;
private int currentPageNumber;
public String id;
public String suggestWord;
public String boost;
public String createdBy;
public String createdTime;
public String versionNo;
public void clear() {
pageSize = getDefaultPageSize();
currentPageNumber = getDefaultCurrentPageNumber();
id = null;
suggestWord = null;
boost = null;
createdBy = null;
createdTime = null;
versionNo = null;
}
protected int getDefaultPageSize() {
return DEFAULT_PAGE_SIZE;
}
protected int getDefaultCurrentPageNumber() {
return DEFAULT_CURRENT_PAGE_NUMBER;
}
public int getAllRecordCount() {
return allRecordCount;
}
public void setAllRecordCount(final int allRecordCount) {
this.allRecordCount = allRecordCount;
}
public int getAllPageCount() {
return allPageCount;
}
public void setAllPageCount(final int allPageCount) {
this.allPageCount = allPageCount;
}
public boolean isExistPrePage() {
return existPrePage;
}
public void setExistPrePage(final boolean existPrePage) {
this.existPrePage = existPrePage;
}
public boolean isExistNextPage() {
return existNextPage;
}
public void setExistNextPage(final boolean existNextPage) {
this.existNextPage = existNextPage;
}
public int getPageSize() {
if (pageSize <= 0) {
pageSize = getDefaultPageSize();
}
return pageSize;
}
public void setPageSize(final int pageSize) {
this.pageSize = pageSize;
}
public int getCurrentPageNumber() {
if (currentPageNumber <= 0) {
currentPageNumber = getDefaultCurrentPageNumber();
}
return currentPageNumber;
}
public void setCurrentPageNumber(final int currentPageNumber) {
this.currentPageNumber = currentPageNumber;
}
public List<Integer> getPageNumberList() {
return pageNumberList;
}
public void setPageNumberList(final List<Integer> pageNumberList) {
this.pageNumberList = pageNumberList;
}
}

View file

@ -0,0 +1,119 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.crud.service;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import jp.sf.fess.crud.CommonConstants;
import jp.sf.fess.crud.CrudMessageException;
import jp.sf.fess.db.cbean.BoostDocumentRuleCB;
import jp.sf.fess.db.exbhv.BoostDocumentRuleBhv;
import jp.sf.fess.db.exentity.BoostDocumentRule;
import jp.sf.fess.pager.BoostDocumentRulePager;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.framework.beans.util.Beans;
public abstract class BsBoostDocumentRuleService {
@Resource
protected BoostDocumentRuleBhv boostDocumentRuleBhv;
public BsBoostDocumentRuleService() {
super();
}
public List<BoostDocumentRule> getBoostDocumentRuleList(
final BoostDocumentRulePager boostDocumentRulePager) {
final BoostDocumentRuleCB cb = new BoostDocumentRuleCB();
cb.fetchFirst(boostDocumentRulePager.getPageSize());
cb.fetchPage(boostDocumentRulePager.getCurrentPageNumber());
setupListCondition(cb, boostDocumentRulePager);
final PagingResultBean<BoostDocumentRule> boostDocumentRuleList = boostDocumentRuleBhv
.selectPage(cb);
// update pager
Beans.copy(boostDocumentRuleList, boostDocumentRulePager)
.includes(CommonConstants.PAGER_CONVERSION_RULE).execute();
boostDocumentRuleList.setPageRangeSize(5);
boostDocumentRulePager.setPageNumberList(boostDocumentRuleList
.pageRange().createPageNumberList());
return boostDocumentRuleList;
}
public BoostDocumentRule getBoostDocumentRule(final Map<String, String> keys) {
final BoostDocumentRuleCB cb = new BoostDocumentRuleCB();
cb.query().setId_Equal(Long.parseLong(keys.get("id")));
// TODO Long, Integer, String supported only.
setupEntityCondition(cb, keys);
final BoostDocumentRule boostDocumentRule = boostDocumentRuleBhv
.selectEntity(cb);
if (boostDocumentRule == null) {
// TODO exception?
return null;
}
return boostDocumentRule;
}
public void store(final BoostDocumentRule boostDocumentRule)
throws CrudMessageException {
setupStoreCondition(boostDocumentRule);
boostDocumentRuleBhv.insertOrUpdate(boostDocumentRule);
}
public void delete(final BoostDocumentRule boostDocumentRule)
throws CrudMessageException {
setupDeleteCondition(boostDocumentRule);
boostDocumentRuleBhv.delete(boostDocumentRule);
}
protected void setupListCondition(final BoostDocumentRuleCB cb,
final BoostDocumentRulePager boostDocumentRulePager) {
if (boostDocumentRulePager.id != null) {
cb.query().setId_Equal(Long.parseLong(boostDocumentRulePager.id));
}
// TODO Long, Integer, String supported only.
}
protected void setupEntityCondition(final BoostDocumentRuleCB cb,
final Map<String, String> keys) {
}
protected void setupStoreCondition(final BoostDocumentRule boostDocumentRule) {
}
protected void setupDeleteCondition(
final BoostDocumentRule boostDocumentRule) {
}
}

View file

@ -0,0 +1,118 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.crud.service;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import jp.sf.fess.crud.CommonConstants;
import jp.sf.fess.crud.CrudMessageException;
import jp.sf.fess.db.cbean.SuggestBadWordCB;
import jp.sf.fess.db.exbhv.SuggestBadWordBhv;
import jp.sf.fess.db.exentity.SuggestBadWord;
import jp.sf.fess.pager.SuggestBadWordPager;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.framework.beans.util.Beans;
public abstract class BsSuggestBadWordService {
@Resource
protected SuggestBadWordBhv suggestBadWordBhv;
public BsSuggestBadWordService() {
super();
}
public List<SuggestBadWord> getSuggestBadWordList(
final SuggestBadWordPager suggestBadWordPager) {
final SuggestBadWordCB cb = new SuggestBadWordCB();
cb.fetchFirst(suggestBadWordPager.getPageSize());
cb.fetchPage(suggestBadWordPager.getCurrentPageNumber());
setupListCondition(cb, suggestBadWordPager);
final PagingResultBean<SuggestBadWord> suggestBadWordList = suggestBadWordBhv
.selectPage(cb);
// update pager
Beans.copy(suggestBadWordList, suggestBadWordPager)
.includes(CommonConstants.PAGER_CONVERSION_RULE).execute();
suggestBadWordList.setPageRangeSize(5);
suggestBadWordPager.setPageNumberList(suggestBadWordList.pageRange()
.createPageNumberList());
return suggestBadWordList;
}
public SuggestBadWord getSuggestBadWord(final Map<String, String> keys) {
final SuggestBadWordCB cb = new SuggestBadWordCB();
cb.query().setId_Equal(Long.parseLong(keys.get("id")));
// TODO Long, Integer, String supported only.
setupEntityCondition(cb, keys);
final SuggestBadWord suggestBadWord = suggestBadWordBhv
.selectEntity(cb);
if (suggestBadWord == null) {
// TODO exception?
return null;
}
return suggestBadWord;
}
public void store(final SuggestBadWord suggestBadWord)
throws CrudMessageException {
setupStoreCondition(suggestBadWord);
suggestBadWordBhv.insertOrUpdate(suggestBadWord);
}
public void delete(final SuggestBadWord suggestBadWord)
throws CrudMessageException {
setupDeleteCondition(suggestBadWord);
suggestBadWordBhv.delete(suggestBadWord);
}
protected void setupListCondition(final SuggestBadWordCB cb,
final SuggestBadWordPager suggestBadWordPager) {
if (suggestBadWordPager.id != null) {
cb.query().setId_Equal(Long.parseLong(suggestBadWordPager.id));
}
// TODO Long, Integer, String supported only.
}
protected void setupEntityCondition(final SuggestBadWordCB cb,
final Map<String, String> keys) {
}
protected void setupStoreCondition(final SuggestBadWord suggestBadWord) {
}
protected void setupDeleteCondition(final SuggestBadWord suggestBadWord) {
}
}

View file

@ -0,0 +1,121 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.crud.service;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import jp.sf.fess.crud.CommonConstants;
import jp.sf.fess.crud.CrudMessageException;
import jp.sf.fess.db.cbean.SuggestElevateWordCB;
import jp.sf.fess.db.exbhv.SuggestElevateWordBhv;
import jp.sf.fess.db.exentity.SuggestElevateWord;
import jp.sf.fess.pager.SuggestElevateWordPager;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.framework.beans.util.Beans;
public abstract class BsSuggestElevateWordService {
@Resource
protected SuggestElevateWordBhv suggestElevateWordBhv;
public BsSuggestElevateWordService() {
super();
}
public List<SuggestElevateWord> getSuggestElevateWordList(
final SuggestElevateWordPager suggestElevateWordPager) {
final SuggestElevateWordCB cb = new SuggestElevateWordCB();
cb.fetchFirst(suggestElevateWordPager.getPageSize());
cb.fetchPage(suggestElevateWordPager.getCurrentPageNumber());
setupListCondition(cb, suggestElevateWordPager);
final PagingResultBean<SuggestElevateWord> suggestElevateWordList = suggestElevateWordBhv
.selectPage(cb);
// update pager
Beans.copy(suggestElevateWordList, suggestElevateWordPager)
.includes(CommonConstants.PAGER_CONVERSION_RULE).execute();
suggestElevateWordList.setPageRangeSize(5);
suggestElevateWordPager.setPageNumberList(suggestElevateWordList
.pageRange().createPageNumberList());
return suggestElevateWordList;
}
public SuggestElevateWord getSuggestElevateWord(
final Map<String, String> keys) {
final SuggestElevateWordCB cb = new SuggestElevateWordCB();
cb.query().setId_Equal(Long.parseLong(keys.get("id")));
// TODO Long, Integer, String supported only.
setupEntityCondition(cb, keys);
final SuggestElevateWord suggestElevateWord = suggestElevateWordBhv
.selectEntity(cb);
if (suggestElevateWord == null) {
// TODO exception?
return null;
}
return suggestElevateWord;
}
public void store(final SuggestElevateWord suggestElevateWord)
throws CrudMessageException {
setupStoreCondition(suggestElevateWord);
suggestElevateWordBhv.insertOrUpdate(suggestElevateWord);
}
public void delete(final SuggestElevateWord suggestElevateWord)
throws CrudMessageException {
setupDeleteCondition(suggestElevateWord);
suggestElevateWordBhv.delete(suggestElevateWord);
}
protected void setupListCondition(final SuggestElevateWordCB cb,
final SuggestElevateWordPager suggestElevateWordPager) {
if (suggestElevateWordPager.id != null) {
cb.query().setId_Equal(Long.parseLong(suggestElevateWordPager.id));
}
// TODO Long, Integer, String supported only.
}
protected void setupEntityCondition(final SuggestElevateWordCB cb,
final Map<String, String> keys) {
}
protected void setupStoreCondition(
final SuggestElevateWord suggestElevateWord) {
}
protected void setupDeleteCondition(
final SuggestElevateWord suggestElevateWord) {
}
}

View file

@ -26,6 +26,7 @@ import java.util.Map;
import org.seasar.dbflute.jdbc.Classification;
import org.seasar.dbflute.jdbc.ClassificationCodeType;
import org.seasar.dbflute.jdbc.ClassificationMeta;
import org.seasar.dbflute.jdbc.ClassificationUndefinedHandlingType;
/**
* The definition of classification.
@ -279,6 +280,11 @@ public interface CDef extends Classification {
ProcessType,
/** Access Type */
AccessType;
@Override
public String classificationName() {
return name(); // same as definition name
}
@Override
public Classification codeOf(final Object code) {
if ("ProcessType".equals(name())) {
@ -338,5 +344,16 @@ public interface CDef extends Classification {
}
return ClassificationCodeType.String; // as default
}
@Override
public ClassificationUndefinedHandlingType undefinedHandlingType() {
if ("ProcessType".equals(name())) {
return ClassificationUndefinedHandlingType.EXCEPTION;
}
if ("AccessType".equals(name())) {
return ClassificationUndefinedHandlingType.EXCEPTION;
}
return ClassificationUndefinedHandlingType.LOGGING; // as default
}
}
}

View file

@ -79,15 +79,17 @@ public class DBFluteConfig {
protected boolean _thatsBadTimingDetect = false;
protected boolean _nullOrEmptyQueryAllowed = true;
protected boolean _emptyStringQueryAllowed;
protected boolean _emptyStringParameterAllowed;
protected boolean _invalidQueryChecked;
protected boolean _overridingQueryAllowed = true;
protected boolean _disableSelectIndex;
protected boolean _checkCountBeforeQueryUpdate = false;
protected boolean _queryUpdateCountPreCheck = false;
// logging
protected boolean _queryLogLevelInfo;
@ -229,14 +231,36 @@ public class DBFluteConfig {
// ===================================================================================
// Invalid Query
// =============
public boolean isNullOrEmptyQueryAllowed() {
return _nullOrEmptyQueryAllowed;
}
/**
* Set whether null-or-empty query is allowed or not. <br />
* This configuration is only for ConditionBean.
* @param nullOrEmptyQueryAllowed The determination, true or false.
*/
public void setNullOrEmptyQueryAllowed(final boolean nullOrEmptyQueryAllowed) {
assertNotLocked();
if (_log.isInfoEnabled()) {
_log.info("...Setting nullOrEmptyQueryAllowed: "
+ nullOrEmptyQueryAllowed);
}
_nullOrEmptyQueryAllowed = nullOrEmptyQueryAllowed;
}
public void setInvalidQueryChecked(final boolean invalidQueryChecked) { // for compatible
setNullOrEmptyQueryAllowed(!invalidQueryChecked);
}
public boolean isEmptyStringQueryAllowed() {
return _emptyStringQueryAllowed;
}
/**
* Set whether an empty string for query is allowed or not. {default: false}<br />
* Set whether an empty string for query is allowed or not. <br />
* This configuration is only for ConditionBean.
* @param emptyStringQueryAllowed Determination.
* @param emptyStringQueryAllowed The determination, true or false.
*/
public void setEmptyStringQueryAllowed(final boolean emptyStringQueryAllowed) {
assertNotLocked();
@ -252,9 +276,9 @@ public class DBFluteConfig {
}
/**
* Set whether an empty string for parameter is allowed or not. {default: false}<br />
* Set whether an empty string for parameter is allowed or not. <br />
* This configuration is only for ParameterBean.
* @param emptyStringParameterAllowed Determination.
* @param emptyStringParameterAllowed The determination, true or false.
*/
public void setEmptyStringParameterAllowed(
final boolean emptyStringParameterAllowed) {
@ -266,21 +290,22 @@ public class DBFluteConfig {
_emptyStringParameterAllowed = emptyStringParameterAllowed;
}
public boolean isInvalidQueryChecked() {
return _invalidQueryChecked;
public boolean isOverridingQueryAllowed() {
return _overridingQueryAllowed;
}
/**
* Set whether an invalid query is checked or not. {default: false}<br />
* Set whether overriding query is allowed or not. <br />
* This configuration is only for ConditionBean.
* @param invalidQueryChecked Determination.
* @param overridingQueryAllowed The determination, true or false.
*/
public void setInvalidQueryChecked(final boolean invalidQueryChecked) {
public void setOverridingQueryAllowed(final boolean overridingQueryAllowed) {
assertNotLocked();
if (_log.isInfoEnabled()) {
_log.info("...Setting invalidQueryChecked: " + invalidQueryChecked);
_log.info("...Setting overridingQueryAllowed: "
+ overridingQueryAllowed);
}
_invalidQueryChecked = invalidQueryChecked;
_overridingQueryAllowed = overridingQueryAllowed;
}
// ===================================================================================
@ -301,18 +326,18 @@ public class DBFluteConfig {
// ===================================================================================
// Query Update
// ============
public boolean isCheckCountBeforeQueryUpdate() {
return _checkCountBeforeQueryUpdate;
public boolean isQueryUpdateCountPreCheck() {
return _queryUpdateCountPreCheck;
}
public void setCheckCountBeforeQueryUpdate(
final boolean checkCountBeforeQueryUpdate) {
public void setQueryUpdateCountPreCheck(
final boolean queryUpdateCountPreCheck) {
assertNotLocked();
if (_log.isInfoEnabled()) {
_log.info("...Setting checkCountBeforeQueryUpdate: "
+ checkCountBeforeQueryUpdate);
_log.info("...Setting queryUpdateCountPreCheck: "
+ queryUpdateCountPreCheck);
}
_checkCountBeforeQueryUpdate = checkCountBeforeQueryUpdate;
_queryUpdateCountPreCheck = queryUpdateCountPreCheck;
}
// ===================================================================================

View file

@ -47,6 +47,8 @@ public class DBMetaInstanceHandler implements DBMetaProvider {
protected static final Map<String, String> _tableDbNameClassNameMap;
static {
final Map<String, String> tmpMap = newHashMap();
tmpMap.put("BOOST_DOCUMENT_RULE",
"jp.sf.fess.db.bsentity.dbmeta.BoostDocumentRuleDbm");
tmpMap.put("CLICK_LOG", "jp.sf.fess.db.bsentity.dbmeta.ClickLogDbm");
tmpMap.put("CRAWLING_SESSION",
"jp.sf.fess.db.bsentity.dbmeta.CrawlingSessionDbm");
@ -86,6 +88,10 @@ public class DBMetaInstanceHandler implements DBMetaProvider {
tmpMap.put("SEARCH_FIELD_LOG",
"jp.sf.fess.db.bsentity.dbmeta.SearchFieldLogDbm");
tmpMap.put("SEARCH_LOG", "jp.sf.fess.db.bsentity.dbmeta.SearchLogDbm");
tmpMap.put("SUGGEST_BAD_WORD",
"jp.sf.fess.db.bsentity.dbmeta.SuggestBadWordDbm");
tmpMap.put("SUGGEST_ELEVATE_WORD",
"jp.sf.fess.db.bsentity.dbmeta.SuggestElevateWordDbm");
tmpMap.put("USER_INFO", "jp.sf.fess.db.bsentity.dbmeta.UserInfoDbm");
tmpMap.put("WEB_AUTHENTICATION",
"jp.sf.fess.db.bsentity.dbmeta.WebAuthenticationDbm");

View file

@ -28,6 +28,7 @@ import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.IllegalBehaviorStateException;
import org.seasar.dbflute.util.DfTraceViewUtil;
import org.seasar.dbflute.util.DfTypeUtil;
import org.seasar.dbflute.util.Srl;
import org.seasar.framework.container.ComponentNotFoundRuntimeException;
import org.seasar.framework.container.S2Container;
@ -187,6 +188,11 @@ public class ImplementedBehaviorSelector implements BehaviorSelector {
// ===================================================================================
// General Helper
// ==============
protected String replace(final String str, final String fromStr,
final String toStr) {
return Srl.replace(str, fromStr, toStr);
}
protected String initUncap(final String str) {
return str.substring(0, 1).toLowerCase() + str.substring(1);
}

View file

@ -175,16 +175,23 @@ public class ImplementedSqlClauseCreator implements SqlClauseCreator {
// ======
protected void setupSqlClauseOption(final SqlClause sqlClause) {
if (isInnerJoinAutoDetect()) {
sqlClause.allowInnerJoinAutoDetect();
sqlClause.enableInnerJoinAutoDetect();
}
if (isThatsBadTimingDetect()) {
sqlClause.allowThatsBadTimingDetect();
sqlClause.enableThatsBadTimingDetect();
}
if (isNullOrEmptyQueryAllowed()) { // default for 1.0.5
sqlClause.ignoreNullOrEmptyQuery();
} else { // default for 1.1
sqlClause.checkNullOrEmptyQuery();
}
if (isEmptyStringQueryAllowed()) {
sqlClause.allowEmptyStringQuery();
sqlClause.enableEmptyStringQuery();
}
if (isInvalidQueryChecked()) {
sqlClause.checkInvalidQuery();
if (isOverridingQueryAllowed()) { // default for 1.0.5
sqlClause.enableOverridingQuery();
} else { // default for 1.1
sqlClause.disableOverridingQuery();
}
if (isDisableSelectIndex()) {
sqlClause.disableSelectIndex();
@ -206,12 +213,16 @@ public class ImplementedSqlClauseCreator implements SqlClauseCreator {
return DBFluteConfig.getInstance().isThatsBadTimingDetect();
}
protected boolean isNullOrEmptyQueryAllowed() {
return DBFluteConfig.getInstance().isNullOrEmptyQueryAllowed();
}
protected boolean isEmptyStringQueryAllowed() {
return DBFluteConfig.getInstance().isEmptyStringQueryAllowed();
}
protected boolean isInvalidQueryChecked() {
return DBFluteConfig.getInstance().isInvalidQueryChecked();
protected boolean isOverridingQueryAllowed() {
return DBFluteConfig.getInstance().isOverridingQueryAllowed();
}
protected boolean isDisableSelectIndex() {

File diff suppressed because it is too large Load diff

View file

@ -37,9 +37,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
import org.seasar.dbflute.exception.EntityAlreadyExistsException;
@ -82,7 +80,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
public abstract class BsClickLogBhv extends
AbstractBehaviorWritable<ClickLog, ClickLogCB> {
// ===================================================================================
// Definition
@ -92,21 +91,12 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "CLICK_LOG";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public ClickLogDbm getDBMeta() {
return ClickLogDbm.getInstance();
}
@ -118,12 +108,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public ClickLog newEntity() {
return new ClickLog();
}
/** {@inheritDoc} */
@Override
public ClickLogCB newConditionBean() {
@ -158,25 +142,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final ClickLogCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final ClickLogCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final ClickLogCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -207,13 +172,8 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends ClickLog> ENTITY doSelectEntity(
final ClickLogCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends ClickLog> OptionalEntity<ENTITY> doSelectOptionalEntity(
final ClickLogCB cb, final Class<ENTITY> tp) {
final ClickLogCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -241,22 +201,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected ClickLog facadeSelectEntityWithDeletedCheck(final ClickLogCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends ClickLog> ENTITY doSelectEntityWithDeletedCheck(
final ClickLogCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -273,12 +217,12 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends ClickLog> ENTITY doSelectByPK(final Long id,
final Class<ENTITY> tp) {
final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends ClickLog> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -326,20 +270,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<ClickLog> facadeSelectList(final ClickLogCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends ClickLog> ListResultBean<ENTITY> doSelectList(
final ClickLogCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -369,21 +299,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<ClickLog> facadeSelectPage(final ClickLogCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends ClickLog> PagingResultBean<ENTITY> doSelectPage(
final ClickLogCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -406,21 +321,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final ClickLogCB cb,
final EntityRowHandler<ClickLog> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends ClickLog> void doSelectCursor(
final ClickLogCB cb, final EntityRowHandler<ENTITY> handler,
final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -444,27 +344,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<ClickLogCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends ClickLogCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -602,28 +481,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
doInsert(clickLog, null);
}
protected void doInsert(final ClickLog et, final InsertOption<ClickLogCB> op) {
assertObjectNotNull("clickLog", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(final InsertOption<ClickLogCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -650,49 +507,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
doUpdate(clickLog, null);
}
protected void doUpdate(final ClickLog et, final UpdateOption<ClickLogCB> op) {
assertObjectNotNull("clickLog", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(final UpdateOption<ClickLogCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected ClickLogCB createCBForVaryingUpdate() {
final ClickLogCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected ClickLogCB createCBForSpecifiedUpdate() {
final ClickLogCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doModify(et, op);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -706,27 +520,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(clickLog, null, null);
}
protected void doInsertOrUpdate(final ClickLog et,
final InsertOption<ClickLogCB> iop,
final UpdateOption<ClickLogCB> uop) {
assertObjectNotNull("clickLog", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doCreateOrModify(et, iop, uop);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -748,30 +541,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
doDelete(clickLog, null);
}
protected void doDelete(final ClickLog et, final DeleteOption<ClickLogCB> op) {
assertObjectNotNull("clickLog", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(final DeleteOption<ClickLogCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doRemove(et, op);
}
// ===================================================================================
// Batch Update
// ============
@ -803,32 +572,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
return doBatchInsert(clickLogList, null);
}
protected int[] doBatchInsert(final List<ClickLog> ls,
final InsertOption<ClickLogCB> op) {
assertObjectNotNull("clickLogList", ls);
InsertOption<ClickLogCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<ClickLog> ls,
final InsertOption<ClickLogCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -857,31 +600,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
return doBatchUpdate(clickLogList, null);
}
protected int[] doBatchUpdate(final List<ClickLog> ls,
final UpdateOption<ClickLogCB> op) {
assertObjectNotNull("clickLogList", ls);
UpdateOption<ClickLogCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<ClickLog> ls,
final UpdateOption<ClickLogCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -916,12 +634,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doLumpModify(ls, op);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -933,25 +645,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
return doBatchDelete(clickLogList, null);
}
protected int[] doBatchDelete(final List<ClickLog> ls,
final DeleteOption<ClickLogCB> op) {
assertObjectNotNull("clickLogList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doLumpRemove(ls, op);
}
// ===================================================================================
// Query Update
// ============
@ -959,7 +652,7 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* clickLogBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;ClickLog, ClickLogCB&gt;() {
* public ConditionBean setup(clickLog entity, ClickLogCB intoCB) {
* public ConditionBean setup(ClickLog entity, ClickLogCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -978,7 +671,7 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -986,29 +679,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<ClickLog, ClickLogCB> sp,
final InsertOption<ClickLogCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final ClickLog et = newEntity();
final ClickLogCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected ClickLogCB createCBForQueryInsert() {
final ClickLogCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1035,21 +705,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
return doQueryUpdate(clickLog, cb, null);
}
protected int doQueryUpdate(final ClickLog et, final ClickLogCB cb,
final UpdateOption<ClickLogCB> op) {
assertObjectNotNull("clickLog", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1065,20 +720,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final ClickLogCB cb,
final DeleteOption<ClickLogCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1232,7 +873,7 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1333,46 +974,20 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<ClickLog> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends ClickLog> typeOfSelectedEntity() {
return ClickLog.class;
}
protected ClickLog downcast(final Entity et) {
return helpEntityDowncastInternally(et, ClickLog.class);
@Override
protected Class<ClickLog> typeOfHandlingEntity() {
return ClickLog.class;
}
protected ClickLogCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb, ClickLogCB.class);
}
@SuppressWarnings("unchecked")
protected List<ClickLog> downcast(final List<? extends Entity> ls) {
return (List<ClickLog>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<ClickLogCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<ClickLogCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<ClickLogCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<ClickLogCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<ClickLogCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<ClickLogCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<ClickLog, ClickLogCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<ClickLog, ClickLogCB>) sp;
@Override
protected Class<ClickLogCB> typeOfHandlingConditionBean() {
return ClickLogCB.class;
}
}

View file

@ -41,9 +41,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
import org.seasar.dbflute.exception.EntityAlreadyExistsException;
@ -86,7 +84,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
public abstract class BsCrawlingSessionBhv extends
AbstractBehaviorWritable<CrawlingSession, CrawlingSessionCB> {
// ===================================================================================
// Definition
@ -94,21 +93,12 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "CRAWLING_SESSION";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public CrawlingSessionDbm getDBMeta() {
return CrawlingSessionDbm.getInstance();
}
@ -120,12 +110,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public CrawlingSession newEntity() {
return new CrawlingSession();
}
/** {@inheritDoc} */
@Override
public CrawlingSessionCB newConditionBean() {
@ -160,25 +144,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final CrawlingSessionCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final CrawlingSessionCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final CrawlingSessionCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -209,13 +174,8 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends CrawlingSession> ENTITY doSelectEntity(
final CrawlingSessionCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends CrawlingSession> OptionalEntity<ENTITY> doSelectOptionalEntity(
final CrawlingSessionCB cb, final Class<ENTITY> tp) {
final CrawlingSessionCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -244,23 +204,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected CrawlingSession facadeSelectEntityWithDeletedCheck(
final CrawlingSessionCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends CrawlingSession> ENTITY doSelectEntityWithDeletedCheck(
final CrawlingSessionCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -277,12 +220,12 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends CrawlingSession> ENTITY doSelectByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends CrawlingSession> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -330,21 +273,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<CrawlingSession> facadeSelectList(
final CrawlingSessionCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends CrawlingSession> ListResultBean<ENTITY> doSelectList(
final CrawlingSessionCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -375,22 +303,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<CrawlingSession> facadeSelectPage(
final CrawlingSessionCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends CrawlingSession> PagingResultBean<ENTITY> doSelectPage(
final CrawlingSessionCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -413,21 +325,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final CrawlingSessionCB cb,
final EntityRowHandler<CrawlingSession> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends CrawlingSession> void doSelectCursor(
final CrawlingSessionCB cb, final EntityRowHandler<ENTITY> handler,
final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -451,27 +348,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<CrawlingSessionCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends CrawlingSessionCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -650,7 +526,7 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param crawlingSessionList The entity list of crawlingSession. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -714,29 +590,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
doInsert(crawlingSession, null);
}
protected void doInsert(final CrawlingSession et,
final InsertOption<CrawlingSessionCB> op) {
assertObjectNotNull("crawlingSession", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(final InsertOption<CrawlingSessionCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -763,50 +616,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
doUpdate(crawlingSession, null);
}
protected void doUpdate(final CrawlingSession et,
final UpdateOption<CrawlingSessionCB> op) {
assertObjectNotNull("crawlingSession", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(final UpdateOption<CrawlingSessionCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected CrawlingSessionCB createCBForVaryingUpdate() {
final CrawlingSessionCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected CrawlingSessionCB createCBForSpecifiedUpdate() {
final CrawlingSessionCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doModify(et, op);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -820,27 +629,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(crawlingSession, null, null);
}
protected void doInsertOrUpdate(final CrawlingSession et,
final InsertOption<CrawlingSessionCB> iop,
final UpdateOption<CrawlingSessionCB> uop) {
assertObjectNotNull("crawlingSession", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doCreateOrModify(et, iop, uop);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -862,31 +650,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
doDelete(crawlingSession, null);
}
protected void doDelete(final CrawlingSession et,
final DeleteOption<CrawlingSessionCB> op) {
assertObjectNotNull("crawlingSession", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(final DeleteOption<CrawlingSessionCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doRemove(et, op);
}
// ===================================================================================
// Batch Update
// ============
@ -918,32 +681,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
return doBatchInsert(crawlingSessionList, null);
}
protected int[] doBatchInsert(final List<CrawlingSession> ls,
final InsertOption<CrawlingSessionCB> op) {
assertObjectNotNull("crawlingSessionList", ls);
InsertOption<CrawlingSessionCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<CrawlingSession> ls,
final InsertOption<CrawlingSessionCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -972,31 +709,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
return doBatchUpdate(crawlingSessionList, null);
}
protected int[] doBatchUpdate(final List<CrawlingSession> ls,
final UpdateOption<CrawlingSessionCB> op) {
assertObjectNotNull("crawlingSessionList", ls);
UpdateOption<CrawlingSessionCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<CrawlingSession> ls,
final UpdateOption<CrawlingSessionCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1031,12 +743,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doLumpModify(ls, op);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1048,25 +754,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
return doBatchDelete(crawlingSessionList, null);
}
protected int[] doBatchDelete(final List<CrawlingSession> ls,
final DeleteOption<CrawlingSessionCB> op) {
assertObjectNotNull("crawlingSessionList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doLumpRemove(ls, op);
}
// ===================================================================================
// Query Update
// ============
@ -1074,7 +761,7 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* crawlingSessionBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;CrawlingSession, CrawlingSessionCB&gt;() {
* public ConditionBean setup(crawlingSession entity, CrawlingSessionCB intoCB) {
* public ConditionBean setup(CrawlingSession entity, CrawlingSessionCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1093,7 +780,7 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1101,29 +788,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<CrawlingSession, CrawlingSessionCB> sp,
final InsertOption<CrawlingSessionCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final CrawlingSession et = newEntity();
final CrawlingSessionCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected CrawlingSessionCB createCBForQueryInsert() {
final CrawlingSessionCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1151,21 +815,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
return doQueryUpdate(crawlingSession, cb, null);
}
protected int doQueryUpdate(final CrawlingSession et,
final CrawlingSessionCB cb, final UpdateOption<CrawlingSessionCB> op) {
assertObjectNotNull("crawlingSession", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1181,20 +830,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final CrawlingSessionCB cb,
final DeleteOption<CrawlingSessionCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1351,7 +986,7 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1453,46 +1088,20 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<CrawlingSession> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends CrawlingSession> typeOfSelectedEntity() {
return CrawlingSession.class;
}
protected CrawlingSession downcast(final Entity et) {
return helpEntityDowncastInternally(et, CrawlingSession.class);
@Override
protected Class<CrawlingSession> typeOfHandlingEntity() {
return CrawlingSession.class;
}
protected CrawlingSessionCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb, CrawlingSessionCB.class);
}
@SuppressWarnings("unchecked")
protected List<CrawlingSession> downcast(final List<? extends Entity> ls) {
return (List<CrawlingSession>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<CrawlingSessionCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<CrawlingSessionCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<CrawlingSessionCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<CrawlingSessionCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<CrawlingSessionCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<CrawlingSessionCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<CrawlingSession, CrawlingSessionCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<CrawlingSession, CrawlingSessionCB>) sp;
@Override
protected Class<CrawlingSessionCB> typeOfHandlingConditionBean() {
return CrawlingSessionCB.class;
}
}

View file

@ -37,9 +37,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
import org.seasar.dbflute.exception.EntityAlreadyExistsException;
@ -82,7 +80,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable {
public abstract class BsCrawlingSessionInfoBhv extends
AbstractBehaviorWritable<CrawlingSessionInfo, CrawlingSessionInfoCB> {
// ===================================================================================
// Definition
@ -90,21 +89,12 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "CRAWLING_SESSION_INFO";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public CrawlingSessionInfoDbm getDBMeta() {
return CrawlingSessionInfoDbm.getInstance();
}
@ -116,12 +106,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public CrawlingSessionInfo newEntity() {
return new CrawlingSessionInfo();
}
/** {@inheritDoc} */
@Override
public CrawlingSessionInfoCB newConditionBean() {
@ -156,25 +140,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final CrawlingSessionInfoCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final CrawlingSessionInfoCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final CrawlingSessionInfoCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -206,13 +171,8 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends CrawlingSessionInfo> ENTITY doSelectEntity(
final CrawlingSessionInfoCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends CrawlingSessionInfo> OptionalEntity<ENTITY> doSelectOptionalEntity(
final CrawlingSessionInfoCB cb, final Class<ENTITY> tp) {
final CrawlingSessionInfoCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -241,23 +201,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
return facadeSelectEntityWithDeletedCheck(cb);
}
protected CrawlingSessionInfo facadeSelectEntityWithDeletedCheck(
final CrawlingSessionInfoCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends CrawlingSessionInfo> ENTITY doSelectEntityWithDeletedCheck(
final CrawlingSessionInfoCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -274,12 +217,12 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
}
protected <ENTITY extends CrawlingSessionInfo> ENTITY doSelectByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends CrawlingSessionInfo> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -328,21 +271,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
return facadeSelectList(cb);
}
protected ListResultBean<CrawlingSessionInfo> facadeSelectList(
final CrawlingSessionInfoCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends CrawlingSessionInfo> ListResultBean<ENTITY> doSelectList(
final CrawlingSessionInfoCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -373,22 +301,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
return facadeSelectPage(cb);
}
protected PagingResultBean<CrawlingSessionInfo> facadeSelectPage(
final CrawlingSessionInfoCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends CrawlingSessionInfo> PagingResultBean<ENTITY> doSelectPage(
final CrawlingSessionInfoCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -411,21 +323,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final CrawlingSessionInfoCB cb,
final EntityRowHandler<CrawlingSessionInfo> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends CrawlingSessionInfo> void doSelectCursor(
final CrawlingSessionInfoCB cb,
final EntityRowHandler<ENTITY> handler, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -449,27 +346,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<CrawlingSessionInfoCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends CrawlingSessionInfoCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -609,30 +485,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
doInsert(crawlingSessionInfo, null);
}
protected void doInsert(final CrawlingSessionInfo et,
final InsertOption<CrawlingSessionInfoCB> op) {
assertObjectNotNull("crawlingSessionInfo", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(
final InsertOption<CrawlingSessionInfoCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -659,51 +511,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
doUpdate(crawlingSessionInfo, null);
}
protected void doUpdate(final CrawlingSessionInfo et,
final UpdateOption<CrawlingSessionInfoCB> op) {
assertObjectNotNull("crawlingSessionInfo", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(
final UpdateOption<CrawlingSessionInfoCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected CrawlingSessionInfoCB createCBForVaryingUpdate() {
final CrawlingSessionInfoCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected CrawlingSessionInfoCB createCBForSpecifiedUpdate() {
final CrawlingSessionInfoCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doModify(et, op);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -717,27 +524,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
doInsertOrUpdate(crawlingSessionInfo, null, null);
}
protected void doInsertOrUpdate(final CrawlingSessionInfo et,
final InsertOption<CrawlingSessionInfoCB> iop,
final UpdateOption<CrawlingSessionInfoCB> uop) {
assertObjectNotNull("crawlingSessionInfo", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doCreateOrModify(et, iop, uop);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -759,32 +545,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
doDelete(crawlingSessionInfo, null);
}
protected void doDelete(final CrawlingSessionInfo et,
final DeleteOption<CrawlingSessionInfoCB> op) {
assertObjectNotNull("crawlingSessionInfo", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(
final DeleteOption<CrawlingSessionInfoCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doRemove(et, op);
}
// ===================================================================================
// Batch Update
// ============
@ -817,32 +577,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
return doBatchInsert(crawlingSessionInfoList, null);
}
protected int[] doBatchInsert(final List<CrawlingSessionInfo> ls,
final InsertOption<CrawlingSessionInfoCB> op) {
assertObjectNotNull("crawlingSessionInfoList", ls);
InsertOption<CrawlingSessionInfoCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<CrawlingSessionInfo> ls,
final InsertOption<CrawlingSessionInfoCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -872,31 +606,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
return doBatchUpdate(crawlingSessionInfoList, null);
}
protected int[] doBatchUpdate(final List<CrawlingSessionInfo> ls,
final UpdateOption<CrawlingSessionInfoCB> op) {
assertObjectNotNull("crawlingSessionInfoList", ls);
UpdateOption<CrawlingSessionInfoCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<CrawlingSessionInfo> ls,
final UpdateOption<CrawlingSessionInfoCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -932,12 +641,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doLumpModify(ls, op);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -950,25 +653,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
return doBatchDelete(crawlingSessionInfoList, null);
}
protected int[] doBatchDelete(final List<CrawlingSessionInfo> ls,
final DeleteOption<CrawlingSessionInfoCB> op) {
assertObjectNotNull("crawlingSessionInfoList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doLumpRemove(ls, op);
}
// ===================================================================================
// Query Update
// ============
@ -976,7 +660,7 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* crawlingSessionInfoBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;CrawlingSessionInfo, CrawlingSessionInfoCB&gt;() {
* public ConditionBean setup(crawlingSessionInfo entity, CrawlingSessionInfoCB intoCB) {
* public ConditionBean setup(CrawlingSessionInfo entity, CrawlingSessionInfoCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -995,7 +679,7 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1003,29 +687,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<CrawlingSessionInfo, CrawlingSessionInfoCB> sp,
final InsertOption<CrawlingSessionInfoCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final CrawlingSessionInfo et = newEntity();
final CrawlingSessionInfoCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected CrawlingSessionInfoCB createCBForQueryInsert() {
final CrawlingSessionInfoCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1053,22 +714,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
return doQueryUpdate(crawlingSessionInfo, cb, null);
}
protected int doQueryUpdate(final CrawlingSessionInfo et,
final CrawlingSessionInfoCB cb,
final UpdateOption<CrawlingSessionInfoCB> op) {
assertObjectNotNull("crawlingSessionInfo", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1084,20 +729,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final CrawlingSessionInfoCB cb,
final DeleteOption<CrawlingSessionInfoCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1255,7 +886,7 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1358,47 +989,20 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
}
// ===================================================================================
// Assist Helper
// =============
protected Class<CrawlingSessionInfo> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends CrawlingSessionInfo> typeOfSelectedEntity() {
return CrawlingSessionInfo.class;
}
protected CrawlingSessionInfo downcast(final Entity et) {
return helpEntityDowncastInternally(et, CrawlingSessionInfo.class);
@Override
protected Class<CrawlingSessionInfo> typeOfHandlingEntity() {
return CrawlingSessionInfo.class;
}
protected CrawlingSessionInfoCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb,
CrawlingSessionInfoCB.class);
}
@SuppressWarnings("unchecked")
protected List<CrawlingSessionInfo> downcast(final List<? extends Entity> ls) {
return (List<CrawlingSessionInfo>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<CrawlingSessionInfoCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<CrawlingSessionInfoCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<CrawlingSessionInfoCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<CrawlingSessionInfoCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<CrawlingSessionInfoCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<CrawlingSessionInfoCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<CrawlingSessionInfo, CrawlingSessionInfoCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<CrawlingSessionInfo, CrawlingSessionInfoCB>) sp;
@Override
protected Class<CrawlingSessionInfoCB> typeOfHandlingConditionBean() {
return CrawlingSessionInfoCB.class;
}
}

View file

@ -38,9 +38,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
import org.seasar.dbflute.exception.EntityAlreadyExistsException;
@ -83,8 +81,9 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsDataConfigToLabelTypeMappingBhv extends
AbstractBehaviorWritable {
public abstract class BsDataConfigToLabelTypeMappingBhv
extends
AbstractBehaviorWritable<DataConfigToLabelTypeMapping, DataConfigToLabelTypeMappingCB> {
// ===================================================================================
// Definition
@ -92,21 +91,12 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "DATA_CONFIG_TO_LABEL_TYPE_MAPPING";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public DataConfigToLabelTypeMappingDbm getDBMeta() {
return DataConfigToLabelTypeMappingDbm.getInstance();
}
@ -118,12 +108,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public DataConfigToLabelTypeMapping newEntity() {
return new DataConfigToLabelTypeMapping();
}
/** {@inheritDoc} */
@Override
public DataConfigToLabelTypeMappingCB newConditionBean() {
@ -158,25 +142,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final DataConfigToLabelTypeMappingCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final DataConfigToLabelTypeMappingCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final DataConfigToLabelTypeMappingCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -209,13 +174,9 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends DataConfigToLabelTypeMapping> ENTITY doSelectEntity(
final DataConfigToLabelTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends DataConfigToLabelTypeMapping> OptionalEntity<ENTITY> doSelectOptionalEntity(
final DataConfigToLabelTypeMappingCB cb, final Class<ENTITY> tp) {
final DataConfigToLabelTypeMappingCB cb,
final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -244,23 +205,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
return facadeSelectEntityWithDeletedCheck(cb);
}
protected DataConfigToLabelTypeMapping facadeSelectEntityWithDeletedCheck(
final DataConfigToLabelTypeMappingCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends DataConfigToLabelTypeMapping> ENTITY doSelectEntityWithDeletedCheck(
final DataConfigToLabelTypeMappingCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -277,12 +221,12 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
}
protected <ENTITY extends DataConfigToLabelTypeMapping> ENTITY doSelectByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends DataConfigToLabelTypeMapping> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -332,21 +276,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
return facadeSelectList(cb);
}
protected ListResultBean<DataConfigToLabelTypeMapping> facadeSelectList(
final DataConfigToLabelTypeMappingCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends DataConfigToLabelTypeMapping> ListResultBean<ENTITY> doSelectList(
final DataConfigToLabelTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -377,22 +306,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
return facadeSelectPage(cb);
}
protected PagingResultBean<DataConfigToLabelTypeMapping> facadeSelectPage(
final DataConfigToLabelTypeMappingCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends DataConfigToLabelTypeMapping> PagingResultBean<ENTITY> doSelectPage(
final DataConfigToLabelTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -416,22 +329,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(
final DataConfigToLabelTypeMappingCB cb,
final EntityRowHandler<DataConfigToLabelTypeMapping> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends DataConfigToLabelTypeMapping> void doSelectCursor(
final DataConfigToLabelTypeMappingCB cb,
final EntityRowHandler<ENTITY> handler, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -455,27 +352,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<DataConfigToLabelTypeMappingCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends DataConfigToLabelTypeMappingCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -630,30 +506,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
doInsert(dataConfigToLabelTypeMapping, null);
}
protected void doInsert(final DataConfigToLabelTypeMapping et,
final InsertOption<DataConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("dataConfigToLabelTypeMapping", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(
final InsertOption<DataConfigToLabelTypeMappingCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -681,51 +533,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
doUpdate(dataConfigToLabelTypeMapping, null);
}
protected void doUpdate(final DataConfigToLabelTypeMapping et,
final UpdateOption<DataConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("dataConfigToLabelTypeMapping", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(
final UpdateOption<DataConfigToLabelTypeMappingCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected DataConfigToLabelTypeMappingCB createCBForVaryingUpdate() {
final DataConfigToLabelTypeMappingCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected DataConfigToLabelTypeMappingCB createCBForSpecifiedUpdate() {
final DataConfigToLabelTypeMappingCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doModify(et, op);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -740,27 +547,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
doInsertOrUpdate(dataConfigToLabelTypeMapping, null, null);
}
protected void doInsertOrUpdate(final DataConfigToLabelTypeMapping et,
final InsertOption<DataConfigToLabelTypeMappingCB> iop,
final UpdateOption<DataConfigToLabelTypeMappingCB> uop) {
assertObjectNotNull("dataConfigToLabelTypeMapping", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doCreateOrModify(et, iop, uop);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -783,32 +569,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
doDelete(dataConfigToLabelTypeMapping, null);
}
protected void doDelete(final DataConfigToLabelTypeMapping et,
final DeleteOption<DataConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("dataConfigToLabelTypeMapping", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(
final DeleteOption<DataConfigToLabelTypeMappingCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doRemove(et, op);
}
// ===================================================================================
// Batch Update
// ============
@ -841,33 +601,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
return doBatchInsert(dataConfigToLabelTypeMappingList, null);
}
protected int[] doBatchInsert(final List<DataConfigToLabelTypeMapping> ls,
final InsertOption<DataConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("dataConfigToLabelTypeMappingList", ls);
InsertOption<DataConfigToLabelTypeMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(
final List<DataConfigToLabelTypeMapping> ls,
final InsertOption<DataConfigToLabelTypeMappingCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -897,32 +630,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
return doBatchUpdate(dataConfigToLabelTypeMappingList, null);
}
protected int[] doBatchUpdate(final List<DataConfigToLabelTypeMapping> ls,
final UpdateOption<DataConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("dataConfigToLabelTypeMappingList", ls);
UpdateOption<DataConfigToLabelTypeMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(
final List<DataConfigToLabelTypeMapping> ls,
final UpdateOption<DataConfigToLabelTypeMappingCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -958,12 +665,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doLumpModify(ls, op);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -976,25 +677,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
return doBatchDelete(dataConfigToLabelTypeMappingList, null);
}
protected int[] doBatchDelete(final List<DataConfigToLabelTypeMapping> ls,
final DeleteOption<DataConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("dataConfigToLabelTypeMappingList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doLumpRemove(ls, op);
}
// ===================================================================================
// Query Update
// ============
@ -1002,7 +684,7 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* dataConfigToLabelTypeMappingBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;DataConfigToLabelTypeMapping, DataConfigToLabelTypeMappingCB&gt;() {
* public ConditionBean setup(dataConfigToLabelTypeMapping entity, DataConfigToLabelTypeMappingCB intoCB) {
* public ConditionBean setup(DataConfigToLabelTypeMapping entity, DataConfigToLabelTypeMappingCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1021,7 +703,7 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1029,29 +711,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<DataConfigToLabelTypeMapping, DataConfigToLabelTypeMappingCB> sp,
final InsertOption<DataConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final DataConfigToLabelTypeMapping et = newEntity();
final DataConfigToLabelTypeMappingCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected DataConfigToLabelTypeMappingCB createCBForQueryInsert() {
final DataConfigToLabelTypeMappingCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1080,22 +739,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
return doQueryUpdate(dataConfigToLabelTypeMapping, cb, null);
}
protected int doQueryUpdate(final DataConfigToLabelTypeMapping et,
final DataConfigToLabelTypeMappingCB cb,
final UpdateOption<DataConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("dataConfigToLabelTypeMapping", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1111,20 +754,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final DataConfigToLabelTypeMappingCB cb,
final DeleteOption<DataConfigToLabelTypeMappingCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1286,7 +915,7 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1389,49 +1018,20 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
}
// ===================================================================================
// Assist Helper
// =============
protected Class<DataConfigToLabelTypeMapping> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends DataConfigToLabelTypeMapping> typeOfSelectedEntity() {
return DataConfigToLabelTypeMapping.class;
}
protected DataConfigToLabelTypeMapping downcast(final Entity et) {
return helpEntityDowncastInternally(et,
DataConfigToLabelTypeMapping.class);
@Override
protected Class<DataConfigToLabelTypeMapping> typeOfHandlingEntity() {
return DataConfigToLabelTypeMapping.class;
}
protected DataConfigToLabelTypeMappingCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb,
DataConfigToLabelTypeMappingCB.class);
}
@SuppressWarnings("unchecked")
protected List<DataConfigToLabelTypeMapping> downcast(
final List<? extends Entity> ls) {
return (List<DataConfigToLabelTypeMapping>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<DataConfigToLabelTypeMappingCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<DataConfigToLabelTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<DataConfigToLabelTypeMappingCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<DataConfigToLabelTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<DataConfigToLabelTypeMappingCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<DataConfigToLabelTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<DataConfigToLabelTypeMapping, DataConfigToLabelTypeMappingCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<DataConfigToLabelTypeMapping, DataConfigToLabelTypeMappingCB>) sp;
@Override
protected Class<DataConfigToLabelTypeMappingCB> typeOfHandlingConditionBean() {
return DataConfigToLabelTypeMappingCB.class;
}
}

View file

@ -38,9 +38,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
import org.seasar.dbflute.exception.EntityAlreadyExistsException;
@ -83,8 +81,9 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsDataConfigToRoleTypeMappingBhv extends
AbstractBehaviorWritable {
public abstract class BsDataConfigToRoleTypeMappingBhv
extends
AbstractBehaviorWritable<DataConfigToRoleTypeMapping, DataConfigToRoleTypeMappingCB> {
// ===================================================================================
// Definition
@ -92,21 +91,12 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "DATA_CONFIG_TO_ROLE_TYPE_MAPPING";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public DataConfigToRoleTypeMappingDbm getDBMeta() {
return DataConfigToRoleTypeMappingDbm.getInstance();
}
@ -118,12 +108,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public DataConfigToRoleTypeMapping newEntity() {
return new DataConfigToRoleTypeMapping();
}
/** {@inheritDoc} */
@Override
public DataConfigToRoleTypeMappingCB newConditionBean() {
@ -158,25 +142,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final DataConfigToRoleTypeMappingCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final DataConfigToRoleTypeMappingCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final DataConfigToRoleTypeMappingCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -209,13 +174,9 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends DataConfigToRoleTypeMapping> ENTITY doSelectEntity(
final DataConfigToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends DataConfigToRoleTypeMapping> OptionalEntity<ENTITY> doSelectOptionalEntity(
final DataConfigToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
final DataConfigToRoleTypeMappingCB cb,
final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -244,23 +205,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
return facadeSelectEntityWithDeletedCheck(cb);
}
protected DataConfigToRoleTypeMapping facadeSelectEntityWithDeletedCheck(
final DataConfigToRoleTypeMappingCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends DataConfigToRoleTypeMapping> ENTITY doSelectEntityWithDeletedCheck(
final DataConfigToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -277,12 +221,12 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
}
protected <ENTITY extends DataConfigToRoleTypeMapping> ENTITY doSelectByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends DataConfigToRoleTypeMapping> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -332,21 +276,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
return facadeSelectList(cb);
}
protected ListResultBean<DataConfigToRoleTypeMapping> facadeSelectList(
final DataConfigToRoleTypeMappingCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends DataConfigToRoleTypeMapping> ListResultBean<ENTITY> doSelectList(
final DataConfigToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -377,22 +306,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
return facadeSelectPage(cb);
}
protected PagingResultBean<DataConfigToRoleTypeMapping> facadeSelectPage(
final DataConfigToRoleTypeMappingCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends DataConfigToRoleTypeMapping> PagingResultBean<ENTITY> doSelectPage(
final DataConfigToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -415,21 +328,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final DataConfigToRoleTypeMappingCB cb,
final EntityRowHandler<DataConfigToRoleTypeMapping> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends DataConfigToRoleTypeMapping> void doSelectCursor(
final DataConfigToRoleTypeMappingCB cb,
final EntityRowHandler<ENTITY> handler, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -453,27 +351,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<DataConfigToRoleTypeMappingCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends DataConfigToRoleTypeMappingCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -628,30 +505,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
doInsert(dataConfigToRoleTypeMapping, null);
}
protected void doInsert(final DataConfigToRoleTypeMapping et,
final InsertOption<DataConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("dataConfigToRoleTypeMapping", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(
final InsertOption<DataConfigToRoleTypeMappingCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -679,51 +532,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
doUpdate(dataConfigToRoleTypeMapping, null);
}
protected void doUpdate(final DataConfigToRoleTypeMapping et,
final UpdateOption<DataConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("dataConfigToRoleTypeMapping", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(
final UpdateOption<DataConfigToRoleTypeMappingCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected DataConfigToRoleTypeMappingCB createCBForVaryingUpdate() {
final DataConfigToRoleTypeMappingCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected DataConfigToRoleTypeMappingCB createCBForSpecifiedUpdate() {
final DataConfigToRoleTypeMappingCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doModify(et, op);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -738,27 +546,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
doInsertOrUpdate(dataConfigToRoleTypeMapping, null, null);
}
protected void doInsertOrUpdate(final DataConfigToRoleTypeMapping et,
final InsertOption<DataConfigToRoleTypeMappingCB> iop,
final UpdateOption<DataConfigToRoleTypeMappingCB> uop) {
assertObjectNotNull("dataConfigToRoleTypeMapping", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doCreateOrModify(et, iop, uop);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -781,32 +568,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
doDelete(dataConfigToRoleTypeMapping, null);
}
protected void doDelete(final DataConfigToRoleTypeMapping et,
final DeleteOption<DataConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("dataConfigToRoleTypeMapping", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(
final DeleteOption<DataConfigToRoleTypeMappingCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doRemove(et, op);
}
// ===================================================================================
// Batch Update
// ============
@ -839,33 +600,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
return doBatchInsert(dataConfigToRoleTypeMappingList, null);
}
protected int[] doBatchInsert(final List<DataConfigToRoleTypeMapping> ls,
final InsertOption<DataConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("dataConfigToRoleTypeMappingList", ls);
InsertOption<DataConfigToRoleTypeMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(
final List<DataConfigToRoleTypeMapping> ls,
final InsertOption<DataConfigToRoleTypeMappingCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -895,32 +629,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
return doBatchUpdate(dataConfigToRoleTypeMappingList, null);
}
protected int[] doBatchUpdate(final List<DataConfigToRoleTypeMapping> ls,
final UpdateOption<DataConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("dataConfigToRoleTypeMappingList", ls);
UpdateOption<DataConfigToRoleTypeMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(
final List<DataConfigToRoleTypeMapping> ls,
final UpdateOption<DataConfigToRoleTypeMappingCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -956,12 +664,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doLumpModify(ls, op);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -974,25 +676,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
return doBatchDelete(dataConfigToRoleTypeMappingList, null);
}
protected int[] doBatchDelete(final List<DataConfigToRoleTypeMapping> ls,
final DeleteOption<DataConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("dataConfigToRoleTypeMappingList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doLumpRemove(ls, op);
}
// ===================================================================================
// Query Update
// ============
@ -1000,7 +683,7 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* dataConfigToRoleTypeMappingBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;DataConfigToRoleTypeMapping, DataConfigToRoleTypeMappingCB&gt;() {
* public ConditionBean setup(dataConfigToRoleTypeMapping entity, DataConfigToRoleTypeMappingCB intoCB) {
* public ConditionBean setup(DataConfigToRoleTypeMapping entity, DataConfigToRoleTypeMappingCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1019,7 +702,7 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1027,29 +710,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<DataConfigToRoleTypeMapping, DataConfigToRoleTypeMappingCB> sp,
final InsertOption<DataConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final DataConfigToRoleTypeMapping et = newEntity();
final DataConfigToRoleTypeMappingCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected DataConfigToRoleTypeMappingCB createCBForQueryInsert() {
final DataConfigToRoleTypeMappingCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1078,22 +738,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
return doQueryUpdate(dataConfigToRoleTypeMapping, cb, null);
}
protected int doQueryUpdate(final DataConfigToRoleTypeMapping et,
final DataConfigToRoleTypeMappingCB cb,
final UpdateOption<DataConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("dataConfigToRoleTypeMapping", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1109,20 +753,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final DataConfigToRoleTypeMappingCB cb,
final DeleteOption<DataConfigToRoleTypeMappingCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1284,7 +914,7 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1387,49 +1017,20 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
}
// ===================================================================================
// Assist Helper
// =============
protected Class<DataConfigToRoleTypeMapping> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends DataConfigToRoleTypeMapping> typeOfSelectedEntity() {
return DataConfigToRoleTypeMapping.class;
}
protected DataConfigToRoleTypeMapping downcast(final Entity et) {
return helpEntityDowncastInternally(et,
DataConfigToRoleTypeMapping.class);
@Override
protected Class<DataConfigToRoleTypeMapping> typeOfHandlingEntity() {
return DataConfigToRoleTypeMapping.class;
}
protected DataConfigToRoleTypeMappingCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb,
DataConfigToRoleTypeMappingCB.class);
}
@SuppressWarnings("unchecked")
protected List<DataConfigToRoleTypeMapping> downcast(
final List<? extends Entity> ls) {
return (List<DataConfigToRoleTypeMapping>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<DataConfigToRoleTypeMappingCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<DataConfigToRoleTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<DataConfigToRoleTypeMappingCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<DataConfigToRoleTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<DataConfigToRoleTypeMappingCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<DataConfigToRoleTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<DataConfigToRoleTypeMapping, DataConfigToRoleTypeMappingCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<DataConfigToRoleTypeMapping, DataConfigToRoleTypeMappingCB>) sp;
@Override
protected Class<DataConfigToRoleTypeMappingCB> typeOfHandlingConditionBean() {
return DataConfigToRoleTypeMappingCB.class;
}
}

View file

@ -43,9 +43,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
@ -90,7 +88,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
public abstract class BsDataCrawlingConfigBhv extends
AbstractBehaviorWritable<DataCrawlingConfig, DataCrawlingConfigCB> {
// ===================================================================================
// Definition
@ -98,21 +97,12 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "DATA_CRAWLING_CONFIG";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public DataCrawlingConfigDbm getDBMeta() {
return DataCrawlingConfigDbm.getInstance();
}
@ -124,12 +114,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public DataCrawlingConfig newEntity() {
return new DataCrawlingConfig();
}
/** {@inheritDoc} */
@Override
public DataCrawlingConfigCB newConditionBean() {
@ -164,25 +148,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final DataCrawlingConfigCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final DataCrawlingConfigCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final DataCrawlingConfigCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -214,13 +179,8 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends DataCrawlingConfig> ENTITY doSelectEntity(
final DataCrawlingConfigCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends DataCrawlingConfig> OptionalEntity<ENTITY> doSelectOptionalEntity(
final DataCrawlingConfigCB cb, final Class<ENTITY> tp) {
final DataCrawlingConfigCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -249,23 +209,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected DataCrawlingConfig facadeSelectEntityWithDeletedCheck(
final DataCrawlingConfigCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends DataCrawlingConfig> ENTITY doSelectEntityWithDeletedCheck(
final DataCrawlingConfigCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -282,12 +225,12 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends DataCrawlingConfig> ENTITY doSelectByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends DataCrawlingConfig> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -336,21 +279,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<DataCrawlingConfig> facadeSelectList(
final DataCrawlingConfigCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends DataCrawlingConfig> ListResultBean<ENTITY> doSelectList(
final DataCrawlingConfigCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -381,22 +309,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<DataCrawlingConfig> facadeSelectPage(
final DataCrawlingConfigCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends DataCrawlingConfig> PagingResultBean<ENTITY> doSelectPage(
final DataCrawlingConfigCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -419,21 +331,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final DataCrawlingConfigCB cb,
final EntityRowHandler<DataCrawlingConfig> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends DataCrawlingConfig> void doSelectCursor(
final DataCrawlingConfigCB cb,
final EntityRowHandler<ENTITY> handler, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -457,27 +354,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<DataCrawlingConfigCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends DataCrawlingConfigCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -656,7 +532,7 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param dataCrawlingConfigList The entity list of dataCrawlingConfig. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -769,7 +645,7 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param dataCrawlingConfigList The entity list of dataCrawlingConfig. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -833,30 +709,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
doInsert(dataCrawlingConfig, null);
}
protected void doInsert(final DataCrawlingConfig et,
final InsertOption<DataCrawlingConfigCB> op) {
assertObjectNotNull("dataCrawlingConfig", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(
final InsertOption<DataCrawlingConfigCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -883,45 +735,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
doUpdate(dataCrawlingConfig, null);
}
protected void doUpdate(final DataCrawlingConfig et,
final UpdateOption<DataCrawlingConfigCB> op) {
assertObjectNotNull("dataCrawlingConfig", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(
final UpdateOption<DataCrawlingConfigCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected DataCrawlingConfigCB createCBForVaryingUpdate() {
final DataCrawlingConfigCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected DataCrawlingConfigCB createCBForSpecifiedUpdate() {
final DataCrawlingConfigCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
/**
* Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -945,19 +758,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
doUpdateNonstrict(dataCrawlingConfig, null);
}
protected void doUpdateNonstrict(final DataCrawlingConfig et,
final UpdateOption<DataCrawlingConfigCB> op) {
assertObjectNotNull("dataCrawlingConfig", et);
prepareUpdateOption(op);
helpUpdateNonstrictInternally(et, op);
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdateNonstrict(downcast(et), downcast(op));
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -971,20 +771,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(dataCrawlingConfig, null, null);
}
protected void doInsertOrUpdate(final DataCrawlingConfig et,
final InsertOption<DataCrawlingConfigCB> iop,
final UpdateOption<DataCrawlingConfigCB> uop) {
assertObjectNotNull("dataCrawlingConfig", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
/**
* Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@ -999,20 +785,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
doInsertOrUpdateNonstrict(dataCrawlingConfig, null, null);
}
protected void doInsertOrUpdateNonstrict(final DataCrawlingConfig et,
final InsertOption<DataCrawlingConfigCB> iop,
final UpdateOption<DataCrawlingConfigCB> uop) {
assertObjectNotNull("dataCrawlingConfig", et);
helpInsertOrUpdateNonstrictInternally(et, iop, uop);
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop));
}
/**
* Delete the entity. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -1034,26 +806,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
doDelete(dataCrawlingConfig, null);
}
protected void doDelete(final DataCrawlingConfig et,
final DeleteOption<DataCrawlingConfigCB> op) {
assertObjectNotNull("dataCrawlingConfig", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(
final DeleteOption<DataCrawlingConfigCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
/**
* Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -1072,13 +824,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
doDeleteNonstrict(dataCrawlingConfig, null);
}
protected void doDeleteNonstrict(final DataCrawlingConfig et,
final DeleteOption<DataCrawlingConfigCB> op) {
assertObjectNotNull("dataCrawlingConfig", et);
prepareDeleteOption(op);
helpDeleteNonstrictInternally(et, op);
}
/**
* Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -1105,12 +850,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
helpDeleteNonstrictIgnoreDeletedInternally(et, op);
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDeleteNonstrict(downcast(et), downcast(op));
}
// ===================================================================================
// Batch Update
// ============
@ -1143,32 +882,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
return doBatchInsert(dataCrawlingConfigList, null);
}
protected int[] doBatchInsert(final List<DataCrawlingConfig> ls,
final InsertOption<DataCrawlingConfigCB> op) {
assertObjectNotNull("dataCrawlingConfigList", ls);
InsertOption<DataCrawlingConfigCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<DataCrawlingConfig> ls,
final InsertOption<DataCrawlingConfigCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -1198,31 +911,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
return doBatchUpdate(dataCrawlingConfigList, null);
}
protected int[] doBatchUpdate(final List<DataCrawlingConfig> ls,
final UpdateOption<DataCrawlingConfigCB> op) {
assertObjectNotNull("dataCrawlingConfigList", ls);
UpdateOption<DataCrawlingConfigCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<DataCrawlingConfig> ls,
final UpdateOption<DataCrawlingConfigCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1287,19 +975,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
return doBatchUpdateNonstrict(dataCrawlingConfigList, null);
}
protected int[] doBatchUpdateNonstrict(final List<DataCrawlingConfig> ls,
final UpdateOption<DataCrawlingConfigCB> op) {
assertObjectNotNull("dataCrawlingConfigList", ls);
UpdateOption<DataCrawlingConfigCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop);
return delegateBatchUpdateNonstrict(ls, rlop);
}
/**
* Batch-update the entity list non-strictly specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1334,12 +1009,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdateNonstrict(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1352,19 +1021,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
return doBatchDelete(dataCrawlingConfigList, null);
}
protected int[] doBatchDelete(final List<DataCrawlingConfig> ls,
final DeleteOption<DataCrawlingConfigCB> op) {
assertObjectNotNull("dataCrawlingConfigList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list non-strictly. {NonExclusiveControl} <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1377,19 +1033,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
return doBatchDeleteNonstrict(dataCrawlingConfigList, null);
}
protected int[] doBatchDeleteNonstrict(final List<DataCrawlingConfig> ls,
final DeleteOption<DataCrawlingConfigCB> op) {
assertObjectNotNull("dataCrawlingConfigList", ls);
prepareDeleteOption(op);
return delegateBatchDeleteNonstrict(ls, op);
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDeleteNonstrict(downcast(ls), downcast(op));
}
// ===================================================================================
// Query Update
// ============
@ -1397,7 +1040,7 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* dataCrawlingConfigBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;DataCrawlingConfig, DataCrawlingConfigCB&gt;() {
* public ConditionBean setup(dataCrawlingConfig entity, DataCrawlingConfigCB intoCB) {
* public ConditionBean setup(DataCrawlingConfig entity, DataCrawlingConfigCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1416,7 +1059,7 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1424,29 +1067,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<DataCrawlingConfig, DataCrawlingConfigCB> sp,
final InsertOption<DataCrawlingConfigCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final DataCrawlingConfig et = newEntity();
final DataCrawlingConfigCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected DataCrawlingConfigCB createCBForQueryInsert() {
final DataCrawlingConfigCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1474,22 +1094,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
return doQueryUpdate(dataCrawlingConfig, cb, null);
}
protected int doQueryUpdate(final DataCrawlingConfig et,
final DataCrawlingConfigCB cb,
final UpdateOption<DataCrawlingConfigCB> op) {
assertObjectNotNull("dataCrawlingConfig", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1505,20 +1109,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final DataCrawlingConfigCB cb,
final DeleteOption<DataCrawlingConfigCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1776,7 +1366,7 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1886,47 +1476,20 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<DataCrawlingConfig> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends DataCrawlingConfig> typeOfSelectedEntity() {
return DataCrawlingConfig.class;
}
protected DataCrawlingConfig downcast(final Entity et) {
return helpEntityDowncastInternally(et, DataCrawlingConfig.class);
@Override
protected Class<DataCrawlingConfig> typeOfHandlingEntity() {
return DataCrawlingConfig.class;
}
protected DataCrawlingConfigCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb,
DataCrawlingConfigCB.class);
}
@SuppressWarnings("unchecked")
protected List<DataCrawlingConfig> downcast(final List<? extends Entity> ls) {
return (List<DataCrawlingConfig>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<DataCrawlingConfigCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<DataCrawlingConfigCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<DataCrawlingConfigCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<DataCrawlingConfigCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<DataCrawlingConfigCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<DataCrawlingConfigCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<DataCrawlingConfig, DataCrawlingConfigCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<DataCrawlingConfig, DataCrawlingConfigCB>) sp;
@Override
protected Class<DataCrawlingConfigCB> typeOfHandlingConditionBean() {
return DataCrawlingConfigCB.class;
}
}

View file

@ -36,9 +36,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
import org.seasar.dbflute.exception.EntityAlreadyExistsException;
@ -81,7 +79,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
public abstract class BsFailureUrlBhv extends
AbstractBehaviorWritable<FailureUrl, FailureUrlCB> {
// ===================================================================================
// Definition
@ -89,21 +88,12 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "FAILURE_URL";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public FailureUrlDbm getDBMeta() {
return FailureUrlDbm.getInstance();
}
@ -115,12 +105,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public FailureUrl newEntity() {
return new FailureUrl();
}
/** {@inheritDoc} */
@Override
public FailureUrlCB newConditionBean() {
@ -155,25 +139,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final FailureUrlCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final FailureUrlCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final FailureUrlCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -204,13 +169,8 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FailureUrl> ENTITY doSelectEntity(
final FailureUrlCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends FailureUrl> OptionalEntity<ENTITY> doSelectOptionalEntity(
final FailureUrlCB cb, final Class<ENTITY> tp) {
final FailureUrlCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -238,23 +198,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected FailureUrl facadeSelectEntityWithDeletedCheck(
final FailureUrlCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FailureUrl> ENTITY doSelectEntityWithDeletedCheck(
final FailureUrlCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -271,12 +214,12 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends FailureUrl> ENTITY doSelectByPK(final Long id,
final Class<ENTITY> tp) {
final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends FailureUrl> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -324,20 +267,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<FailureUrl> facadeSelectList(final FailureUrlCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FailureUrl> ListResultBean<ENTITY> doSelectList(
final FailureUrlCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -367,22 +296,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<FailureUrl> facadeSelectPage(
final FailureUrlCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FailureUrl> PagingResultBean<ENTITY> doSelectPage(
final FailureUrlCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -405,21 +318,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final FailureUrlCB cb,
final EntityRowHandler<FailureUrl> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends FailureUrl> void doSelectCursor(
final FailureUrlCB cb, final EntityRowHandler<ENTITY> handler,
final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -443,27 +341,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<FailureUrlCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends FailureUrlCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -592,29 +469,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
doInsert(failureUrl, null);
}
protected void doInsert(final FailureUrl et,
final InsertOption<FailureUrlCB> op) {
assertObjectNotNull("failureUrl", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(final InsertOption<FailureUrlCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -641,50 +495,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
doUpdate(failureUrl, null);
}
protected void doUpdate(final FailureUrl et,
final UpdateOption<FailureUrlCB> op) {
assertObjectNotNull("failureUrl", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(final UpdateOption<FailureUrlCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected FailureUrlCB createCBForVaryingUpdate() {
final FailureUrlCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected FailureUrlCB createCBForSpecifiedUpdate() {
final FailureUrlCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doModify(et, op);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -698,27 +508,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(failureUrl, null, null);
}
protected void doInsertOrUpdate(final FailureUrl et,
final InsertOption<FailureUrlCB> iop,
final UpdateOption<FailureUrlCB> uop) {
assertObjectNotNull("failureUrl", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doCreateOrModify(et, iop, uop);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -740,31 +529,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
doDelete(failureUrl, null);
}
protected void doDelete(final FailureUrl et,
final DeleteOption<FailureUrlCB> op) {
assertObjectNotNull("failureUrl", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(final DeleteOption<FailureUrlCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doRemove(et, op);
}
// ===================================================================================
// Batch Update
// ============
@ -796,32 +560,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
return doBatchInsert(failureUrlList, null);
}
protected int[] doBatchInsert(final List<FailureUrl> ls,
final InsertOption<FailureUrlCB> op) {
assertObjectNotNull("failureUrlList", ls);
InsertOption<FailureUrlCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<FailureUrl> ls,
final InsertOption<FailureUrlCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -850,31 +588,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
return doBatchUpdate(failureUrlList, null);
}
protected int[] doBatchUpdate(final List<FailureUrl> ls,
final UpdateOption<FailureUrlCB> op) {
assertObjectNotNull("failureUrlList", ls);
UpdateOption<FailureUrlCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<FailureUrl> ls,
final UpdateOption<FailureUrlCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -909,12 +622,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doLumpModify(ls, op);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -926,25 +633,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
return doBatchDelete(failureUrlList, null);
}
protected int[] doBatchDelete(final List<FailureUrl> ls,
final DeleteOption<FailureUrlCB> op) {
assertObjectNotNull("failureUrlList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doLumpRemove(ls, op);
}
// ===================================================================================
// Query Update
// ============
@ -952,7 +640,7 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* failureUrlBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;FailureUrl, FailureUrlCB&gt;() {
* public ConditionBean setup(failureUrl entity, FailureUrlCB intoCB) {
* public ConditionBean setup(FailureUrl entity, FailureUrlCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -971,7 +659,7 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -979,29 +667,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<FailureUrl, FailureUrlCB> sp,
final InsertOption<FailureUrlCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final FailureUrl et = newEntity();
final FailureUrlCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected FailureUrlCB createCBForQueryInsert() {
final FailureUrlCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1028,21 +693,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
return doQueryUpdate(failureUrl, cb, null);
}
protected int doQueryUpdate(final FailureUrl et, final FailureUrlCB cb,
final UpdateOption<FailureUrlCB> op) {
assertObjectNotNull("failureUrl", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1058,20 +708,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final FailureUrlCB cb,
final DeleteOption<FailureUrlCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1225,7 +861,7 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1326,46 +962,20 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<FailureUrl> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends FailureUrl> typeOfSelectedEntity() {
return FailureUrl.class;
}
protected FailureUrl downcast(final Entity et) {
return helpEntityDowncastInternally(et, FailureUrl.class);
@Override
protected Class<FailureUrl> typeOfHandlingEntity() {
return FailureUrl.class;
}
protected FailureUrlCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb, FailureUrlCB.class);
}
@SuppressWarnings("unchecked")
protected List<FailureUrl> downcast(final List<? extends Entity> ls) {
return (List<FailureUrl>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<FailureUrlCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<FailureUrlCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<FailureUrlCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<FailureUrlCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<FailureUrlCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<FailureUrlCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<FailureUrl, FailureUrlCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<FailureUrl, FailureUrlCB>) sp;
@Override
protected Class<FailureUrlCB> typeOfHandlingConditionBean() {
return FailureUrlCB.class;
}
}

View file

@ -37,9 +37,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
import org.seasar.dbflute.exception.EntityAlreadyExistsException;
@ -82,7 +80,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
public abstract class BsFavoriteLogBhv extends
AbstractBehaviorWritable<FavoriteLog, FavoriteLogCB> {
// ===================================================================================
// Definition
@ -94,21 +93,12 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "FAVORITE_LOG";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public FavoriteLogDbm getDBMeta() {
return FavoriteLogDbm.getInstance();
}
@ -120,12 +110,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public FavoriteLog newEntity() {
return new FavoriteLog();
}
/** {@inheritDoc} */
@Override
public FavoriteLogCB newConditionBean() {
@ -160,25 +144,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final FavoriteLogCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final FavoriteLogCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final FavoriteLogCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -209,13 +174,8 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FavoriteLog> ENTITY doSelectEntity(
final FavoriteLogCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends FavoriteLog> OptionalEntity<ENTITY> doSelectOptionalEntity(
final FavoriteLogCB cb, final Class<ENTITY> tp) {
final FavoriteLogCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -243,23 +203,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected FavoriteLog facadeSelectEntityWithDeletedCheck(
final FavoriteLogCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FavoriteLog> ENTITY doSelectEntityWithDeletedCheck(
final FavoriteLogCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -276,12 +219,12 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends FavoriteLog> ENTITY doSelectByPK(final Long id,
final Class<ENTITY> tp) {
final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends FavoriteLog> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -327,7 +270,8 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends FavoriteLog> OptionalEntity<ENTITY> doSelectByUniqueOf(
final Long userId, final String url, final Class<ENTITY> tp) {
final Long userId, final String url,
final Class<? extends ENTITY> tp) {
return createOptionalEntity(
doSelectEntity(xprepareCBAsUniqueOf(userId, url), tp), userId,
url);
@ -362,21 +306,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<FavoriteLog> facadeSelectList(
final FavoriteLogCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FavoriteLog> ListResultBean<ENTITY> doSelectList(
final FavoriteLogCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -406,22 +335,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<FavoriteLog> facadeSelectPage(
final FavoriteLogCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FavoriteLog> PagingResultBean<ENTITY> doSelectPage(
final FavoriteLogCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -444,21 +357,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final FavoriteLogCB cb,
final EntityRowHandler<FavoriteLog> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends FavoriteLog> void doSelectCursor(
final FavoriteLogCB cb, final EntityRowHandler<ENTITY> handler,
final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -482,27 +380,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<FavoriteLogCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends FavoriteLogCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -641,29 +518,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
doInsert(favoriteLog, null);
}
protected void doInsert(final FavoriteLog et,
final InsertOption<FavoriteLogCB> op) {
assertObjectNotNull("favoriteLog", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(final InsertOption<FavoriteLogCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -690,50 +544,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
doUpdate(favoriteLog, null);
}
protected void doUpdate(final FavoriteLog et,
final UpdateOption<FavoriteLogCB> op) {
assertObjectNotNull("favoriteLog", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(final UpdateOption<FavoriteLogCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected FavoriteLogCB createCBForVaryingUpdate() {
final FavoriteLogCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected FavoriteLogCB createCBForSpecifiedUpdate() {
final FavoriteLogCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doModify(et, op);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -747,27 +557,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(favoriteLog, null, null);
}
protected void doInsertOrUpdate(final FavoriteLog et,
final InsertOption<FavoriteLogCB> iop,
final UpdateOption<FavoriteLogCB> uop) {
assertObjectNotNull("favoriteLog", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doCreateOrModify(et, iop, uop);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -789,31 +578,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
doDelete(favoriteLog, null);
}
protected void doDelete(final FavoriteLog et,
final DeleteOption<FavoriteLogCB> op) {
assertObjectNotNull("favoriteLog", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(final DeleteOption<FavoriteLogCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doRemove(et, op);
}
// ===================================================================================
// Batch Update
// ============
@ -845,32 +609,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
return doBatchInsert(favoriteLogList, null);
}
protected int[] doBatchInsert(final List<FavoriteLog> ls,
final InsertOption<FavoriteLogCB> op) {
assertObjectNotNull("favoriteLogList", ls);
InsertOption<FavoriteLogCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<FavoriteLog> ls,
final InsertOption<FavoriteLogCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -899,31 +637,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
return doBatchUpdate(favoriteLogList, null);
}
protected int[] doBatchUpdate(final List<FavoriteLog> ls,
final UpdateOption<FavoriteLogCB> op) {
assertObjectNotNull("favoriteLogList", ls);
UpdateOption<FavoriteLogCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<FavoriteLog> ls,
final UpdateOption<FavoriteLogCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -958,12 +671,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doLumpModify(ls, op);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -975,25 +682,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
return doBatchDelete(favoriteLogList, null);
}
protected int[] doBatchDelete(final List<FavoriteLog> ls,
final DeleteOption<FavoriteLogCB> op) {
assertObjectNotNull("favoriteLogList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doLumpRemove(ls, op);
}
// ===================================================================================
// Query Update
// ============
@ -1001,7 +689,7 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* favoriteLogBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;FavoriteLog, FavoriteLogCB&gt;() {
* public ConditionBean setup(favoriteLog entity, FavoriteLogCB intoCB) {
* public ConditionBean setup(FavoriteLog entity, FavoriteLogCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1020,7 +708,7 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1028,29 +716,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<FavoriteLog, FavoriteLogCB> sp,
final InsertOption<FavoriteLogCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final FavoriteLog et = newEntity();
final FavoriteLogCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected FavoriteLogCB createCBForQueryInsert() {
final FavoriteLogCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1077,21 +742,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
return doQueryUpdate(favoriteLog, cb, null);
}
protected int doQueryUpdate(final FavoriteLog et, final FavoriteLogCB cb,
final UpdateOption<FavoriteLogCB> op) {
assertObjectNotNull("favoriteLog", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1107,20 +757,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final FavoriteLogCB cb,
final DeleteOption<FavoriteLogCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1274,7 +910,7 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1375,46 +1011,20 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<FavoriteLog> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends FavoriteLog> typeOfSelectedEntity() {
return FavoriteLog.class;
}
protected FavoriteLog downcast(final Entity et) {
return helpEntityDowncastInternally(et, FavoriteLog.class);
@Override
protected Class<FavoriteLog> typeOfHandlingEntity() {
return FavoriteLog.class;
}
protected FavoriteLogCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb, FavoriteLogCB.class);
}
@SuppressWarnings("unchecked")
protected List<FavoriteLog> downcast(final List<? extends Entity> ls) {
return (List<FavoriteLog>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<FavoriteLogCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<FavoriteLogCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<FavoriteLogCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<FavoriteLogCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<FavoriteLogCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<FavoriteLogCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<FavoriteLog, FavoriteLogCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<FavoriteLog, FavoriteLogCB>) sp;
@Override
protected Class<FavoriteLogCB> typeOfHandlingConditionBean() {
return FavoriteLogCB.class;
}
}

View file

@ -37,9 +37,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
@ -84,7 +82,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
public abstract class BsFileAuthenticationBhv extends
AbstractBehaviorWritable<FileAuthentication, FileAuthenticationCB> {
// ===================================================================================
// Definition
@ -92,21 +91,12 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "FILE_AUTHENTICATION";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public FileAuthenticationDbm getDBMeta() {
return FileAuthenticationDbm.getInstance();
}
@ -118,12 +108,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public FileAuthentication newEntity() {
return new FileAuthentication();
}
/** {@inheritDoc} */
@Override
public FileAuthenticationCB newConditionBean() {
@ -158,25 +142,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final FileAuthenticationCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final FileAuthenticationCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final FileAuthenticationCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -208,13 +173,8 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FileAuthentication> ENTITY doSelectEntity(
final FileAuthenticationCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends FileAuthentication> OptionalEntity<ENTITY> doSelectOptionalEntity(
final FileAuthenticationCB cb, final Class<ENTITY> tp) {
final FileAuthenticationCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -243,23 +203,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected FileAuthentication facadeSelectEntityWithDeletedCheck(
final FileAuthenticationCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FileAuthentication> ENTITY doSelectEntityWithDeletedCheck(
final FileAuthenticationCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -276,12 +219,12 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends FileAuthentication> ENTITY doSelectByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends FileAuthentication> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -330,21 +273,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<FileAuthentication> facadeSelectList(
final FileAuthenticationCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FileAuthentication> ListResultBean<ENTITY> doSelectList(
final FileAuthenticationCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -375,22 +303,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<FileAuthentication> facadeSelectPage(
final FileAuthenticationCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FileAuthentication> PagingResultBean<ENTITY> doSelectPage(
final FileAuthenticationCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -413,21 +325,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final FileAuthenticationCB cb,
final EntityRowHandler<FileAuthentication> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends FileAuthentication> void doSelectCursor(
final FileAuthenticationCB cb,
final EntityRowHandler<ENTITY> handler, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -451,27 +348,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<FileAuthenticationCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends FileAuthenticationCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -612,30 +488,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
doInsert(fileAuthentication, null);
}
protected void doInsert(final FileAuthentication et,
final InsertOption<FileAuthenticationCB> op) {
assertObjectNotNull("fileAuthentication", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(
final InsertOption<FileAuthenticationCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -662,45 +514,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
doUpdate(fileAuthentication, null);
}
protected void doUpdate(final FileAuthentication et,
final UpdateOption<FileAuthenticationCB> op) {
assertObjectNotNull("fileAuthentication", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(
final UpdateOption<FileAuthenticationCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected FileAuthenticationCB createCBForVaryingUpdate() {
final FileAuthenticationCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected FileAuthenticationCB createCBForSpecifiedUpdate() {
final FileAuthenticationCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
/**
* Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -724,19 +537,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
doUpdateNonstrict(fileAuthentication, null);
}
protected void doUpdateNonstrict(final FileAuthentication et,
final UpdateOption<FileAuthenticationCB> op) {
assertObjectNotNull("fileAuthentication", et);
prepareUpdateOption(op);
helpUpdateNonstrictInternally(et, op);
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdateNonstrict(downcast(et), downcast(op));
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -750,20 +550,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(fileAuthentication, null, null);
}
protected void doInsertOrUpdate(final FileAuthentication et,
final InsertOption<FileAuthenticationCB> iop,
final UpdateOption<FileAuthenticationCB> uop) {
assertObjectNotNull("fileAuthentication", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
/**
* Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@ -778,20 +564,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
doInsertOrUpdateNonstrict(fileAuthentication, null, null);
}
protected void doInsertOrUpdateNonstrict(final FileAuthentication et,
final InsertOption<FileAuthenticationCB> iop,
final UpdateOption<FileAuthenticationCB> uop) {
assertObjectNotNull("fileAuthentication", et);
helpInsertOrUpdateNonstrictInternally(et, iop, uop);
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop));
}
/**
* Delete the entity. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -813,26 +585,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
doDelete(fileAuthentication, null);
}
protected void doDelete(final FileAuthentication et,
final DeleteOption<FileAuthenticationCB> op) {
assertObjectNotNull("fileAuthentication", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(
final DeleteOption<FileAuthenticationCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
/**
* Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -851,13 +603,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
doDeleteNonstrict(fileAuthentication, null);
}
protected void doDeleteNonstrict(final FileAuthentication et,
final DeleteOption<FileAuthenticationCB> op) {
assertObjectNotNull("fileAuthentication", et);
prepareDeleteOption(op);
helpDeleteNonstrictInternally(et, op);
}
/**
* Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -884,12 +629,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
helpDeleteNonstrictIgnoreDeletedInternally(et, op);
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDeleteNonstrict(downcast(et), downcast(op));
}
// ===================================================================================
// Batch Update
// ============
@ -922,32 +661,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
return doBatchInsert(fileAuthenticationList, null);
}
protected int[] doBatchInsert(final List<FileAuthentication> ls,
final InsertOption<FileAuthenticationCB> op) {
assertObjectNotNull("fileAuthenticationList", ls);
InsertOption<FileAuthenticationCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<FileAuthentication> ls,
final InsertOption<FileAuthenticationCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -977,31 +690,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
return doBatchUpdate(fileAuthenticationList, null);
}
protected int[] doBatchUpdate(final List<FileAuthentication> ls,
final UpdateOption<FileAuthenticationCB> op) {
assertObjectNotNull("fileAuthenticationList", ls);
UpdateOption<FileAuthenticationCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<FileAuthentication> ls,
final UpdateOption<FileAuthenticationCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1066,19 +754,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
return doBatchUpdateNonstrict(fileAuthenticationList, null);
}
protected int[] doBatchUpdateNonstrict(final List<FileAuthentication> ls,
final UpdateOption<FileAuthenticationCB> op) {
assertObjectNotNull("fileAuthenticationList", ls);
UpdateOption<FileAuthenticationCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop);
return delegateBatchUpdateNonstrict(ls, rlop);
}
/**
* Batch-update the entity list non-strictly specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1113,12 +788,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdateNonstrict(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1131,19 +800,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
return doBatchDelete(fileAuthenticationList, null);
}
protected int[] doBatchDelete(final List<FileAuthentication> ls,
final DeleteOption<FileAuthenticationCB> op) {
assertObjectNotNull("fileAuthenticationList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list non-strictly. {NonExclusiveControl} <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1156,19 +812,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
return doBatchDeleteNonstrict(fileAuthenticationList, null);
}
protected int[] doBatchDeleteNonstrict(final List<FileAuthentication> ls,
final DeleteOption<FileAuthenticationCB> op) {
assertObjectNotNull("fileAuthenticationList", ls);
prepareDeleteOption(op);
return delegateBatchDeleteNonstrict(ls, op);
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDeleteNonstrict(downcast(ls), downcast(op));
}
// ===================================================================================
// Query Update
// ============
@ -1176,7 +819,7 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* fileAuthenticationBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;FileAuthentication, FileAuthenticationCB&gt;() {
* public ConditionBean setup(fileAuthentication entity, FileAuthenticationCB intoCB) {
* public ConditionBean setup(FileAuthentication entity, FileAuthenticationCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1195,7 +838,7 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1203,29 +846,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<FileAuthentication, FileAuthenticationCB> sp,
final InsertOption<FileAuthenticationCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final FileAuthentication et = newEntity();
final FileAuthenticationCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected FileAuthenticationCB createCBForQueryInsert() {
final FileAuthenticationCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1253,22 +873,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
return doQueryUpdate(fileAuthentication, cb, null);
}
protected int doQueryUpdate(final FileAuthentication et,
final FileAuthenticationCB cb,
final UpdateOption<FileAuthenticationCB> op) {
assertObjectNotNull("fileAuthentication", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1284,20 +888,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final FileAuthenticationCB cb,
final DeleteOption<FileAuthenticationCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1555,7 +1145,7 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1665,47 +1255,20 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<FileAuthentication> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends FileAuthentication> typeOfSelectedEntity() {
return FileAuthentication.class;
}
protected FileAuthentication downcast(final Entity et) {
return helpEntityDowncastInternally(et, FileAuthentication.class);
@Override
protected Class<FileAuthentication> typeOfHandlingEntity() {
return FileAuthentication.class;
}
protected FileAuthenticationCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb,
FileAuthenticationCB.class);
}
@SuppressWarnings("unchecked")
protected List<FileAuthentication> downcast(final List<? extends Entity> ls) {
return (List<FileAuthentication>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<FileAuthenticationCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<FileAuthenticationCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<FileAuthenticationCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<FileAuthenticationCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<FileAuthenticationCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<FileAuthenticationCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<FileAuthentication, FileAuthenticationCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<FileAuthentication, FileAuthenticationCB>) sp;
@Override
protected Class<FileAuthenticationCB> typeOfHandlingConditionBean() {
return FileAuthenticationCB.class;
}
}

View file

@ -38,9 +38,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
import org.seasar.dbflute.exception.EntityAlreadyExistsException;
@ -83,8 +81,9 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsFileConfigToLabelTypeMappingBhv extends
AbstractBehaviorWritable {
public abstract class BsFileConfigToLabelTypeMappingBhv
extends
AbstractBehaviorWritable<FileConfigToLabelTypeMapping, FileConfigToLabelTypeMappingCB> {
// ===================================================================================
// Definition
@ -92,21 +91,12 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "FILE_CONFIG_TO_LABEL_TYPE_MAPPING";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public FileConfigToLabelTypeMappingDbm getDBMeta() {
return FileConfigToLabelTypeMappingDbm.getInstance();
}
@ -118,12 +108,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public FileConfigToLabelTypeMapping newEntity() {
return new FileConfigToLabelTypeMapping();
}
/** {@inheritDoc} */
@Override
public FileConfigToLabelTypeMappingCB newConditionBean() {
@ -158,25 +142,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final FileConfigToLabelTypeMappingCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final FileConfigToLabelTypeMappingCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final FileConfigToLabelTypeMappingCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -209,13 +174,9 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FileConfigToLabelTypeMapping> ENTITY doSelectEntity(
final FileConfigToLabelTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends FileConfigToLabelTypeMapping> OptionalEntity<ENTITY> doSelectOptionalEntity(
final FileConfigToLabelTypeMappingCB cb, final Class<ENTITY> tp) {
final FileConfigToLabelTypeMappingCB cb,
final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -244,23 +205,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
return facadeSelectEntityWithDeletedCheck(cb);
}
protected FileConfigToLabelTypeMapping facadeSelectEntityWithDeletedCheck(
final FileConfigToLabelTypeMappingCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FileConfigToLabelTypeMapping> ENTITY doSelectEntityWithDeletedCheck(
final FileConfigToLabelTypeMappingCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -277,12 +221,12 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
}
protected <ENTITY extends FileConfigToLabelTypeMapping> ENTITY doSelectByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends FileConfigToLabelTypeMapping> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -332,21 +276,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
return facadeSelectList(cb);
}
protected ListResultBean<FileConfigToLabelTypeMapping> facadeSelectList(
final FileConfigToLabelTypeMappingCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FileConfigToLabelTypeMapping> ListResultBean<ENTITY> doSelectList(
final FileConfigToLabelTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -377,22 +306,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
return facadeSelectPage(cb);
}
protected PagingResultBean<FileConfigToLabelTypeMapping> facadeSelectPage(
final FileConfigToLabelTypeMappingCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FileConfigToLabelTypeMapping> PagingResultBean<ENTITY> doSelectPage(
final FileConfigToLabelTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -416,22 +329,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(
final FileConfigToLabelTypeMappingCB cb,
final EntityRowHandler<FileConfigToLabelTypeMapping> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends FileConfigToLabelTypeMapping> void doSelectCursor(
final FileConfigToLabelTypeMappingCB cb,
final EntityRowHandler<ENTITY> handler, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -455,27 +352,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<FileConfigToLabelTypeMappingCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends FileConfigToLabelTypeMappingCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -630,30 +506,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
doInsert(fileConfigToLabelTypeMapping, null);
}
protected void doInsert(final FileConfigToLabelTypeMapping et,
final InsertOption<FileConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("fileConfigToLabelTypeMapping", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(
final InsertOption<FileConfigToLabelTypeMappingCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -681,51 +533,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
doUpdate(fileConfigToLabelTypeMapping, null);
}
protected void doUpdate(final FileConfigToLabelTypeMapping et,
final UpdateOption<FileConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("fileConfigToLabelTypeMapping", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(
final UpdateOption<FileConfigToLabelTypeMappingCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected FileConfigToLabelTypeMappingCB createCBForVaryingUpdate() {
final FileConfigToLabelTypeMappingCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected FileConfigToLabelTypeMappingCB createCBForSpecifiedUpdate() {
final FileConfigToLabelTypeMappingCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doModify(et, op);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -740,27 +547,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
doInsertOrUpdate(fileConfigToLabelTypeMapping, null, null);
}
protected void doInsertOrUpdate(final FileConfigToLabelTypeMapping et,
final InsertOption<FileConfigToLabelTypeMappingCB> iop,
final UpdateOption<FileConfigToLabelTypeMappingCB> uop) {
assertObjectNotNull("fileConfigToLabelTypeMapping", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doCreateOrModify(et, iop, uop);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -783,32 +569,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
doDelete(fileConfigToLabelTypeMapping, null);
}
protected void doDelete(final FileConfigToLabelTypeMapping et,
final DeleteOption<FileConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("fileConfigToLabelTypeMapping", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(
final DeleteOption<FileConfigToLabelTypeMappingCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doRemove(et, op);
}
// ===================================================================================
// Batch Update
// ============
@ -841,33 +601,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
return doBatchInsert(fileConfigToLabelTypeMappingList, null);
}
protected int[] doBatchInsert(final List<FileConfigToLabelTypeMapping> ls,
final InsertOption<FileConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("fileConfigToLabelTypeMappingList", ls);
InsertOption<FileConfigToLabelTypeMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(
final List<FileConfigToLabelTypeMapping> ls,
final InsertOption<FileConfigToLabelTypeMappingCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -897,32 +630,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
return doBatchUpdate(fileConfigToLabelTypeMappingList, null);
}
protected int[] doBatchUpdate(final List<FileConfigToLabelTypeMapping> ls,
final UpdateOption<FileConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("fileConfigToLabelTypeMappingList", ls);
UpdateOption<FileConfigToLabelTypeMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(
final List<FileConfigToLabelTypeMapping> ls,
final UpdateOption<FileConfigToLabelTypeMappingCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -958,12 +665,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doLumpModify(ls, op);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -976,25 +677,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
return doBatchDelete(fileConfigToLabelTypeMappingList, null);
}
protected int[] doBatchDelete(final List<FileConfigToLabelTypeMapping> ls,
final DeleteOption<FileConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("fileConfigToLabelTypeMappingList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doLumpRemove(ls, op);
}
// ===================================================================================
// Query Update
// ============
@ -1002,7 +684,7 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* fileConfigToLabelTypeMappingBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;FileConfigToLabelTypeMapping, FileConfigToLabelTypeMappingCB&gt;() {
* public ConditionBean setup(fileConfigToLabelTypeMapping entity, FileConfigToLabelTypeMappingCB intoCB) {
* public ConditionBean setup(FileConfigToLabelTypeMapping entity, FileConfigToLabelTypeMappingCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1021,7 +703,7 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1029,29 +711,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<FileConfigToLabelTypeMapping, FileConfigToLabelTypeMappingCB> sp,
final InsertOption<FileConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final FileConfigToLabelTypeMapping et = newEntity();
final FileConfigToLabelTypeMappingCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected FileConfigToLabelTypeMappingCB createCBForQueryInsert() {
final FileConfigToLabelTypeMappingCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1080,22 +739,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
return doQueryUpdate(fileConfigToLabelTypeMapping, cb, null);
}
protected int doQueryUpdate(final FileConfigToLabelTypeMapping et,
final FileConfigToLabelTypeMappingCB cb,
final UpdateOption<FileConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("fileConfigToLabelTypeMapping", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1111,20 +754,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final FileConfigToLabelTypeMappingCB cb,
final DeleteOption<FileConfigToLabelTypeMappingCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1286,7 +915,7 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1389,49 +1018,20 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
}
// ===================================================================================
// Assist Helper
// =============
protected Class<FileConfigToLabelTypeMapping> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends FileConfigToLabelTypeMapping> typeOfSelectedEntity() {
return FileConfigToLabelTypeMapping.class;
}
protected FileConfigToLabelTypeMapping downcast(final Entity et) {
return helpEntityDowncastInternally(et,
FileConfigToLabelTypeMapping.class);
@Override
protected Class<FileConfigToLabelTypeMapping> typeOfHandlingEntity() {
return FileConfigToLabelTypeMapping.class;
}
protected FileConfigToLabelTypeMappingCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb,
FileConfigToLabelTypeMappingCB.class);
}
@SuppressWarnings("unchecked")
protected List<FileConfigToLabelTypeMapping> downcast(
final List<? extends Entity> ls) {
return (List<FileConfigToLabelTypeMapping>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<FileConfigToLabelTypeMappingCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<FileConfigToLabelTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<FileConfigToLabelTypeMappingCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<FileConfigToLabelTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<FileConfigToLabelTypeMappingCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<FileConfigToLabelTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<FileConfigToLabelTypeMapping, FileConfigToLabelTypeMappingCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<FileConfigToLabelTypeMapping, FileConfigToLabelTypeMappingCB>) sp;
@Override
protected Class<FileConfigToLabelTypeMappingCB> typeOfHandlingConditionBean() {
return FileConfigToLabelTypeMappingCB.class;
}
}

View file

@ -38,9 +38,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
import org.seasar.dbflute.exception.EntityAlreadyExistsException;
@ -83,8 +81,9 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsFileConfigToRoleTypeMappingBhv extends
AbstractBehaviorWritable {
public abstract class BsFileConfigToRoleTypeMappingBhv
extends
AbstractBehaviorWritable<FileConfigToRoleTypeMapping, FileConfigToRoleTypeMappingCB> {
// ===================================================================================
// Definition
@ -92,21 +91,12 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "FILE_CONFIG_TO_ROLE_TYPE_MAPPING";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public FileConfigToRoleTypeMappingDbm getDBMeta() {
return FileConfigToRoleTypeMappingDbm.getInstance();
}
@ -118,12 +108,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public FileConfigToRoleTypeMapping newEntity() {
return new FileConfigToRoleTypeMapping();
}
/** {@inheritDoc} */
@Override
public FileConfigToRoleTypeMappingCB newConditionBean() {
@ -158,25 +142,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final FileConfigToRoleTypeMappingCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final FileConfigToRoleTypeMappingCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final FileConfigToRoleTypeMappingCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -209,13 +174,9 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FileConfigToRoleTypeMapping> ENTITY doSelectEntity(
final FileConfigToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends FileConfigToRoleTypeMapping> OptionalEntity<ENTITY> doSelectOptionalEntity(
final FileConfigToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
final FileConfigToRoleTypeMappingCB cb,
final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -244,23 +205,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
return facadeSelectEntityWithDeletedCheck(cb);
}
protected FileConfigToRoleTypeMapping facadeSelectEntityWithDeletedCheck(
final FileConfigToRoleTypeMappingCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FileConfigToRoleTypeMapping> ENTITY doSelectEntityWithDeletedCheck(
final FileConfigToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -277,12 +221,12 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
}
protected <ENTITY extends FileConfigToRoleTypeMapping> ENTITY doSelectByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends FileConfigToRoleTypeMapping> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -332,21 +276,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
return facadeSelectList(cb);
}
protected ListResultBean<FileConfigToRoleTypeMapping> facadeSelectList(
final FileConfigToRoleTypeMappingCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FileConfigToRoleTypeMapping> ListResultBean<ENTITY> doSelectList(
final FileConfigToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -377,22 +306,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
return facadeSelectPage(cb);
}
protected PagingResultBean<FileConfigToRoleTypeMapping> facadeSelectPage(
final FileConfigToRoleTypeMappingCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FileConfigToRoleTypeMapping> PagingResultBean<ENTITY> doSelectPage(
final FileConfigToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -415,21 +328,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final FileConfigToRoleTypeMappingCB cb,
final EntityRowHandler<FileConfigToRoleTypeMapping> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends FileConfigToRoleTypeMapping> void doSelectCursor(
final FileConfigToRoleTypeMappingCB cb,
final EntityRowHandler<ENTITY> handler, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -453,27 +351,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<FileConfigToRoleTypeMappingCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends FileConfigToRoleTypeMappingCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -628,30 +505,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
doInsert(fileConfigToRoleTypeMapping, null);
}
protected void doInsert(final FileConfigToRoleTypeMapping et,
final InsertOption<FileConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("fileConfigToRoleTypeMapping", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(
final InsertOption<FileConfigToRoleTypeMappingCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -679,51 +532,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
doUpdate(fileConfigToRoleTypeMapping, null);
}
protected void doUpdate(final FileConfigToRoleTypeMapping et,
final UpdateOption<FileConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("fileConfigToRoleTypeMapping", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(
final UpdateOption<FileConfigToRoleTypeMappingCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected FileConfigToRoleTypeMappingCB createCBForVaryingUpdate() {
final FileConfigToRoleTypeMappingCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected FileConfigToRoleTypeMappingCB createCBForSpecifiedUpdate() {
final FileConfigToRoleTypeMappingCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doModify(et, op);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -738,27 +546,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
doInsertOrUpdate(fileConfigToRoleTypeMapping, null, null);
}
protected void doInsertOrUpdate(final FileConfigToRoleTypeMapping et,
final InsertOption<FileConfigToRoleTypeMappingCB> iop,
final UpdateOption<FileConfigToRoleTypeMappingCB> uop) {
assertObjectNotNull("fileConfigToRoleTypeMapping", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doCreateOrModify(et, iop, uop);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -781,32 +568,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
doDelete(fileConfigToRoleTypeMapping, null);
}
protected void doDelete(final FileConfigToRoleTypeMapping et,
final DeleteOption<FileConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("fileConfigToRoleTypeMapping", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(
final DeleteOption<FileConfigToRoleTypeMappingCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doRemove(et, op);
}
// ===================================================================================
// Batch Update
// ============
@ -839,33 +600,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
return doBatchInsert(fileConfigToRoleTypeMappingList, null);
}
protected int[] doBatchInsert(final List<FileConfigToRoleTypeMapping> ls,
final InsertOption<FileConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("fileConfigToRoleTypeMappingList", ls);
InsertOption<FileConfigToRoleTypeMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(
final List<FileConfigToRoleTypeMapping> ls,
final InsertOption<FileConfigToRoleTypeMappingCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -895,32 +629,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
return doBatchUpdate(fileConfigToRoleTypeMappingList, null);
}
protected int[] doBatchUpdate(final List<FileConfigToRoleTypeMapping> ls,
final UpdateOption<FileConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("fileConfigToRoleTypeMappingList", ls);
UpdateOption<FileConfigToRoleTypeMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(
final List<FileConfigToRoleTypeMapping> ls,
final UpdateOption<FileConfigToRoleTypeMappingCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -956,12 +664,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doLumpModify(ls, op);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -974,25 +676,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
return doBatchDelete(fileConfigToRoleTypeMappingList, null);
}
protected int[] doBatchDelete(final List<FileConfigToRoleTypeMapping> ls,
final DeleteOption<FileConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("fileConfigToRoleTypeMappingList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doLumpRemove(ls, op);
}
// ===================================================================================
// Query Update
// ============
@ -1000,7 +683,7 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* fileConfigToRoleTypeMappingBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;FileConfigToRoleTypeMapping, FileConfigToRoleTypeMappingCB&gt;() {
* public ConditionBean setup(fileConfigToRoleTypeMapping entity, FileConfigToRoleTypeMappingCB intoCB) {
* public ConditionBean setup(FileConfigToRoleTypeMapping entity, FileConfigToRoleTypeMappingCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1019,7 +702,7 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1027,29 +710,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<FileConfigToRoleTypeMapping, FileConfigToRoleTypeMappingCB> sp,
final InsertOption<FileConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final FileConfigToRoleTypeMapping et = newEntity();
final FileConfigToRoleTypeMappingCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected FileConfigToRoleTypeMappingCB createCBForQueryInsert() {
final FileConfigToRoleTypeMappingCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1078,22 +738,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
return doQueryUpdate(fileConfigToRoleTypeMapping, cb, null);
}
protected int doQueryUpdate(final FileConfigToRoleTypeMapping et,
final FileConfigToRoleTypeMappingCB cb,
final UpdateOption<FileConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("fileConfigToRoleTypeMapping", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1109,20 +753,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final FileConfigToRoleTypeMappingCB cb,
final DeleteOption<FileConfigToRoleTypeMappingCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1284,7 +914,7 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1387,49 +1017,20 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
}
// ===================================================================================
// Assist Helper
// =============
protected Class<FileConfigToRoleTypeMapping> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends FileConfigToRoleTypeMapping> typeOfSelectedEntity() {
return FileConfigToRoleTypeMapping.class;
}
protected FileConfigToRoleTypeMapping downcast(final Entity et) {
return helpEntityDowncastInternally(et,
FileConfigToRoleTypeMapping.class);
@Override
protected Class<FileConfigToRoleTypeMapping> typeOfHandlingEntity() {
return FileConfigToRoleTypeMapping.class;
}
protected FileConfigToRoleTypeMappingCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb,
FileConfigToRoleTypeMappingCB.class);
}
@SuppressWarnings("unchecked")
protected List<FileConfigToRoleTypeMapping> downcast(
final List<? extends Entity> ls) {
return (List<FileConfigToRoleTypeMapping>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<FileConfigToRoleTypeMappingCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<FileConfigToRoleTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<FileConfigToRoleTypeMappingCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<FileConfigToRoleTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<FileConfigToRoleTypeMappingCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<FileConfigToRoleTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<FileConfigToRoleTypeMapping, FileConfigToRoleTypeMappingCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<FileConfigToRoleTypeMapping, FileConfigToRoleTypeMappingCB>) sp;
@Override
protected Class<FileConfigToRoleTypeMappingCB> typeOfHandlingConditionBean() {
return FileConfigToRoleTypeMappingCB.class;
}
}

View file

@ -45,9 +45,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
@ -92,7 +90,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
public abstract class BsFileCrawlingConfigBhv extends
AbstractBehaviorWritable<FileCrawlingConfig, FileCrawlingConfigCB> {
// ===================================================================================
// Definition
@ -100,21 +99,12 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "FILE_CRAWLING_CONFIG";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public FileCrawlingConfigDbm getDBMeta() {
return FileCrawlingConfigDbm.getInstance();
}
@ -126,12 +116,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public FileCrawlingConfig newEntity() {
return new FileCrawlingConfig();
}
/** {@inheritDoc} */
@Override
public FileCrawlingConfigCB newConditionBean() {
@ -166,25 +150,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final FileCrawlingConfigCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final FileCrawlingConfigCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final FileCrawlingConfigCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -216,13 +181,8 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FileCrawlingConfig> ENTITY doSelectEntity(
final FileCrawlingConfigCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends FileCrawlingConfig> OptionalEntity<ENTITY> doSelectOptionalEntity(
final FileCrawlingConfigCB cb, final Class<ENTITY> tp) {
final FileCrawlingConfigCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -251,23 +211,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected FileCrawlingConfig facadeSelectEntityWithDeletedCheck(
final FileCrawlingConfigCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FileCrawlingConfig> ENTITY doSelectEntityWithDeletedCheck(
final FileCrawlingConfigCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -284,12 +227,12 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends FileCrawlingConfig> ENTITY doSelectByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends FileCrawlingConfig> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -338,21 +281,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<FileCrawlingConfig> facadeSelectList(
final FileCrawlingConfigCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FileCrawlingConfig> ListResultBean<ENTITY> doSelectList(
final FileCrawlingConfigCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -383,22 +311,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<FileCrawlingConfig> facadeSelectPage(
final FileCrawlingConfigCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends FileCrawlingConfig> PagingResultBean<ENTITY> doSelectPage(
final FileCrawlingConfigCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -421,21 +333,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final FileCrawlingConfigCB cb,
final EntityRowHandler<FileCrawlingConfig> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends FileCrawlingConfig> void doSelectCursor(
final FileCrawlingConfigCB cb,
final EntityRowHandler<ENTITY> handler, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -459,27 +356,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<FileCrawlingConfigCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends FileCrawlingConfigCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -658,7 +534,7 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param fileCrawlingConfigList The entity list of fileCrawlingConfig. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -771,7 +647,7 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param fileCrawlingConfigList The entity list of fileCrawlingConfig. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -884,7 +760,7 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param fileCrawlingConfigList The entity list of fileCrawlingConfig. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -948,30 +824,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
doInsert(fileCrawlingConfig, null);
}
protected void doInsert(final FileCrawlingConfig et,
final InsertOption<FileCrawlingConfigCB> op) {
assertObjectNotNull("fileCrawlingConfig", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(
final InsertOption<FileCrawlingConfigCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -998,45 +850,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
doUpdate(fileCrawlingConfig, null);
}
protected void doUpdate(final FileCrawlingConfig et,
final UpdateOption<FileCrawlingConfigCB> op) {
assertObjectNotNull("fileCrawlingConfig", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(
final UpdateOption<FileCrawlingConfigCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected FileCrawlingConfigCB createCBForVaryingUpdate() {
final FileCrawlingConfigCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected FileCrawlingConfigCB createCBForSpecifiedUpdate() {
final FileCrawlingConfigCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
/**
* Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -1060,19 +873,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
doUpdateNonstrict(fileCrawlingConfig, null);
}
protected void doUpdateNonstrict(final FileCrawlingConfig et,
final UpdateOption<FileCrawlingConfigCB> op) {
assertObjectNotNull("fileCrawlingConfig", et);
prepareUpdateOption(op);
helpUpdateNonstrictInternally(et, op);
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdateNonstrict(downcast(et), downcast(op));
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -1086,20 +886,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(fileCrawlingConfig, null, null);
}
protected void doInsertOrUpdate(final FileCrawlingConfig et,
final InsertOption<FileCrawlingConfigCB> iop,
final UpdateOption<FileCrawlingConfigCB> uop) {
assertObjectNotNull("fileCrawlingConfig", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
/**
* Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@ -1114,20 +900,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
doInsertOrUpdateNonstrict(fileCrawlingConfig, null, null);
}
protected void doInsertOrUpdateNonstrict(final FileCrawlingConfig et,
final InsertOption<FileCrawlingConfigCB> iop,
final UpdateOption<FileCrawlingConfigCB> uop) {
assertObjectNotNull("fileCrawlingConfig", et);
helpInsertOrUpdateNonstrictInternally(et, iop, uop);
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop));
}
/**
* Delete the entity. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -1149,26 +921,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
doDelete(fileCrawlingConfig, null);
}
protected void doDelete(final FileCrawlingConfig et,
final DeleteOption<FileCrawlingConfigCB> op) {
assertObjectNotNull("fileCrawlingConfig", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(
final DeleteOption<FileCrawlingConfigCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
/**
* Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -1187,13 +939,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
doDeleteNonstrict(fileCrawlingConfig, null);
}
protected void doDeleteNonstrict(final FileCrawlingConfig et,
final DeleteOption<FileCrawlingConfigCB> op) {
assertObjectNotNull("fileCrawlingConfig", et);
prepareDeleteOption(op);
helpDeleteNonstrictInternally(et, op);
}
/**
* Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -1220,12 +965,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
helpDeleteNonstrictIgnoreDeletedInternally(et, op);
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDeleteNonstrict(downcast(et), downcast(op));
}
// ===================================================================================
// Batch Update
// ============
@ -1258,32 +997,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
return doBatchInsert(fileCrawlingConfigList, null);
}
protected int[] doBatchInsert(final List<FileCrawlingConfig> ls,
final InsertOption<FileCrawlingConfigCB> op) {
assertObjectNotNull("fileCrawlingConfigList", ls);
InsertOption<FileCrawlingConfigCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<FileCrawlingConfig> ls,
final InsertOption<FileCrawlingConfigCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -1313,31 +1026,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
return doBatchUpdate(fileCrawlingConfigList, null);
}
protected int[] doBatchUpdate(final List<FileCrawlingConfig> ls,
final UpdateOption<FileCrawlingConfigCB> op) {
assertObjectNotNull("fileCrawlingConfigList", ls);
UpdateOption<FileCrawlingConfigCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<FileCrawlingConfig> ls,
final UpdateOption<FileCrawlingConfigCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1402,19 +1090,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
return doBatchUpdateNonstrict(fileCrawlingConfigList, null);
}
protected int[] doBatchUpdateNonstrict(final List<FileCrawlingConfig> ls,
final UpdateOption<FileCrawlingConfigCB> op) {
assertObjectNotNull("fileCrawlingConfigList", ls);
UpdateOption<FileCrawlingConfigCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop);
return delegateBatchUpdateNonstrict(ls, rlop);
}
/**
* Batch-update the entity list non-strictly specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1449,12 +1124,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdateNonstrict(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1467,19 +1136,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
return doBatchDelete(fileCrawlingConfigList, null);
}
protected int[] doBatchDelete(final List<FileCrawlingConfig> ls,
final DeleteOption<FileCrawlingConfigCB> op) {
assertObjectNotNull("fileCrawlingConfigList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list non-strictly. {NonExclusiveControl} <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1492,19 +1148,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
return doBatchDeleteNonstrict(fileCrawlingConfigList, null);
}
protected int[] doBatchDeleteNonstrict(final List<FileCrawlingConfig> ls,
final DeleteOption<FileCrawlingConfigCB> op) {
assertObjectNotNull("fileCrawlingConfigList", ls);
prepareDeleteOption(op);
return delegateBatchDeleteNonstrict(ls, op);
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDeleteNonstrict(downcast(ls), downcast(op));
}
// ===================================================================================
// Query Update
// ============
@ -1512,7 +1155,7 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* fileCrawlingConfigBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;FileCrawlingConfig, FileCrawlingConfigCB&gt;() {
* public ConditionBean setup(fileCrawlingConfig entity, FileCrawlingConfigCB intoCB) {
* public ConditionBean setup(FileCrawlingConfig entity, FileCrawlingConfigCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1531,7 +1174,7 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1539,29 +1182,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<FileCrawlingConfig, FileCrawlingConfigCB> sp,
final InsertOption<FileCrawlingConfigCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final FileCrawlingConfig et = newEntity();
final FileCrawlingConfigCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected FileCrawlingConfigCB createCBForQueryInsert() {
final FileCrawlingConfigCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1589,22 +1209,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
return doQueryUpdate(fileCrawlingConfig, cb, null);
}
protected int doQueryUpdate(final FileCrawlingConfig et,
final FileCrawlingConfigCB cb,
final UpdateOption<FileCrawlingConfigCB> op) {
assertObjectNotNull("fileCrawlingConfig", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1620,20 +1224,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final FileCrawlingConfigCB cb,
final DeleteOption<FileCrawlingConfigCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1891,7 +1481,7 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -2001,47 +1591,20 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<FileCrawlingConfig> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends FileCrawlingConfig> typeOfSelectedEntity() {
return FileCrawlingConfig.class;
}
protected FileCrawlingConfig downcast(final Entity et) {
return helpEntityDowncastInternally(et, FileCrawlingConfig.class);
@Override
protected Class<FileCrawlingConfig> typeOfHandlingEntity() {
return FileCrawlingConfig.class;
}
protected FileCrawlingConfigCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb,
FileCrawlingConfigCB.class);
}
@SuppressWarnings("unchecked")
protected List<FileCrawlingConfig> downcast(final List<? extends Entity> ls) {
return (List<FileCrawlingConfig>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<FileCrawlingConfigCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<FileCrawlingConfigCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<FileCrawlingConfigCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<FileCrawlingConfigCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<FileCrawlingConfigCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<FileCrawlingConfigCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<FileCrawlingConfig, FileCrawlingConfigCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<FileCrawlingConfig, FileCrawlingConfigCB>) sp;
@Override
protected Class<FileCrawlingConfigCB> typeOfHandlingConditionBean() {
return FileCrawlingConfigCB.class;
}
}

View file

@ -36,9 +36,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
import org.seasar.dbflute.exception.EntityAlreadyExistsException;
@ -81,7 +79,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
public abstract class BsJobLogBhv extends
AbstractBehaviorWritable<JobLog, JobLogCB> {
// ===================================================================================
// Definition
@ -89,21 +88,12 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "JOB_LOG";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public JobLogDbm getDBMeta() {
return JobLogDbm.getInstance();
}
@ -115,12 +105,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public JobLog newEntity() {
return new JobLog();
}
/** {@inheritDoc} */
@Override
public JobLogCB newConditionBean() {
@ -155,25 +139,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final JobLogCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final JobLogCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final JobLogCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -204,13 +169,8 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends JobLog> ENTITY doSelectEntity(final JobLogCB cb,
final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends JobLog> OptionalEntity<ENTITY> doSelectOptionalEntity(
final JobLogCB cb, final Class<ENTITY> tp) {
final JobLogCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -238,22 +198,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected JobLog facadeSelectEntityWithDeletedCheck(final JobLogCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends JobLog> ENTITY doSelectEntityWithDeletedCheck(
final JobLogCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -270,12 +214,12 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends JobLog> ENTITY doSelectByPK(final Long id,
final Class<ENTITY> tp) {
final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends JobLog> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -323,20 +267,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<JobLog> facadeSelectList(final JobLogCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends JobLog> ListResultBean<ENTITY> doSelectList(
final JobLogCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -366,21 +296,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<JobLog> facadeSelectPage(final JobLogCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends JobLog> PagingResultBean<ENTITY> doSelectPage(
final JobLogCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -403,20 +318,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final JobLogCB cb,
final EntityRowHandler<JobLog> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends JobLog> void doSelectCursor(final JobLogCB cb,
final EntityRowHandler<ENTITY> handler, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -440,27 +341,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<JobLogCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends JobLogCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -589,28 +469,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
doInsert(jobLog, null);
}
protected void doInsert(final JobLog et, final InsertOption<JobLogCB> op) {
assertObjectNotNull("jobLog", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(final InsertOption<JobLogCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -637,49 +495,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
doUpdate(jobLog, null);
}
protected void doUpdate(final JobLog et, final UpdateOption<JobLogCB> op) {
assertObjectNotNull("jobLog", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(final UpdateOption<JobLogCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected JobLogCB createCBForVaryingUpdate() {
final JobLogCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected JobLogCB createCBForSpecifiedUpdate() {
final JobLogCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doModify(et, op);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -693,26 +508,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(jobLog, null, null);
}
protected void doInsertOrUpdate(final JobLog et,
final InsertOption<JobLogCB> iop, final UpdateOption<JobLogCB> uop) {
assertObjectNotNull("jobLog", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doCreateOrModify(et, iop, uop);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -734,30 +529,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
doDelete(jobLog, null);
}
protected void doDelete(final JobLog et, final DeleteOption<JobLogCB> op) {
assertObjectNotNull("jobLog", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(final DeleteOption<JobLogCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doRemove(et, op);
}
// ===================================================================================
// Batch Update
// ============
@ -789,32 +560,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
return doBatchInsert(jobLogList, null);
}
protected int[] doBatchInsert(final List<JobLog> ls,
final InsertOption<JobLogCB> op) {
assertObjectNotNull("jobLogList", ls);
InsertOption<JobLogCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<JobLog> ls,
final InsertOption<JobLogCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -843,31 +588,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
return doBatchUpdate(jobLogList, null);
}
protected int[] doBatchUpdate(final List<JobLog> ls,
final UpdateOption<JobLogCB> op) {
assertObjectNotNull("jobLogList", ls);
UpdateOption<JobLogCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<JobLog> ls,
final UpdateOption<JobLogCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -902,12 +622,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doLumpModify(ls, op);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -919,25 +633,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
return doBatchDelete(jobLogList, null);
}
protected int[] doBatchDelete(final List<JobLog> ls,
final DeleteOption<JobLogCB> op) {
assertObjectNotNull("jobLogList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doLumpRemove(ls, op);
}
// ===================================================================================
// Query Update
// ============
@ -945,7 +640,7 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* jobLogBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;JobLog, JobLogCB&gt;() {
* public ConditionBean setup(jobLog entity, JobLogCB intoCB) {
* public ConditionBean setup(JobLog entity, JobLogCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -964,35 +659,13 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(final QueryInsertSetupper<JobLog, JobLogCB> setupper) {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(final QueryInsertSetupper<JobLog, JobLogCB> sp,
final InsertOption<JobLogCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final JobLog et = newEntity();
final JobLogCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected JobLogCB createCBForQueryInsert() {
final JobLogCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1019,21 +692,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
return doQueryUpdate(jobLog, cb, null);
}
protected int doQueryUpdate(final JobLog et, final JobLogCB cb,
final UpdateOption<JobLogCB> op) {
assertObjectNotNull("jobLog", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1049,20 +707,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final JobLogCB cb,
final DeleteOption<JobLogCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1216,7 +860,7 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1317,46 +961,20 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<JobLog> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends JobLog> typeOfSelectedEntity() {
return JobLog.class;
}
protected JobLog downcast(final Entity et) {
return helpEntityDowncastInternally(et, JobLog.class);
@Override
protected Class<JobLog> typeOfHandlingEntity() {
return JobLog.class;
}
protected JobLogCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb, JobLogCB.class);
}
@SuppressWarnings("unchecked")
protected List<JobLog> downcast(final List<? extends Entity> ls) {
return (List<JobLog>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<JobLogCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<JobLogCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<JobLogCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<JobLogCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<JobLogCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<JobLogCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<JobLog, JobLogCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<JobLog, JobLogCB>) sp;
@Override
protected Class<JobLogCB> typeOfHandlingConditionBean() {
return JobLogCB.class;
}
}

View file

@ -36,9 +36,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
@ -83,7 +81,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
public abstract class BsKeyMatchBhv extends
AbstractBehaviorWritable<KeyMatch, KeyMatchCB> {
// ===================================================================================
// Definition
@ -91,21 +90,12 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "KEY_MATCH";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public KeyMatchDbm getDBMeta() {
return KeyMatchDbm.getInstance();
}
@ -117,12 +107,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public KeyMatch newEntity() {
return new KeyMatch();
}
/** {@inheritDoc} */
@Override
public KeyMatchCB newConditionBean() {
@ -157,25 +141,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final KeyMatchCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final KeyMatchCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final KeyMatchCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -206,13 +171,8 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends KeyMatch> ENTITY doSelectEntity(
final KeyMatchCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends KeyMatch> OptionalEntity<ENTITY> doSelectOptionalEntity(
final KeyMatchCB cb, final Class<ENTITY> tp) {
final KeyMatchCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -240,22 +200,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected KeyMatch facadeSelectEntityWithDeletedCheck(final KeyMatchCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends KeyMatch> ENTITY doSelectEntityWithDeletedCheck(
final KeyMatchCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -272,12 +216,12 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends KeyMatch> ENTITY doSelectByPK(final Long id,
final Class<ENTITY> tp) {
final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends KeyMatch> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -325,20 +269,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<KeyMatch> facadeSelectList(final KeyMatchCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends KeyMatch> ListResultBean<ENTITY> doSelectList(
final KeyMatchCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -368,21 +298,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<KeyMatch> facadeSelectPage(final KeyMatchCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends KeyMatch> PagingResultBean<ENTITY> doSelectPage(
final KeyMatchCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -405,21 +320,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final KeyMatchCB cb,
final EntityRowHandler<KeyMatch> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends KeyMatch> void doSelectCursor(
final KeyMatchCB cb, final EntityRowHandler<ENTITY> handler,
final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -443,27 +343,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<KeyMatchCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends KeyMatchCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -592,28 +471,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
doInsert(keyMatch, null);
}
protected void doInsert(final KeyMatch et, final InsertOption<KeyMatchCB> op) {
assertObjectNotNull("keyMatch", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(final InsertOption<KeyMatchCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -640,43 +497,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
doUpdate(keyMatch, null);
}
protected void doUpdate(final KeyMatch et, final UpdateOption<KeyMatchCB> op) {
assertObjectNotNull("keyMatch", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(final UpdateOption<KeyMatchCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected KeyMatchCB createCBForVaryingUpdate() {
final KeyMatchCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected KeyMatchCB createCBForSpecifiedUpdate() {
final KeyMatchCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
/**
* Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -700,19 +520,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
doUpdateNonstrict(keyMatch, null);
}
protected void doUpdateNonstrict(final KeyMatch et,
final UpdateOption<KeyMatchCB> op) {
assertObjectNotNull("keyMatch", et);
prepareUpdateOption(op);
helpUpdateNonstrictInternally(et, op);
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdateNonstrict(downcast(et), downcast(op));
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -726,20 +533,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(keyMatch, null, null);
}
protected void doInsertOrUpdate(final KeyMatch et,
final InsertOption<KeyMatchCB> iop,
final UpdateOption<KeyMatchCB> uop) {
assertObjectNotNull("keyMatch", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
/**
* Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@ -753,20 +546,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
doInsertOrUpdateNonstrict(keyMatch, null, null);
}
protected void doInsertOrUpdateNonstrict(final KeyMatch et,
final InsertOption<KeyMatchCB> iop,
final UpdateOption<KeyMatchCB> uop) {
assertObjectNotNull("keyMatch", et);
helpInsertOrUpdateNonstrictInternally(et, iop, uop);
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop));
}
/**
* Delete the entity. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -788,24 +567,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
doDelete(keyMatch, null);
}
protected void doDelete(final KeyMatch et, final DeleteOption<KeyMatchCB> op) {
assertObjectNotNull("keyMatch", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(final DeleteOption<KeyMatchCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
/**
* Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -824,13 +585,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
doDeleteNonstrict(keyMatch, null);
}
protected void doDeleteNonstrict(final KeyMatch et,
final DeleteOption<KeyMatchCB> op) {
assertObjectNotNull("keyMatch", et);
prepareDeleteOption(op);
helpDeleteNonstrictInternally(et, op);
}
/**
* Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -856,12 +610,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
helpDeleteNonstrictIgnoreDeletedInternally(et, op);
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDeleteNonstrict(downcast(et), downcast(op));
}
// ===================================================================================
// Batch Update
// ============
@ -893,32 +641,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
return doBatchInsert(keyMatchList, null);
}
protected int[] doBatchInsert(final List<KeyMatch> ls,
final InsertOption<KeyMatchCB> op) {
assertObjectNotNull("keyMatchList", ls);
InsertOption<KeyMatchCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<KeyMatch> ls,
final InsertOption<KeyMatchCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -947,31 +669,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
return doBatchUpdate(keyMatchList, null);
}
protected int[] doBatchUpdate(final List<KeyMatch> ls,
final UpdateOption<KeyMatchCB> op) {
assertObjectNotNull("keyMatchList", ls);
UpdateOption<KeyMatchCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<KeyMatch> ls,
final UpdateOption<KeyMatchCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1034,19 +731,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
return doBatchUpdateNonstrict(keyMatchList, null);
}
protected int[] doBatchUpdateNonstrict(final List<KeyMatch> ls,
final UpdateOption<KeyMatchCB> op) {
assertObjectNotNull("keyMatchList", ls);
UpdateOption<KeyMatchCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop);
return delegateBatchUpdateNonstrict(ls, rlop);
}
/**
* Batch-update the entity list non-strictly specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1080,12 +764,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdateNonstrict(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1097,19 +775,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
return doBatchDelete(keyMatchList, null);
}
protected int[] doBatchDelete(final List<KeyMatch> ls,
final DeleteOption<KeyMatchCB> op) {
assertObjectNotNull("keyMatchList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list non-strictly. {NonExclusiveControl} <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1121,19 +786,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
return doBatchDeleteNonstrict(keyMatchList, null);
}
protected int[] doBatchDeleteNonstrict(final List<KeyMatch> ls,
final DeleteOption<KeyMatchCB> op) {
assertObjectNotNull("keyMatchList", ls);
prepareDeleteOption(op);
return delegateBatchDeleteNonstrict(ls, op);
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDeleteNonstrict(downcast(ls), downcast(op));
}
// ===================================================================================
// Query Update
// ============
@ -1141,7 +793,7 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* keyMatchBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;KeyMatch, KeyMatchCB&gt;() {
* public ConditionBean setup(keyMatch entity, KeyMatchCB intoCB) {
* public ConditionBean setup(KeyMatch entity, KeyMatchCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1160,7 +812,7 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1168,29 +820,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<KeyMatch, KeyMatchCB> sp,
final InsertOption<KeyMatchCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final KeyMatch et = newEntity();
final KeyMatchCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected KeyMatchCB createCBForQueryInsert() {
final KeyMatchCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1217,21 +846,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
return doQueryUpdate(keyMatch, cb, null);
}
protected int doQueryUpdate(final KeyMatch et, final KeyMatchCB cb,
final UpdateOption<KeyMatchCB> op) {
assertObjectNotNull("keyMatch", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1247,20 +861,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final KeyMatchCB cb,
final DeleteOption<KeyMatchCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1508,7 +1108,7 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1617,46 +1217,20 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<KeyMatch> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends KeyMatch> typeOfSelectedEntity() {
return KeyMatch.class;
}
protected KeyMatch downcast(final Entity et) {
return helpEntityDowncastInternally(et, KeyMatch.class);
@Override
protected Class<KeyMatch> typeOfHandlingEntity() {
return KeyMatch.class;
}
protected KeyMatchCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb, KeyMatchCB.class);
}
@SuppressWarnings("unchecked")
protected List<KeyMatch> downcast(final List<? extends Entity> ls) {
return (List<KeyMatch>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<KeyMatchCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<KeyMatchCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<KeyMatchCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<KeyMatchCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<KeyMatchCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<KeyMatchCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<KeyMatch, KeyMatchCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<KeyMatch, KeyMatchCB>) sp;
@Override
protected Class<KeyMatchCB> typeOfHandlingConditionBean() {
return KeyMatchCB.class;
}
}

View file

@ -47,9 +47,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
@ -94,7 +92,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
public abstract class BsLabelTypeBhv extends
AbstractBehaviorWritable<LabelType, LabelTypeCB> {
// ===================================================================================
// Definition
@ -102,21 +101,12 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "LABEL_TYPE";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public LabelTypeDbm getDBMeta() {
return LabelTypeDbm.getInstance();
}
@ -128,12 +118,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public LabelType newEntity() {
return new LabelType();
}
/** {@inheritDoc} */
@Override
public LabelTypeCB newConditionBean() {
@ -168,25 +152,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final LabelTypeCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final LabelTypeCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final LabelTypeCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -217,13 +182,8 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends LabelType> ENTITY doSelectEntity(
final LabelTypeCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends LabelType> OptionalEntity<ENTITY> doSelectOptionalEntity(
final LabelTypeCB cb, final Class<ENTITY> tp) {
final LabelTypeCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -251,22 +211,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected LabelType facadeSelectEntityWithDeletedCheck(final LabelTypeCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends LabelType> ENTITY doSelectEntityWithDeletedCheck(
final LabelTypeCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -283,12 +227,12 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends LabelType> ENTITY doSelectByPK(final Long id,
final Class<ENTITY> tp) {
final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends LabelType> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -336,20 +280,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<LabelType> facadeSelectList(final LabelTypeCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends LabelType> ListResultBean<ENTITY> doSelectList(
final LabelTypeCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -379,21 +309,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<LabelType> facadeSelectPage(final LabelTypeCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends LabelType> PagingResultBean<ENTITY> doSelectPage(
final LabelTypeCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -416,21 +331,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final LabelTypeCB cb,
final EntityRowHandler<LabelType> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends LabelType> void doSelectCursor(
final LabelTypeCB cb, final EntityRowHandler<ENTITY> handler,
final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -454,27 +354,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<LabelTypeCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends LabelTypeCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -653,7 +532,7 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param labelTypeList The entity list of labelType. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -766,7 +645,7 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param labelTypeList The entity list of labelType. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -879,7 +758,7 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param labelTypeList The entity list of labelType. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -992,7 +871,7 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param labelTypeList The entity list of labelType. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -1055,29 +934,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
doInsert(labelType, null);
}
protected void doInsert(final LabelType et,
final InsertOption<LabelTypeCB> op) {
assertObjectNotNull("labelType", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(final InsertOption<LabelTypeCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -1104,44 +960,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
doUpdate(labelType, null);
}
protected void doUpdate(final LabelType et,
final UpdateOption<LabelTypeCB> op) {
assertObjectNotNull("labelType", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(final UpdateOption<LabelTypeCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected LabelTypeCB createCBForVaryingUpdate() {
final LabelTypeCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected LabelTypeCB createCBForSpecifiedUpdate() {
final LabelTypeCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
/**
* Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -1165,19 +983,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
doUpdateNonstrict(labelType, null);
}
protected void doUpdateNonstrict(final LabelType et,
final UpdateOption<LabelTypeCB> op) {
assertObjectNotNull("labelType", et);
prepareUpdateOption(op);
helpUpdateNonstrictInternally(et, op);
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdateNonstrict(downcast(et), downcast(op));
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -1191,20 +996,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(labelType, null, null);
}
protected void doInsertOrUpdate(final LabelType et,
final InsertOption<LabelTypeCB> iop,
final UpdateOption<LabelTypeCB> uop) {
assertObjectNotNull("labelType", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
/**
* Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@ -1218,20 +1009,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
doInsertOrUpdateNonstrict(labelType, null, null);
}
protected void doInsertOrUpdateNonstrict(final LabelType et,
final InsertOption<LabelTypeCB> iop,
final UpdateOption<LabelTypeCB> uop) {
assertObjectNotNull("labelType", et);
helpInsertOrUpdateNonstrictInternally(et, iop, uop);
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop));
}
/**
* Delete the entity. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -1253,25 +1030,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
doDelete(labelType, null);
}
protected void doDelete(final LabelType et,
final DeleteOption<LabelTypeCB> op) {
assertObjectNotNull("labelType", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(final DeleteOption<LabelTypeCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
/**
* Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -1290,13 +1048,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
doDeleteNonstrict(labelType, null);
}
protected void doDeleteNonstrict(final LabelType et,
final DeleteOption<LabelTypeCB> op) {
assertObjectNotNull("labelType", et);
prepareDeleteOption(op);
helpDeleteNonstrictInternally(et, op);
}
/**
* Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -1322,12 +1073,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
helpDeleteNonstrictIgnoreDeletedInternally(et, op);
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDeleteNonstrict(downcast(et), downcast(op));
}
// ===================================================================================
// Batch Update
// ============
@ -1359,32 +1104,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
return doBatchInsert(labelTypeList, null);
}
protected int[] doBatchInsert(final List<LabelType> ls,
final InsertOption<LabelTypeCB> op) {
assertObjectNotNull("labelTypeList", ls);
InsertOption<LabelTypeCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<LabelType> ls,
final InsertOption<LabelTypeCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -1413,31 +1132,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
return doBatchUpdate(labelTypeList, null);
}
protected int[] doBatchUpdate(final List<LabelType> ls,
final UpdateOption<LabelTypeCB> op) {
assertObjectNotNull("labelTypeList", ls);
UpdateOption<LabelTypeCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<LabelType> ls,
final UpdateOption<LabelTypeCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1500,19 +1194,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
return doBatchUpdateNonstrict(labelTypeList, null);
}
protected int[] doBatchUpdateNonstrict(final List<LabelType> ls,
final UpdateOption<LabelTypeCB> op) {
assertObjectNotNull("labelTypeList", ls);
UpdateOption<LabelTypeCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop);
return delegateBatchUpdateNonstrict(ls, rlop);
}
/**
* Batch-update the entity list non-strictly specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1546,12 +1227,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdateNonstrict(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1563,19 +1238,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
return doBatchDelete(labelTypeList, null);
}
protected int[] doBatchDelete(final List<LabelType> ls,
final DeleteOption<LabelTypeCB> op) {
assertObjectNotNull("labelTypeList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list non-strictly. {NonExclusiveControl} <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1587,19 +1249,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
return doBatchDeleteNonstrict(labelTypeList, null);
}
protected int[] doBatchDeleteNonstrict(final List<LabelType> ls,
final DeleteOption<LabelTypeCB> op) {
assertObjectNotNull("labelTypeList", ls);
prepareDeleteOption(op);
return delegateBatchDeleteNonstrict(ls, op);
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDeleteNonstrict(downcast(ls), downcast(op));
}
// ===================================================================================
// Query Update
// ============
@ -1607,7 +1256,7 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* labelTypeBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;LabelType, LabelTypeCB&gt;() {
* public ConditionBean setup(labelType entity, LabelTypeCB intoCB) {
* public ConditionBean setup(LabelType entity, LabelTypeCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1626,7 +1275,7 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1634,29 +1283,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<LabelType, LabelTypeCB> sp,
final InsertOption<LabelTypeCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final LabelType et = newEntity();
final LabelTypeCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected LabelTypeCB createCBForQueryInsert() {
final LabelTypeCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1683,21 +1309,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
return doQueryUpdate(labelType, cb, null);
}
protected int doQueryUpdate(final LabelType et, final LabelTypeCB cb,
final UpdateOption<LabelTypeCB> op) {
assertObjectNotNull("labelType", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1713,20 +1324,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final LabelTypeCB cb,
final DeleteOption<LabelTypeCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1976,7 +1573,7 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -2085,46 +1682,20 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<LabelType> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends LabelType> typeOfSelectedEntity() {
return LabelType.class;
}
protected LabelType downcast(final Entity et) {
return helpEntityDowncastInternally(et, LabelType.class);
@Override
protected Class<LabelType> typeOfHandlingEntity() {
return LabelType.class;
}
protected LabelTypeCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb, LabelTypeCB.class);
}
@SuppressWarnings("unchecked")
protected List<LabelType> downcast(final List<? extends Entity> ls) {
return (List<LabelType>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<LabelTypeCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<LabelTypeCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<LabelTypeCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<LabelTypeCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<LabelTypeCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<LabelTypeCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<LabelType, LabelTypeCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<LabelType, LabelTypeCB>) sp;
@Override
protected Class<LabelTypeCB> typeOfHandlingConditionBean() {
return LabelTypeCB.class;
}
}

View file

@ -38,9 +38,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
import org.seasar.dbflute.exception.EntityAlreadyExistsException;
@ -83,8 +81,9 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsLabelTypeToRoleTypeMappingBhv extends
AbstractBehaviorWritable {
public abstract class BsLabelTypeToRoleTypeMappingBhv
extends
AbstractBehaviorWritable<LabelTypeToRoleTypeMapping, LabelTypeToRoleTypeMappingCB> {
// ===================================================================================
// Definition
@ -92,21 +91,12 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "LABEL_TYPE_TO_ROLE_TYPE_MAPPING";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public LabelTypeToRoleTypeMappingDbm getDBMeta() {
return LabelTypeToRoleTypeMappingDbm.getInstance();
}
@ -118,12 +108,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public LabelTypeToRoleTypeMapping newEntity() {
return new LabelTypeToRoleTypeMapping();
}
/** {@inheritDoc} */
@Override
public LabelTypeToRoleTypeMappingCB newConditionBean() {
@ -158,25 +142,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final LabelTypeToRoleTypeMappingCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final LabelTypeToRoleTypeMappingCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final LabelTypeToRoleTypeMappingCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -209,13 +174,9 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends LabelTypeToRoleTypeMapping> ENTITY doSelectEntity(
final LabelTypeToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends LabelTypeToRoleTypeMapping> OptionalEntity<ENTITY> doSelectOptionalEntity(
final LabelTypeToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
final LabelTypeToRoleTypeMappingCB cb,
final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -244,23 +205,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
return facadeSelectEntityWithDeletedCheck(cb);
}
protected LabelTypeToRoleTypeMapping facadeSelectEntityWithDeletedCheck(
final LabelTypeToRoleTypeMappingCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends LabelTypeToRoleTypeMapping> ENTITY doSelectEntityWithDeletedCheck(
final LabelTypeToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -277,12 +221,12 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
}
protected <ENTITY extends LabelTypeToRoleTypeMapping> ENTITY doSelectByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends LabelTypeToRoleTypeMapping> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -332,21 +276,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
return facadeSelectList(cb);
}
protected ListResultBean<LabelTypeToRoleTypeMapping> facadeSelectList(
final LabelTypeToRoleTypeMappingCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends LabelTypeToRoleTypeMapping> ListResultBean<ENTITY> doSelectList(
final LabelTypeToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -377,22 +306,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
return facadeSelectPage(cb);
}
protected PagingResultBean<LabelTypeToRoleTypeMapping> facadeSelectPage(
final LabelTypeToRoleTypeMappingCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends LabelTypeToRoleTypeMapping> PagingResultBean<ENTITY> doSelectPage(
final LabelTypeToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -415,21 +328,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final LabelTypeToRoleTypeMappingCB cb,
final EntityRowHandler<LabelTypeToRoleTypeMapping> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends LabelTypeToRoleTypeMapping> void doSelectCursor(
final LabelTypeToRoleTypeMappingCB cb,
final EntityRowHandler<ENTITY> handler, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -453,27 +351,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<LabelTypeToRoleTypeMappingCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends LabelTypeToRoleTypeMappingCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -627,30 +504,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
doInsert(labelTypeToRoleTypeMapping, null);
}
protected void doInsert(final LabelTypeToRoleTypeMapping et,
final InsertOption<LabelTypeToRoleTypeMappingCB> op) {
assertObjectNotNull("labelTypeToRoleTypeMapping", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(
final InsertOption<LabelTypeToRoleTypeMappingCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -678,51 +531,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
doUpdate(labelTypeToRoleTypeMapping, null);
}
protected void doUpdate(final LabelTypeToRoleTypeMapping et,
final UpdateOption<LabelTypeToRoleTypeMappingCB> op) {
assertObjectNotNull("labelTypeToRoleTypeMapping", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(
final UpdateOption<LabelTypeToRoleTypeMappingCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected LabelTypeToRoleTypeMappingCB createCBForVaryingUpdate() {
final LabelTypeToRoleTypeMappingCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected LabelTypeToRoleTypeMappingCB createCBForSpecifiedUpdate() {
final LabelTypeToRoleTypeMappingCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doModify(et, op);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -737,27 +545,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
doInsertOrUpdate(labelTypeToRoleTypeMapping, null, null);
}
protected void doInsertOrUpdate(final LabelTypeToRoleTypeMapping et,
final InsertOption<LabelTypeToRoleTypeMappingCB> iop,
final UpdateOption<LabelTypeToRoleTypeMappingCB> uop) {
assertObjectNotNull("labelTypeToRoleTypeMapping", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doCreateOrModify(et, iop, uop);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -780,32 +567,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
doDelete(labelTypeToRoleTypeMapping, null);
}
protected void doDelete(final LabelTypeToRoleTypeMapping et,
final DeleteOption<LabelTypeToRoleTypeMappingCB> op) {
assertObjectNotNull("labelTypeToRoleTypeMapping", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(
final DeleteOption<LabelTypeToRoleTypeMappingCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doRemove(et, op);
}
// ===================================================================================
// Batch Update
// ============
@ -838,33 +599,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
return doBatchInsert(labelTypeToRoleTypeMappingList, null);
}
protected int[] doBatchInsert(final List<LabelTypeToRoleTypeMapping> ls,
final InsertOption<LabelTypeToRoleTypeMappingCB> op) {
assertObjectNotNull("labelTypeToRoleTypeMappingList", ls);
InsertOption<LabelTypeToRoleTypeMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(
final List<LabelTypeToRoleTypeMapping> ls,
final InsertOption<LabelTypeToRoleTypeMappingCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -894,32 +628,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
return doBatchUpdate(labelTypeToRoleTypeMappingList, null);
}
protected int[] doBatchUpdate(final List<LabelTypeToRoleTypeMapping> ls,
final UpdateOption<LabelTypeToRoleTypeMappingCB> op) {
assertObjectNotNull("labelTypeToRoleTypeMappingList", ls);
UpdateOption<LabelTypeToRoleTypeMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(
final List<LabelTypeToRoleTypeMapping> ls,
final UpdateOption<LabelTypeToRoleTypeMappingCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -955,12 +663,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doLumpModify(ls, op);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -973,25 +675,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
return doBatchDelete(labelTypeToRoleTypeMappingList, null);
}
protected int[] doBatchDelete(final List<LabelTypeToRoleTypeMapping> ls,
final DeleteOption<LabelTypeToRoleTypeMappingCB> op) {
assertObjectNotNull("labelTypeToRoleTypeMappingList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doLumpRemove(ls, op);
}
// ===================================================================================
// Query Update
// ============
@ -999,7 +682,7 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* labelTypeToRoleTypeMappingBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;LabelTypeToRoleTypeMapping, LabelTypeToRoleTypeMappingCB&gt;() {
* public ConditionBean setup(labelTypeToRoleTypeMapping entity, LabelTypeToRoleTypeMappingCB intoCB) {
* public ConditionBean setup(LabelTypeToRoleTypeMapping entity, LabelTypeToRoleTypeMappingCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1018,7 +701,7 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1026,29 +709,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<LabelTypeToRoleTypeMapping, LabelTypeToRoleTypeMappingCB> sp,
final InsertOption<LabelTypeToRoleTypeMappingCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final LabelTypeToRoleTypeMapping et = newEntity();
final LabelTypeToRoleTypeMappingCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected LabelTypeToRoleTypeMappingCB createCBForQueryInsert() {
final LabelTypeToRoleTypeMappingCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1077,22 +737,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
return doQueryUpdate(labelTypeToRoleTypeMapping, cb, null);
}
protected int doQueryUpdate(final LabelTypeToRoleTypeMapping et,
final LabelTypeToRoleTypeMappingCB cb,
final UpdateOption<LabelTypeToRoleTypeMappingCB> op) {
assertObjectNotNull("labelTypeToRoleTypeMapping", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1108,20 +752,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final LabelTypeToRoleTypeMappingCB cb,
final DeleteOption<LabelTypeToRoleTypeMappingCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1282,7 +912,7 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1385,49 +1015,20 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
}
// ===================================================================================
// Assist Helper
// =============
protected Class<LabelTypeToRoleTypeMapping> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends LabelTypeToRoleTypeMapping> typeOfSelectedEntity() {
return LabelTypeToRoleTypeMapping.class;
}
protected LabelTypeToRoleTypeMapping downcast(final Entity et) {
return helpEntityDowncastInternally(et,
LabelTypeToRoleTypeMapping.class);
@Override
protected Class<LabelTypeToRoleTypeMapping> typeOfHandlingEntity() {
return LabelTypeToRoleTypeMapping.class;
}
protected LabelTypeToRoleTypeMappingCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb,
LabelTypeToRoleTypeMappingCB.class);
}
@SuppressWarnings("unchecked")
protected List<LabelTypeToRoleTypeMapping> downcast(
final List<? extends Entity> ls) {
return (List<LabelTypeToRoleTypeMapping>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<LabelTypeToRoleTypeMappingCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<LabelTypeToRoleTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<LabelTypeToRoleTypeMappingCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<LabelTypeToRoleTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<LabelTypeToRoleTypeMappingCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<LabelTypeToRoleTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<LabelTypeToRoleTypeMapping, LabelTypeToRoleTypeMappingCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<LabelTypeToRoleTypeMapping, LabelTypeToRoleTypeMappingCB>) sp;
@Override
protected Class<LabelTypeToRoleTypeMappingCB> typeOfHandlingConditionBean() {
return LabelTypeToRoleTypeMappingCB.class;
}
}

View file

@ -36,9 +36,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
@ -83,7 +81,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
public abstract class BsOverlappingHostBhv extends
AbstractBehaviorWritable<OverlappingHost, OverlappingHostCB> {
// ===================================================================================
// Definition
@ -91,21 +90,12 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "OVERLAPPING_HOST";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public OverlappingHostDbm getDBMeta() {
return OverlappingHostDbm.getInstance();
}
@ -117,12 +107,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public OverlappingHost newEntity() {
return new OverlappingHost();
}
/** {@inheritDoc} */
@Override
public OverlappingHostCB newConditionBean() {
@ -157,25 +141,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final OverlappingHostCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final OverlappingHostCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final OverlappingHostCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -206,13 +171,8 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends OverlappingHost> ENTITY doSelectEntity(
final OverlappingHostCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends OverlappingHost> OptionalEntity<ENTITY> doSelectOptionalEntity(
final OverlappingHostCB cb, final Class<ENTITY> tp) {
final OverlappingHostCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -241,23 +201,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected OverlappingHost facadeSelectEntityWithDeletedCheck(
final OverlappingHostCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends OverlappingHost> ENTITY doSelectEntityWithDeletedCheck(
final OverlappingHostCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -274,12 +217,12 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends OverlappingHost> ENTITY doSelectByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends OverlappingHost> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -327,21 +270,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<OverlappingHost> facadeSelectList(
final OverlappingHostCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends OverlappingHost> ListResultBean<ENTITY> doSelectList(
final OverlappingHostCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -372,22 +300,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<OverlappingHost> facadeSelectPage(
final OverlappingHostCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends OverlappingHost> PagingResultBean<ENTITY> doSelectPage(
final OverlappingHostCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -410,21 +322,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final OverlappingHostCB cb,
final EntityRowHandler<OverlappingHost> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends OverlappingHost> void doSelectCursor(
final OverlappingHostCB cb, final EntityRowHandler<ENTITY> handler,
final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -448,27 +345,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<OverlappingHostCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends OverlappingHostCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -598,29 +474,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
doInsert(overlappingHost, null);
}
protected void doInsert(final OverlappingHost et,
final InsertOption<OverlappingHostCB> op) {
assertObjectNotNull("overlappingHost", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(final InsertOption<OverlappingHostCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -647,44 +500,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
doUpdate(overlappingHost, null);
}
protected void doUpdate(final OverlappingHost et,
final UpdateOption<OverlappingHostCB> op) {
assertObjectNotNull("overlappingHost", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(final UpdateOption<OverlappingHostCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected OverlappingHostCB createCBForVaryingUpdate() {
final OverlappingHostCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected OverlappingHostCB createCBForSpecifiedUpdate() {
final OverlappingHostCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
/**
* Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -708,19 +523,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
doUpdateNonstrict(overlappingHost, null);
}
protected void doUpdateNonstrict(final OverlappingHost et,
final UpdateOption<OverlappingHostCB> op) {
assertObjectNotNull("overlappingHost", et);
prepareUpdateOption(op);
helpUpdateNonstrictInternally(et, op);
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdateNonstrict(downcast(et), downcast(op));
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -734,20 +536,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(overlappingHost, null, null);
}
protected void doInsertOrUpdate(final OverlappingHost et,
final InsertOption<OverlappingHostCB> iop,
final UpdateOption<OverlappingHostCB> uop) {
assertObjectNotNull("overlappingHost", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
/**
* Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@ -761,20 +549,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
doInsertOrUpdateNonstrict(overlappingHost, null, null);
}
protected void doInsertOrUpdateNonstrict(final OverlappingHost et,
final InsertOption<OverlappingHostCB> iop,
final UpdateOption<OverlappingHostCB> uop) {
assertObjectNotNull("overlappingHost", et);
helpInsertOrUpdateNonstrictInternally(et, iop, uop);
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop));
}
/**
* Delete the entity. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -796,25 +570,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
doDelete(overlappingHost, null);
}
protected void doDelete(final OverlappingHost et,
final DeleteOption<OverlappingHostCB> op) {
assertObjectNotNull("overlappingHost", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(final DeleteOption<OverlappingHostCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
/**
* Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -833,13 +588,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
doDeleteNonstrict(overlappingHost, null);
}
protected void doDeleteNonstrict(final OverlappingHost et,
final DeleteOption<OverlappingHostCB> op) {
assertObjectNotNull("overlappingHost", et);
prepareDeleteOption(op);
helpDeleteNonstrictInternally(et, op);
}
/**
* Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -866,12 +614,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
helpDeleteNonstrictIgnoreDeletedInternally(et, op);
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDeleteNonstrict(downcast(et), downcast(op));
}
// ===================================================================================
// Batch Update
// ============
@ -903,32 +645,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
return doBatchInsert(overlappingHostList, null);
}
protected int[] doBatchInsert(final List<OverlappingHost> ls,
final InsertOption<OverlappingHostCB> op) {
assertObjectNotNull("overlappingHostList", ls);
InsertOption<OverlappingHostCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<OverlappingHost> ls,
final InsertOption<OverlappingHostCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -957,31 +673,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
return doBatchUpdate(overlappingHostList, null);
}
protected int[] doBatchUpdate(final List<OverlappingHost> ls,
final UpdateOption<OverlappingHostCB> op) {
assertObjectNotNull("overlappingHostList", ls);
UpdateOption<OverlappingHostCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<OverlappingHost> ls,
final UpdateOption<OverlappingHostCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1045,19 +736,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
return doBatchUpdateNonstrict(overlappingHostList, null);
}
protected int[] doBatchUpdateNonstrict(final List<OverlappingHost> ls,
final UpdateOption<OverlappingHostCB> op) {
assertObjectNotNull("overlappingHostList", ls);
UpdateOption<OverlappingHostCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop);
return delegateBatchUpdateNonstrict(ls, rlop);
}
/**
* Batch-update the entity list non-strictly specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1092,12 +770,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdateNonstrict(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1109,19 +781,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
return doBatchDelete(overlappingHostList, null);
}
protected int[] doBatchDelete(final List<OverlappingHost> ls,
final DeleteOption<OverlappingHostCB> op) {
assertObjectNotNull("overlappingHostList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list non-strictly. {NonExclusiveControl} <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1134,19 +793,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
return doBatchDeleteNonstrict(overlappingHostList, null);
}
protected int[] doBatchDeleteNonstrict(final List<OverlappingHost> ls,
final DeleteOption<OverlappingHostCB> op) {
assertObjectNotNull("overlappingHostList", ls);
prepareDeleteOption(op);
return delegateBatchDeleteNonstrict(ls, op);
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDeleteNonstrict(downcast(ls), downcast(op));
}
// ===================================================================================
// Query Update
// ============
@ -1154,7 +800,7 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* overlappingHostBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;OverlappingHost, OverlappingHostCB&gt;() {
* public ConditionBean setup(overlappingHost entity, OverlappingHostCB intoCB) {
* public ConditionBean setup(OverlappingHost entity, OverlappingHostCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1173,7 +819,7 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1181,29 +827,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<OverlappingHost, OverlappingHostCB> sp,
final InsertOption<OverlappingHostCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final OverlappingHost et = newEntity();
final OverlappingHostCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected OverlappingHostCB createCBForQueryInsert() {
final OverlappingHostCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1231,21 +854,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
return doQueryUpdate(overlappingHost, cb, null);
}
protected int doQueryUpdate(final OverlappingHost et,
final OverlappingHostCB cb, final UpdateOption<OverlappingHostCB> op) {
assertObjectNotNull("overlappingHost", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1261,20 +869,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final OverlappingHostCB cb,
final DeleteOption<OverlappingHostCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1528,7 +1122,7 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1638,46 +1232,20 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<OverlappingHost> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends OverlappingHost> typeOfSelectedEntity() {
return OverlappingHost.class;
}
protected OverlappingHost downcast(final Entity et) {
return helpEntityDowncastInternally(et, OverlappingHost.class);
@Override
protected Class<OverlappingHost> typeOfHandlingEntity() {
return OverlappingHost.class;
}
protected OverlappingHostCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb, OverlappingHostCB.class);
}
@SuppressWarnings("unchecked")
protected List<OverlappingHost> downcast(final List<? extends Entity> ls) {
return (List<OverlappingHost>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<OverlappingHostCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<OverlappingHostCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<OverlappingHostCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<OverlappingHostCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<OverlappingHostCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<OverlappingHostCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<OverlappingHost, OverlappingHostCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<OverlappingHost, OverlappingHostCB>) sp;
@Override
protected Class<OverlappingHostCB> typeOfHandlingConditionBean() {
return OverlappingHostCB.class;
}
}

View file

@ -36,9 +36,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
@ -83,7 +81,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
public abstract class BsPathMappingBhv extends
AbstractBehaviorWritable<PathMapping, PathMappingCB> {
// ===================================================================================
// Definition
@ -91,21 +90,12 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "PATH_MAPPING";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public PathMappingDbm getDBMeta() {
return PathMappingDbm.getInstance();
}
@ -117,12 +107,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public PathMapping newEntity() {
return new PathMapping();
}
/** {@inheritDoc} */
@Override
public PathMappingCB newConditionBean() {
@ -157,25 +141,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final PathMappingCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final PathMappingCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final PathMappingCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -206,13 +171,8 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends PathMapping> ENTITY doSelectEntity(
final PathMappingCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends PathMapping> OptionalEntity<ENTITY> doSelectOptionalEntity(
final PathMappingCB cb, final Class<ENTITY> tp) {
final PathMappingCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -240,23 +200,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected PathMapping facadeSelectEntityWithDeletedCheck(
final PathMappingCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends PathMapping> ENTITY doSelectEntityWithDeletedCheck(
final PathMappingCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -273,12 +216,12 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends PathMapping> ENTITY doSelectByPK(final Long id,
final Class<ENTITY> tp) {
final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends PathMapping> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -326,21 +269,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<PathMapping> facadeSelectList(
final PathMappingCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends PathMapping> ListResultBean<ENTITY> doSelectList(
final PathMappingCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -370,22 +298,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<PathMapping> facadeSelectPage(
final PathMappingCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends PathMapping> PagingResultBean<ENTITY> doSelectPage(
final PathMappingCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -408,21 +320,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final PathMappingCB cb,
final EntityRowHandler<PathMapping> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends PathMapping> void doSelectCursor(
final PathMappingCB cb, final EntityRowHandler<ENTITY> handler,
final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -446,27 +343,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<PathMappingCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends PathMappingCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -595,29 +471,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
doInsert(pathMapping, null);
}
protected void doInsert(final PathMapping et,
final InsertOption<PathMappingCB> op) {
assertObjectNotNull("pathMapping", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(final InsertOption<PathMappingCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -644,44 +497,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
doUpdate(pathMapping, null);
}
protected void doUpdate(final PathMapping et,
final UpdateOption<PathMappingCB> op) {
assertObjectNotNull("pathMapping", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(final UpdateOption<PathMappingCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected PathMappingCB createCBForVaryingUpdate() {
final PathMappingCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected PathMappingCB createCBForSpecifiedUpdate() {
final PathMappingCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
/**
* Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -705,19 +520,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
doUpdateNonstrict(pathMapping, null);
}
protected void doUpdateNonstrict(final PathMapping et,
final UpdateOption<PathMappingCB> op) {
assertObjectNotNull("pathMapping", et);
prepareUpdateOption(op);
helpUpdateNonstrictInternally(et, op);
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdateNonstrict(downcast(et), downcast(op));
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -731,20 +533,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(pathMapping, null, null);
}
protected void doInsertOrUpdate(final PathMapping et,
final InsertOption<PathMappingCB> iop,
final UpdateOption<PathMappingCB> uop) {
assertObjectNotNull("pathMapping", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
/**
* Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@ -758,20 +546,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
doInsertOrUpdateNonstrict(pathMapping, null, null);
}
protected void doInsertOrUpdateNonstrict(final PathMapping et,
final InsertOption<PathMappingCB> iop,
final UpdateOption<PathMappingCB> uop) {
assertObjectNotNull("pathMapping", et);
helpInsertOrUpdateNonstrictInternally(et, iop, uop);
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop));
}
/**
* Delete the entity. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -793,25 +567,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
doDelete(pathMapping, null);
}
protected void doDelete(final PathMapping et,
final DeleteOption<PathMappingCB> op) {
assertObjectNotNull("pathMapping", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(final DeleteOption<PathMappingCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
/**
* Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -830,13 +585,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
doDeleteNonstrict(pathMapping, null);
}
protected void doDeleteNonstrict(final PathMapping et,
final DeleteOption<PathMappingCB> op) {
assertObjectNotNull("pathMapping", et);
prepareDeleteOption(op);
helpDeleteNonstrictInternally(et, op);
}
/**
* Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -862,12 +610,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
helpDeleteNonstrictIgnoreDeletedInternally(et, op);
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDeleteNonstrict(downcast(et), downcast(op));
}
// ===================================================================================
// Batch Update
// ============
@ -899,32 +641,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
return doBatchInsert(pathMappingList, null);
}
protected int[] doBatchInsert(final List<PathMapping> ls,
final InsertOption<PathMappingCB> op) {
assertObjectNotNull("pathMappingList", ls);
InsertOption<PathMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<PathMapping> ls,
final InsertOption<PathMappingCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -953,31 +669,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
return doBatchUpdate(pathMappingList, null);
}
protected int[] doBatchUpdate(final List<PathMapping> ls,
final UpdateOption<PathMappingCB> op) {
assertObjectNotNull("pathMappingList", ls);
UpdateOption<PathMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<PathMapping> ls,
final UpdateOption<PathMappingCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1040,19 +731,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
return doBatchUpdateNonstrict(pathMappingList, null);
}
protected int[] doBatchUpdateNonstrict(final List<PathMapping> ls,
final UpdateOption<PathMappingCB> op) {
assertObjectNotNull("pathMappingList", ls);
UpdateOption<PathMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop);
return delegateBatchUpdateNonstrict(ls, rlop);
}
/**
* Batch-update the entity list non-strictly specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1086,12 +764,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdateNonstrict(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1103,19 +775,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
return doBatchDelete(pathMappingList, null);
}
protected int[] doBatchDelete(final List<PathMapping> ls,
final DeleteOption<PathMappingCB> op) {
assertObjectNotNull("pathMappingList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list non-strictly. {NonExclusiveControl} <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1127,19 +786,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
return doBatchDeleteNonstrict(pathMappingList, null);
}
protected int[] doBatchDeleteNonstrict(final List<PathMapping> ls,
final DeleteOption<PathMappingCB> op) {
assertObjectNotNull("pathMappingList", ls);
prepareDeleteOption(op);
return delegateBatchDeleteNonstrict(ls, op);
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDeleteNonstrict(downcast(ls), downcast(op));
}
// ===================================================================================
// Query Update
// ============
@ -1147,7 +793,7 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* pathMappingBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;PathMapping, PathMappingCB&gt;() {
* public ConditionBean setup(pathMapping entity, PathMappingCB intoCB) {
* public ConditionBean setup(PathMapping entity, PathMappingCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1166,7 +812,7 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1174,29 +820,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<PathMapping, PathMappingCB> sp,
final InsertOption<PathMappingCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final PathMapping et = newEntity();
final PathMappingCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected PathMappingCB createCBForQueryInsert() {
final PathMappingCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1223,21 +846,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
return doQueryUpdate(pathMapping, cb, null);
}
protected int doQueryUpdate(final PathMapping et, final PathMappingCB cb,
final UpdateOption<PathMappingCB> op) {
assertObjectNotNull("pathMapping", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1253,20 +861,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final PathMappingCB cb,
final DeleteOption<PathMappingCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1516,7 +1110,7 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1625,46 +1219,20 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<PathMapping> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends PathMapping> typeOfSelectedEntity() {
return PathMapping.class;
}
protected PathMapping downcast(final Entity et) {
return helpEntityDowncastInternally(et, PathMapping.class);
@Override
protected Class<PathMapping> typeOfHandlingEntity() {
return PathMapping.class;
}
protected PathMappingCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb, PathMappingCB.class);
}
@SuppressWarnings("unchecked")
protected List<PathMapping> downcast(final List<? extends Entity> ls) {
return (List<PathMapping>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<PathMappingCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<PathMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<PathMappingCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<PathMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<PathMappingCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<PathMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<PathMapping, PathMappingCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<PathMapping, PathMappingCB>) sp;
@Override
protected Class<PathMappingCB> typeOfHandlingConditionBean() {
return PathMappingCB.class;
}
}

View file

@ -37,9 +37,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
@ -84,7 +82,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
public abstract class BsRequestHeaderBhv extends
AbstractBehaviorWritable<RequestHeader, RequestHeaderCB> {
// ===================================================================================
// Definition
@ -92,21 +91,12 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "REQUEST_HEADER";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public RequestHeaderDbm getDBMeta() {
return RequestHeaderDbm.getInstance();
}
@ -118,12 +108,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public RequestHeader newEntity() {
return new RequestHeader();
}
/** {@inheritDoc} */
@Override
public RequestHeaderCB newConditionBean() {
@ -158,25 +142,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final RequestHeaderCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final RequestHeaderCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final RequestHeaderCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -207,13 +172,8 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends RequestHeader> ENTITY doSelectEntity(
final RequestHeaderCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends RequestHeader> OptionalEntity<ENTITY> doSelectOptionalEntity(
final RequestHeaderCB cb, final Class<ENTITY> tp) {
final RequestHeaderCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -241,23 +201,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected RequestHeader facadeSelectEntityWithDeletedCheck(
final RequestHeaderCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends RequestHeader> ENTITY doSelectEntityWithDeletedCheck(
final RequestHeaderCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -274,12 +217,12 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends RequestHeader> ENTITY doSelectByPK(final Long id,
final Class<ENTITY> tp) {
final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends RequestHeader> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -327,21 +270,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<RequestHeader> facadeSelectList(
final RequestHeaderCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends RequestHeader> ListResultBean<ENTITY> doSelectList(
final RequestHeaderCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -371,22 +299,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<RequestHeader> facadeSelectPage(
final RequestHeaderCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends RequestHeader> PagingResultBean<ENTITY> doSelectPage(
final RequestHeaderCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -409,21 +321,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final RequestHeaderCB cb,
final EntityRowHandler<RequestHeader> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends RequestHeader> void doSelectCursor(
final RequestHeaderCB cb, final EntityRowHandler<ENTITY> handler,
final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -447,27 +344,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<RequestHeaderCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends RequestHeaderCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -606,29 +482,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
doInsert(requestHeader, null);
}
protected void doInsert(final RequestHeader et,
final InsertOption<RequestHeaderCB> op) {
assertObjectNotNull("requestHeader", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(final InsertOption<RequestHeaderCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -655,44 +508,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
doUpdate(requestHeader, null);
}
protected void doUpdate(final RequestHeader et,
final UpdateOption<RequestHeaderCB> op) {
assertObjectNotNull("requestHeader", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(final UpdateOption<RequestHeaderCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected RequestHeaderCB createCBForVaryingUpdate() {
final RequestHeaderCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected RequestHeaderCB createCBForSpecifiedUpdate() {
final RequestHeaderCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
/**
* Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -716,19 +531,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
doUpdateNonstrict(requestHeader, null);
}
protected void doUpdateNonstrict(final RequestHeader et,
final UpdateOption<RequestHeaderCB> op) {
assertObjectNotNull("requestHeader", et);
prepareUpdateOption(op);
helpUpdateNonstrictInternally(et, op);
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdateNonstrict(downcast(et), downcast(op));
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -742,20 +544,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(requestHeader, null, null);
}
protected void doInsertOrUpdate(final RequestHeader et,
final InsertOption<RequestHeaderCB> iop,
final UpdateOption<RequestHeaderCB> uop) {
assertObjectNotNull("requestHeader", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
/**
* Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@ -769,20 +557,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
doInsertOrUpdateNonstrict(requestHeader, null, null);
}
protected void doInsertOrUpdateNonstrict(final RequestHeader et,
final InsertOption<RequestHeaderCB> iop,
final UpdateOption<RequestHeaderCB> uop) {
assertObjectNotNull("requestHeader", et);
helpInsertOrUpdateNonstrictInternally(et, iop, uop);
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop));
}
/**
* Delete the entity. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -804,25 +578,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
doDelete(requestHeader, null);
}
protected void doDelete(final RequestHeader et,
final DeleteOption<RequestHeaderCB> op) {
assertObjectNotNull("requestHeader", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(final DeleteOption<RequestHeaderCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
/**
* Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -841,13 +596,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
doDeleteNonstrict(requestHeader, null);
}
protected void doDeleteNonstrict(final RequestHeader et,
final DeleteOption<RequestHeaderCB> op) {
assertObjectNotNull("requestHeader", et);
prepareDeleteOption(op);
helpDeleteNonstrictInternally(et, op);
}
/**
* Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -873,12 +621,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
helpDeleteNonstrictIgnoreDeletedInternally(et, op);
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDeleteNonstrict(downcast(et), downcast(op));
}
// ===================================================================================
// Batch Update
// ============
@ -910,32 +652,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
return doBatchInsert(requestHeaderList, null);
}
protected int[] doBatchInsert(final List<RequestHeader> ls,
final InsertOption<RequestHeaderCB> op) {
assertObjectNotNull("requestHeaderList", ls);
InsertOption<RequestHeaderCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<RequestHeader> ls,
final InsertOption<RequestHeaderCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -964,31 +680,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
return doBatchUpdate(requestHeaderList, null);
}
protected int[] doBatchUpdate(final List<RequestHeader> ls,
final UpdateOption<RequestHeaderCB> op) {
assertObjectNotNull("requestHeaderList", ls);
UpdateOption<RequestHeaderCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<RequestHeader> ls,
final UpdateOption<RequestHeaderCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1052,19 +743,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
return doBatchUpdateNonstrict(requestHeaderList, null);
}
protected int[] doBatchUpdateNonstrict(final List<RequestHeader> ls,
final UpdateOption<RequestHeaderCB> op) {
assertObjectNotNull("requestHeaderList", ls);
UpdateOption<RequestHeaderCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop);
return delegateBatchUpdateNonstrict(ls, rlop);
}
/**
* Batch-update the entity list non-strictly specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1099,12 +777,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdateNonstrict(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1116,19 +788,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
return doBatchDelete(requestHeaderList, null);
}
protected int[] doBatchDelete(final List<RequestHeader> ls,
final DeleteOption<RequestHeaderCB> op) {
assertObjectNotNull("requestHeaderList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list non-strictly. {NonExclusiveControl} <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1141,19 +800,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
return doBatchDeleteNonstrict(requestHeaderList, null);
}
protected int[] doBatchDeleteNonstrict(final List<RequestHeader> ls,
final DeleteOption<RequestHeaderCB> op) {
assertObjectNotNull("requestHeaderList", ls);
prepareDeleteOption(op);
return delegateBatchDeleteNonstrict(ls, op);
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDeleteNonstrict(downcast(ls), downcast(op));
}
// ===================================================================================
// Query Update
// ============
@ -1161,7 +807,7 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* requestHeaderBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;RequestHeader, RequestHeaderCB&gt;() {
* public ConditionBean setup(requestHeader entity, RequestHeaderCB intoCB) {
* public ConditionBean setup(RequestHeader entity, RequestHeaderCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1180,7 +826,7 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1188,29 +834,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<RequestHeader, RequestHeaderCB> sp,
final InsertOption<RequestHeaderCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final RequestHeader et = newEntity();
final RequestHeaderCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected RequestHeaderCB createCBForQueryInsert() {
final RequestHeaderCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1238,21 +861,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
return doQueryUpdate(requestHeader, cb, null);
}
protected int doQueryUpdate(final RequestHeader et,
final RequestHeaderCB cb, final UpdateOption<RequestHeaderCB> op) {
assertObjectNotNull("requestHeader", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1268,20 +876,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final RequestHeaderCB cb,
final DeleteOption<RequestHeaderCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1535,7 +1129,7 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1644,46 +1238,20 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<RequestHeader> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends RequestHeader> typeOfSelectedEntity() {
return RequestHeader.class;
}
protected RequestHeader downcast(final Entity et) {
return helpEntityDowncastInternally(et, RequestHeader.class);
@Override
protected Class<RequestHeader> typeOfHandlingEntity() {
return RequestHeader.class;
}
protected RequestHeaderCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb, RequestHeaderCB.class);
}
@SuppressWarnings("unchecked")
protected List<RequestHeader> downcast(final List<? extends Entity> ls) {
return (List<RequestHeader>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<RequestHeaderCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<RequestHeaderCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<RequestHeaderCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<RequestHeaderCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<RequestHeaderCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<RequestHeaderCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<RequestHeader, RequestHeaderCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<RequestHeader, RequestHeaderCB>) sp;
@Override
protected Class<RequestHeaderCB> typeOfHandlingConditionBean() {
return RequestHeaderCB.class;
}
}

View file

@ -47,9 +47,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
@ -94,7 +92,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
public abstract class BsRoleTypeBhv extends
AbstractBehaviorWritable<RoleType, RoleTypeCB> {
// ===================================================================================
// Definition
@ -102,21 +101,12 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "ROLE_TYPE";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public RoleTypeDbm getDBMeta() {
return RoleTypeDbm.getInstance();
}
@ -128,12 +118,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public RoleType newEntity() {
return new RoleType();
}
/** {@inheritDoc} */
@Override
public RoleTypeCB newConditionBean() {
@ -168,25 +152,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final RoleTypeCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final RoleTypeCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final RoleTypeCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -217,13 +182,8 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends RoleType> ENTITY doSelectEntity(
final RoleTypeCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends RoleType> OptionalEntity<ENTITY> doSelectOptionalEntity(
final RoleTypeCB cb, final Class<ENTITY> tp) {
final RoleTypeCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -251,22 +211,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected RoleType facadeSelectEntityWithDeletedCheck(final RoleTypeCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends RoleType> ENTITY doSelectEntityWithDeletedCheck(
final RoleTypeCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -283,12 +227,12 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends RoleType> ENTITY doSelectByPK(final Long id,
final Class<ENTITY> tp) {
final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends RoleType> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -336,20 +280,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<RoleType> facadeSelectList(final RoleTypeCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends RoleType> ListResultBean<ENTITY> doSelectList(
final RoleTypeCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -379,21 +309,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<RoleType> facadeSelectPage(final RoleTypeCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends RoleType> PagingResultBean<ENTITY> doSelectPage(
final RoleTypeCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -416,21 +331,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final RoleTypeCB cb,
final EntityRowHandler<RoleType> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends RoleType> void doSelectCursor(
final RoleTypeCB cb, final EntityRowHandler<ENTITY> handler,
final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -454,27 +354,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<RoleTypeCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends RoleTypeCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -653,7 +532,7 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param roleTypeList The entity list of roleType. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -766,7 +645,7 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param roleTypeList The entity list of roleType. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -879,7 +758,7 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param roleTypeList The entity list of roleType. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -992,7 +871,7 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param roleTypeList The entity list of roleType. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -1055,28 +934,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
doInsert(roleType, null);
}
protected void doInsert(final RoleType et, final InsertOption<RoleTypeCB> op) {
assertObjectNotNull("roleType", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(final InsertOption<RoleTypeCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -1103,43 +960,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
doUpdate(roleType, null);
}
protected void doUpdate(final RoleType et, final UpdateOption<RoleTypeCB> op) {
assertObjectNotNull("roleType", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(final UpdateOption<RoleTypeCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected RoleTypeCB createCBForVaryingUpdate() {
final RoleTypeCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected RoleTypeCB createCBForSpecifiedUpdate() {
final RoleTypeCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
/**
* Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -1163,19 +983,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
doUpdateNonstrict(roleType, null);
}
protected void doUpdateNonstrict(final RoleType et,
final UpdateOption<RoleTypeCB> op) {
assertObjectNotNull("roleType", et);
prepareUpdateOption(op);
helpUpdateNonstrictInternally(et, op);
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdateNonstrict(downcast(et), downcast(op));
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -1189,20 +996,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(roleType, null, null);
}
protected void doInsertOrUpdate(final RoleType et,
final InsertOption<RoleTypeCB> iop,
final UpdateOption<RoleTypeCB> uop) {
assertObjectNotNull("roleType", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
/**
* Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@ -1216,20 +1009,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
doInsertOrUpdateNonstrict(roleType, null, null);
}
protected void doInsertOrUpdateNonstrict(final RoleType et,
final InsertOption<RoleTypeCB> iop,
final UpdateOption<RoleTypeCB> uop) {
assertObjectNotNull("roleType", et);
helpInsertOrUpdateNonstrictInternally(et, iop, uop);
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop));
}
/**
* Delete the entity. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -1251,24 +1030,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
doDelete(roleType, null);
}
protected void doDelete(final RoleType et, final DeleteOption<RoleTypeCB> op) {
assertObjectNotNull("roleType", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(final DeleteOption<RoleTypeCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
/**
* Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -1287,13 +1048,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
doDeleteNonstrict(roleType, null);
}
protected void doDeleteNonstrict(final RoleType et,
final DeleteOption<RoleTypeCB> op) {
assertObjectNotNull("roleType", et);
prepareDeleteOption(op);
helpDeleteNonstrictInternally(et, op);
}
/**
* Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -1319,12 +1073,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
helpDeleteNonstrictIgnoreDeletedInternally(et, op);
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDeleteNonstrict(downcast(et), downcast(op));
}
// ===================================================================================
// Batch Update
// ============
@ -1356,32 +1104,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
return doBatchInsert(roleTypeList, null);
}
protected int[] doBatchInsert(final List<RoleType> ls,
final InsertOption<RoleTypeCB> op) {
assertObjectNotNull("roleTypeList", ls);
InsertOption<RoleTypeCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<RoleType> ls,
final InsertOption<RoleTypeCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -1410,31 +1132,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
return doBatchUpdate(roleTypeList, null);
}
protected int[] doBatchUpdate(final List<RoleType> ls,
final UpdateOption<RoleTypeCB> op) {
assertObjectNotNull("roleTypeList", ls);
UpdateOption<RoleTypeCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<RoleType> ls,
final UpdateOption<RoleTypeCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1497,19 +1194,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
return doBatchUpdateNonstrict(roleTypeList, null);
}
protected int[] doBatchUpdateNonstrict(final List<RoleType> ls,
final UpdateOption<RoleTypeCB> op) {
assertObjectNotNull("roleTypeList", ls);
UpdateOption<RoleTypeCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop);
return delegateBatchUpdateNonstrict(ls, rlop);
}
/**
* Batch-update the entity list non-strictly specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1543,12 +1227,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdateNonstrict(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1560,19 +1238,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
return doBatchDelete(roleTypeList, null);
}
protected int[] doBatchDelete(final List<RoleType> ls,
final DeleteOption<RoleTypeCB> op) {
assertObjectNotNull("roleTypeList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list non-strictly. {NonExclusiveControl} <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1584,19 +1249,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
return doBatchDeleteNonstrict(roleTypeList, null);
}
protected int[] doBatchDeleteNonstrict(final List<RoleType> ls,
final DeleteOption<RoleTypeCB> op) {
assertObjectNotNull("roleTypeList", ls);
prepareDeleteOption(op);
return delegateBatchDeleteNonstrict(ls, op);
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDeleteNonstrict(downcast(ls), downcast(op));
}
// ===================================================================================
// Query Update
// ============
@ -1604,7 +1256,7 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* roleTypeBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;RoleType, RoleTypeCB&gt;() {
* public ConditionBean setup(roleType entity, RoleTypeCB intoCB) {
* public ConditionBean setup(RoleType entity, RoleTypeCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1623,7 +1275,7 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1631,29 +1283,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<RoleType, RoleTypeCB> sp,
final InsertOption<RoleTypeCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final RoleType et = newEntity();
final RoleTypeCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected RoleTypeCB createCBForQueryInsert() {
final RoleTypeCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1680,21 +1309,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
return doQueryUpdate(roleType, cb, null);
}
protected int doQueryUpdate(final RoleType et, final RoleTypeCB cb,
final UpdateOption<RoleTypeCB> op) {
assertObjectNotNull("roleType", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1710,20 +1324,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final RoleTypeCB cb,
final DeleteOption<RoleTypeCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1971,7 +1571,7 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -2080,46 +1680,20 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<RoleType> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends RoleType> typeOfSelectedEntity() {
return RoleType.class;
}
protected RoleType downcast(final Entity et) {
return helpEntityDowncastInternally(et, RoleType.class);
@Override
protected Class<RoleType> typeOfHandlingEntity() {
return RoleType.class;
}
protected RoleTypeCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb, RoleTypeCB.class);
}
@SuppressWarnings("unchecked")
protected List<RoleType> downcast(final List<? extends Entity> ls) {
return (List<RoleType>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<RoleTypeCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<RoleTypeCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<RoleTypeCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<RoleTypeCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<RoleTypeCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<RoleTypeCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<RoleType, RoleTypeCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<RoleType, RoleTypeCB>) sp;
@Override
protected Class<RoleTypeCB> typeOfHandlingConditionBean() {
return RoleTypeCB.class;
}
}

View file

@ -36,9 +36,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
@ -83,7 +81,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
public abstract class BsScheduledJobBhv extends
AbstractBehaviorWritable<ScheduledJob, ScheduledJobCB> {
// ===================================================================================
// Definition
@ -91,21 +90,12 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "SCHEDULED_JOB";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public ScheduledJobDbm getDBMeta() {
return ScheduledJobDbm.getInstance();
}
@ -117,12 +107,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public ScheduledJob newEntity() {
return new ScheduledJob();
}
/** {@inheritDoc} */
@Override
public ScheduledJobCB newConditionBean() {
@ -157,25 +141,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final ScheduledJobCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final ScheduledJobCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final ScheduledJobCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -206,13 +171,8 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends ScheduledJob> ENTITY doSelectEntity(
final ScheduledJobCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends ScheduledJob> OptionalEntity<ENTITY> doSelectOptionalEntity(
final ScheduledJobCB cb, final Class<ENTITY> tp) {
final ScheduledJobCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -240,23 +200,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected ScheduledJob facadeSelectEntityWithDeletedCheck(
final ScheduledJobCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends ScheduledJob> ENTITY doSelectEntityWithDeletedCheck(
final ScheduledJobCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -273,12 +216,12 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends ScheduledJob> ENTITY doSelectByPK(final Long id,
final Class<ENTITY> tp) {
final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends ScheduledJob> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -326,21 +269,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<ScheduledJob> facadeSelectList(
final ScheduledJobCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends ScheduledJob> ListResultBean<ENTITY> doSelectList(
final ScheduledJobCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -370,22 +298,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<ScheduledJob> facadeSelectPage(
final ScheduledJobCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends ScheduledJob> PagingResultBean<ENTITY> doSelectPage(
final ScheduledJobCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -408,21 +320,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final ScheduledJobCB cb,
final EntityRowHandler<ScheduledJob> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends ScheduledJob> void doSelectCursor(
final ScheduledJobCB cb, final EntityRowHandler<ENTITY> handler,
final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -446,27 +343,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<ScheduledJobCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends ScheduledJobCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -595,29 +471,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
doInsert(scheduledJob, null);
}
protected void doInsert(final ScheduledJob et,
final InsertOption<ScheduledJobCB> op) {
assertObjectNotNull("scheduledJob", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(final InsertOption<ScheduledJobCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -644,44 +497,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
doUpdate(scheduledJob, null);
}
protected void doUpdate(final ScheduledJob et,
final UpdateOption<ScheduledJobCB> op) {
assertObjectNotNull("scheduledJob", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(final UpdateOption<ScheduledJobCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected ScheduledJobCB createCBForVaryingUpdate() {
final ScheduledJobCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected ScheduledJobCB createCBForSpecifiedUpdate() {
final ScheduledJobCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
/**
* Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -705,19 +520,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
doUpdateNonstrict(scheduledJob, null);
}
protected void doUpdateNonstrict(final ScheduledJob et,
final UpdateOption<ScheduledJobCB> op) {
assertObjectNotNull("scheduledJob", et);
prepareUpdateOption(op);
helpUpdateNonstrictInternally(et, op);
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdateNonstrict(downcast(et), downcast(op));
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -731,20 +533,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(scheduledJob, null, null);
}
protected void doInsertOrUpdate(final ScheduledJob et,
final InsertOption<ScheduledJobCB> iop,
final UpdateOption<ScheduledJobCB> uop) {
assertObjectNotNull("scheduledJob", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
/**
* Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@ -758,20 +546,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
doInsertOrUpdateNonstrict(scheduledJob, null, null);
}
protected void doInsertOrUpdateNonstrict(final ScheduledJob et,
final InsertOption<ScheduledJobCB> iop,
final UpdateOption<ScheduledJobCB> uop) {
assertObjectNotNull("scheduledJob", et);
helpInsertOrUpdateNonstrictInternally(et, iop, uop);
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop));
}
/**
* Delete the entity. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -793,25 +567,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
doDelete(scheduledJob, null);
}
protected void doDelete(final ScheduledJob et,
final DeleteOption<ScheduledJobCB> op) {
assertObjectNotNull("scheduledJob", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(final DeleteOption<ScheduledJobCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
/**
* Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -830,13 +585,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
doDeleteNonstrict(scheduledJob, null);
}
protected void doDeleteNonstrict(final ScheduledJob et,
final DeleteOption<ScheduledJobCB> op) {
assertObjectNotNull("scheduledJob", et);
prepareDeleteOption(op);
helpDeleteNonstrictInternally(et, op);
}
/**
* Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -862,12 +610,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
helpDeleteNonstrictIgnoreDeletedInternally(et, op);
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDeleteNonstrict(downcast(et), downcast(op));
}
// ===================================================================================
// Batch Update
// ============
@ -899,32 +641,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
return doBatchInsert(scheduledJobList, null);
}
protected int[] doBatchInsert(final List<ScheduledJob> ls,
final InsertOption<ScheduledJobCB> op) {
assertObjectNotNull("scheduledJobList", ls);
InsertOption<ScheduledJobCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<ScheduledJob> ls,
final InsertOption<ScheduledJobCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -953,31 +669,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
return doBatchUpdate(scheduledJobList, null);
}
protected int[] doBatchUpdate(final List<ScheduledJob> ls,
final UpdateOption<ScheduledJobCB> op) {
assertObjectNotNull("scheduledJobList", ls);
UpdateOption<ScheduledJobCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<ScheduledJob> ls,
final UpdateOption<ScheduledJobCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1040,19 +731,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
return doBatchUpdateNonstrict(scheduledJobList, null);
}
protected int[] doBatchUpdateNonstrict(final List<ScheduledJob> ls,
final UpdateOption<ScheduledJobCB> op) {
assertObjectNotNull("scheduledJobList", ls);
UpdateOption<ScheduledJobCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop);
return delegateBatchUpdateNonstrict(ls, rlop);
}
/**
* Batch-update the entity list non-strictly specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1087,12 +765,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdateNonstrict(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1104,19 +776,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
return doBatchDelete(scheduledJobList, null);
}
protected int[] doBatchDelete(final List<ScheduledJob> ls,
final DeleteOption<ScheduledJobCB> op) {
assertObjectNotNull("scheduledJobList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list non-strictly. {NonExclusiveControl} <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1128,19 +787,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
return doBatchDeleteNonstrict(scheduledJobList, null);
}
protected int[] doBatchDeleteNonstrict(final List<ScheduledJob> ls,
final DeleteOption<ScheduledJobCB> op) {
assertObjectNotNull("scheduledJobList", ls);
prepareDeleteOption(op);
return delegateBatchDeleteNonstrict(ls, op);
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDeleteNonstrict(downcast(ls), downcast(op));
}
// ===================================================================================
// Query Update
// ============
@ -1148,7 +794,7 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* scheduledJobBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;ScheduledJob, ScheduledJobCB&gt;() {
* public ConditionBean setup(scheduledJob entity, ScheduledJobCB intoCB) {
* public ConditionBean setup(ScheduledJob entity, ScheduledJobCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1167,7 +813,7 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1175,29 +821,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<ScheduledJob, ScheduledJobCB> sp,
final InsertOption<ScheduledJobCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final ScheduledJob et = newEntity();
final ScheduledJobCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected ScheduledJobCB createCBForQueryInsert() {
final ScheduledJobCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1225,21 +848,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
return doQueryUpdate(scheduledJob, cb, null);
}
protected int doQueryUpdate(final ScheduledJob et, final ScheduledJobCB cb,
final UpdateOption<ScheduledJobCB> op) {
assertObjectNotNull("scheduledJob", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1255,20 +863,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final ScheduledJobCB cb,
final DeleteOption<ScheduledJobCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1518,7 +1112,7 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1627,46 +1221,20 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<ScheduledJob> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends ScheduledJob> typeOfSelectedEntity() {
return ScheduledJob.class;
}
protected ScheduledJob downcast(final Entity et) {
return helpEntityDowncastInternally(et, ScheduledJob.class);
@Override
protected Class<ScheduledJob> typeOfHandlingEntity() {
return ScheduledJob.class;
}
protected ScheduledJobCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb, ScheduledJobCB.class);
}
@SuppressWarnings("unchecked")
protected List<ScheduledJob> downcast(final List<? extends Entity> ls) {
return (List<ScheduledJob>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<ScheduledJobCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<ScheduledJobCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<ScheduledJobCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<ScheduledJobCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<ScheduledJobCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<ScheduledJobCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<ScheduledJob, ScheduledJobCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<ScheduledJob, ScheduledJobCB>) sp;
@Override
protected Class<ScheduledJobCB> typeOfHandlingConditionBean() {
return ScheduledJobCB.class;
}
}

View file

@ -37,9 +37,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
import org.seasar.dbflute.exception.EntityAlreadyExistsException;
@ -82,7 +80,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
public abstract class BsSearchFieldLogBhv extends
AbstractBehaviorWritable<SearchFieldLog, SearchFieldLogCB> {
// ===================================================================================
// Definition
@ -92,21 +91,12 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "SEARCH_FIELD_LOG";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public SearchFieldLogDbm getDBMeta() {
return SearchFieldLogDbm.getInstance();
}
@ -118,12 +108,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public SearchFieldLog newEntity() {
return new SearchFieldLog();
}
/** {@inheritDoc} */
@Override
public SearchFieldLogCB newConditionBean() {
@ -158,25 +142,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final SearchFieldLogCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final SearchFieldLogCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final SearchFieldLogCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -207,13 +172,8 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends SearchFieldLog> ENTITY doSelectEntity(
final SearchFieldLogCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends SearchFieldLog> OptionalEntity<ENTITY> doSelectOptionalEntity(
final SearchFieldLogCB cb, final Class<ENTITY> tp) {
final SearchFieldLogCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -241,23 +201,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected SearchFieldLog facadeSelectEntityWithDeletedCheck(
final SearchFieldLogCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends SearchFieldLog> ENTITY doSelectEntityWithDeletedCheck(
final SearchFieldLogCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -274,12 +217,12 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends SearchFieldLog> ENTITY doSelectByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends SearchFieldLog> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -327,21 +270,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<SearchFieldLog> facadeSelectList(
final SearchFieldLogCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends SearchFieldLog> ListResultBean<ENTITY> doSelectList(
final SearchFieldLogCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -371,22 +299,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<SearchFieldLog> facadeSelectPage(
final SearchFieldLogCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends SearchFieldLog> PagingResultBean<ENTITY> doSelectPage(
final SearchFieldLogCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -409,21 +321,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final SearchFieldLogCB cb,
final EntityRowHandler<SearchFieldLog> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends SearchFieldLog> void doSelectCursor(
final SearchFieldLogCB cb, final EntityRowHandler<ENTITY> handler,
final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -447,27 +344,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<SearchFieldLogCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends SearchFieldLogCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -607,29 +483,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
doInsert(searchFieldLog, null);
}
protected void doInsert(final SearchFieldLog et,
final InsertOption<SearchFieldLogCB> op) {
assertObjectNotNull("searchFieldLog", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(final InsertOption<SearchFieldLogCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -656,50 +509,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
doUpdate(searchFieldLog, null);
}
protected void doUpdate(final SearchFieldLog et,
final UpdateOption<SearchFieldLogCB> op) {
assertObjectNotNull("searchFieldLog", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(final UpdateOption<SearchFieldLogCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected SearchFieldLogCB createCBForVaryingUpdate() {
final SearchFieldLogCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected SearchFieldLogCB createCBForSpecifiedUpdate() {
final SearchFieldLogCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doModify(et, op);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -713,27 +522,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(searchFieldLog, null, null);
}
protected void doInsertOrUpdate(final SearchFieldLog et,
final InsertOption<SearchFieldLogCB> iop,
final UpdateOption<SearchFieldLogCB> uop) {
assertObjectNotNull("searchFieldLog", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doCreateOrModify(et, iop, uop);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -755,31 +543,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
doDelete(searchFieldLog, null);
}
protected void doDelete(final SearchFieldLog et,
final DeleteOption<SearchFieldLogCB> op) {
assertObjectNotNull("searchFieldLog", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(final DeleteOption<SearchFieldLogCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doRemove(et, op);
}
// ===================================================================================
// Batch Update
// ============
@ -811,32 +574,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
return doBatchInsert(searchFieldLogList, null);
}
protected int[] doBatchInsert(final List<SearchFieldLog> ls,
final InsertOption<SearchFieldLogCB> op) {
assertObjectNotNull("searchFieldLogList", ls);
InsertOption<SearchFieldLogCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<SearchFieldLog> ls,
final InsertOption<SearchFieldLogCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -865,31 +602,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
return doBatchUpdate(searchFieldLogList, null);
}
protected int[] doBatchUpdate(final List<SearchFieldLog> ls,
final UpdateOption<SearchFieldLogCB> op) {
assertObjectNotNull("searchFieldLogList", ls);
UpdateOption<SearchFieldLogCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<SearchFieldLog> ls,
final UpdateOption<SearchFieldLogCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -924,12 +636,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doLumpModify(ls, op);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -941,25 +647,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
return doBatchDelete(searchFieldLogList, null);
}
protected int[] doBatchDelete(final List<SearchFieldLog> ls,
final DeleteOption<SearchFieldLogCB> op) {
assertObjectNotNull("searchFieldLogList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doLumpRemove(ls, op);
}
// ===================================================================================
// Query Update
// ============
@ -967,7 +654,7 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* searchFieldLogBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;SearchFieldLog, SearchFieldLogCB&gt;() {
* public ConditionBean setup(searchFieldLog entity, SearchFieldLogCB intoCB) {
* public ConditionBean setup(SearchFieldLog entity, SearchFieldLogCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -986,7 +673,7 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -994,29 +681,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<SearchFieldLog, SearchFieldLogCB> sp,
final InsertOption<SearchFieldLogCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final SearchFieldLog et = newEntity();
final SearchFieldLogCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected SearchFieldLogCB createCBForQueryInsert() {
final SearchFieldLogCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1044,21 +708,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
return doQueryUpdate(searchFieldLog, cb, null);
}
protected int doQueryUpdate(final SearchFieldLog et,
final SearchFieldLogCB cb, final UpdateOption<SearchFieldLogCB> op) {
assertObjectNotNull("searchFieldLog", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1074,20 +723,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final SearchFieldLogCB cb,
final DeleteOption<SearchFieldLogCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1244,7 +879,7 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1346,46 +981,20 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<SearchFieldLog> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends SearchFieldLog> typeOfSelectedEntity() {
return SearchFieldLog.class;
}
protected SearchFieldLog downcast(final Entity et) {
return helpEntityDowncastInternally(et, SearchFieldLog.class);
@Override
protected Class<SearchFieldLog> typeOfHandlingEntity() {
return SearchFieldLog.class;
}
protected SearchFieldLogCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb, SearchFieldLogCB.class);
}
@SuppressWarnings("unchecked")
protected List<SearchFieldLog> downcast(final List<? extends Entity> ls) {
return (List<SearchFieldLog>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<SearchFieldLogCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<SearchFieldLogCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<SearchFieldLogCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<SearchFieldLogCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<SearchFieldLogCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<SearchFieldLogCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<SearchFieldLog, SearchFieldLogCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<SearchFieldLog, SearchFieldLogCB>) sp;
@Override
protected Class<SearchFieldLogCB> typeOfHandlingConditionBean() {
return SearchFieldLogCB.class;
}
}

View file

@ -44,9 +44,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
import org.seasar.dbflute.exception.EntityAlreadyExistsException;
@ -89,7 +87,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
public abstract class BsSearchLogBhv extends
AbstractBehaviorWritable<SearchLog, SearchLogCB> {
// ===================================================================================
// Definition
@ -113,21 +112,12 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "SEARCH_LOG";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public SearchLogDbm getDBMeta() {
return SearchLogDbm.getInstance();
}
@ -139,12 +129,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public SearchLog newEntity() {
return new SearchLog();
}
/** {@inheritDoc} */
@Override
public SearchLogCB newConditionBean() {
@ -179,25 +163,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final SearchLogCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final SearchLogCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final SearchLogCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -228,13 +193,8 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends SearchLog> ENTITY doSelectEntity(
final SearchLogCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends SearchLog> OptionalEntity<ENTITY> doSelectOptionalEntity(
final SearchLogCB cb, final Class<ENTITY> tp) {
final SearchLogCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -262,22 +222,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected SearchLog facadeSelectEntityWithDeletedCheck(final SearchLogCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends SearchLog> ENTITY doSelectEntityWithDeletedCheck(
final SearchLogCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -294,12 +238,12 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends SearchLog> ENTITY doSelectByPK(final Long id,
final Class<ENTITY> tp) {
final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends SearchLog> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -347,20 +291,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<SearchLog> facadeSelectList(final SearchLogCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends SearchLog> ListResultBean<ENTITY> doSelectList(
final SearchLogCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -390,21 +320,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<SearchLog> facadeSelectPage(final SearchLogCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends SearchLog> PagingResultBean<ENTITY> doSelectPage(
final SearchLogCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -427,21 +342,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final SearchLogCB cb,
final EntityRowHandler<SearchLog> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends SearchLog> void doSelectCursor(
final SearchLogCB cb, final EntityRowHandler<ENTITY> handler,
final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -465,27 +365,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<SearchLogCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends SearchLogCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -659,7 +538,7 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param searchLogList The entity list of searchLog. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -767,7 +646,7 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param searchLogList The entity list of searchLog. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -838,29 +717,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
doInsert(searchLog, null);
}
protected void doInsert(final SearchLog et,
final InsertOption<SearchLogCB> op) {
assertObjectNotNull("searchLog", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(final InsertOption<SearchLogCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -887,50 +743,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
doUpdate(searchLog, null);
}
protected void doUpdate(final SearchLog et,
final UpdateOption<SearchLogCB> op) {
assertObjectNotNull("searchLog", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(final UpdateOption<SearchLogCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected SearchLogCB createCBForVaryingUpdate() {
final SearchLogCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected SearchLogCB createCBForSpecifiedUpdate() {
final SearchLogCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doModify(et, op);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -944,27 +756,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(searchLog, null, null);
}
protected void doInsertOrUpdate(final SearchLog et,
final InsertOption<SearchLogCB> iop,
final UpdateOption<SearchLogCB> uop) {
assertObjectNotNull("searchLog", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doCreateOrModify(et, iop, uop);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -986,31 +777,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
doDelete(searchLog, null);
}
protected void doDelete(final SearchLog et,
final DeleteOption<SearchLogCB> op) {
assertObjectNotNull("searchLog", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(final DeleteOption<SearchLogCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doRemove(et, op);
}
// ===================================================================================
// Batch Update
// ============
@ -1042,32 +808,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
return doBatchInsert(searchLogList, null);
}
protected int[] doBatchInsert(final List<SearchLog> ls,
final InsertOption<SearchLogCB> op) {
assertObjectNotNull("searchLogList", ls);
InsertOption<SearchLogCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<SearchLog> ls,
final InsertOption<SearchLogCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -1096,31 +836,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
return doBatchUpdate(searchLogList, null);
}
protected int[] doBatchUpdate(final List<SearchLog> ls,
final UpdateOption<SearchLogCB> op) {
assertObjectNotNull("searchLogList", ls);
UpdateOption<SearchLogCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<SearchLog> ls,
final UpdateOption<SearchLogCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1155,12 +870,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doLumpModify(ls, op);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1172,25 +881,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
return doBatchDelete(searchLogList, null);
}
protected int[] doBatchDelete(final List<SearchLog> ls,
final DeleteOption<SearchLogCB> op) {
assertObjectNotNull("searchLogList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doLumpRemove(ls, op);
}
// ===================================================================================
// Query Update
// ============
@ -1198,7 +888,7 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* searchLogBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;SearchLog, SearchLogCB&gt;() {
* public ConditionBean setup(searchLog entity, SearchLogCB intoCB) {
* public ConditionBean setup(SearchLog entity, SearchLogCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1217,7 +907,7 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1225,29 +915,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<SearchLog, SearchLogCB> sp,
final InsertOption<SearchLogCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final SearchLog et = newEntity();
final SearchLogCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected SearchLogCB createCBForQueryInsert() {
final SearchLogCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1274,21 +941,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
return doQueryUpdate(searchLog, cb, null);
}
protected int doQueryUpdate(final SearchLog et, final SearchLogCB cb,
final UpdateOption<SearchLogCB> op) {
assertObjectNotNull("searchLog", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1304,20 +956,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final SearchLogCB cb,
final DeleteOption<SearchLogCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1471,7 +1109,7 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1572,46 +1210,20 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<SearchLog> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends SearchLog> typeOfSelectedEntity() {
return SearchLog.class;
}
protected SearchLog downcast(final Entity et) {
return helpEntityDowncastInternally(et, SearchLog.class);
@Override
protected Class<SearchLog> typeOfHandlingEntity() {
return SearchLog.class;
}
protected SearchLogCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb, SearchLogCB.class);
}
@SuppressWarnings("unchecked")
protected List<SearchLog> downcast(final List<? extends Entity> ls) {
return (List<SearchLog>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<SearchLogCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<SearchLogCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<SearchLogCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<SearchLogCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<SearchLogCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<SearchLogCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<SearchLog, SearchLogCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<SearchLog, SearchLogCB>) sp;
@Override
protected Class<SearchLogCB> typeOfHandlingConditionBean() {
return SearchLogCB.class;
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -43,9 +43,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
import org.seasar.dbflute.exception.EntityAlreadyExistsException;
@ -88,7 +86,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
public abstract class BsUserInfoBhv extends
AbstractBehaviorWritable<UserInfo, UserInfoCB> {
// ===================================================================================
// Definition
@ -96,21 +95,12 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "USER_INFO";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public UserInfoDbm getDBMeta() {
return UserInfoDbm.getInstance();
}
@ -122,12 +112,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public UserInfo newEntity() {
return new UserInfo();
}
/** {@inheritDoc} */
@Override
public UserInfoCB newConditionBean() {
@ -162,25 +146,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final UserInfoCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final UserInfoCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final UserInfoCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -211,13 +176,8 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends UserInfo> ENTITY doSelectEntity(
final UserInfoCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends UserInfo> OptionalEntity<ENTITY> doSelectOptionalEntity(
final UserInfoCB cb, final Class<ENTITY> tp) {
final UserInfoCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -245,22 +205,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected UserInfo facadeSelectEntityWithDeletedCheck(final UserInfoCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends UserInfo> ENTITY doSelectEntityWithDeletedCheck(
final UserInfoCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -277,12 +221,12 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends UserInfo> ENTITY doSelectByPK(final Long id,
final Class<ENTITY> tp) {
final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends UserInfo> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -330,20 +274,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<UserInfo> facadeSelectList(final UserInfoCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends UserInfo> ListResultBean<ENTITY> doSelectList(
final UserInfoCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -373,21 +303,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<UserInfo> facadeSelectPage(final UserInfoCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends UserInfo> PagingResultBean<ENTITY> doSelectPage(
final UserInfoCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -410,21 +325,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final UserInfoCB cb,
final EntityRowHandler<UserInfo> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends UserInfo> void doSelectCursor(
final UserInfoCB cb, final EntityRowHandler<ENTITY> handler,
final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -448,27 +348,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<UserInfoCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends UserInfoCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -644,7 +523,7 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param userInfoList The entity list of userInfo. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -753,7 +632,7 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param userInfoList The entity list of userInfo. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -814,28 +693,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
doInsert(userInfo, null);
}
protected void doInsert(final UserInfo et, final InsertOption<UserInfoCB> op) {
assertObjectNotNull("userInfo", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(final InsertOption<UserInfoCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -862,49 +719,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
doUpdate(userInfo, null);
}
protected void doUpdate(final UserInfo et, final UpdateOption<UserInfoCB> op) {
assertObjectNotNull("userInfo", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(final UpdateOption<UserInfoCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected UserInfoCB createCBForVaryingUpdate() {
final UserInfoCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected UserInfoCB createCBForSpecifiedUpdate() {
final UserInfoCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doModify(et, op);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -918,27 +732,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(userInfo, null, null);
}
protected void doInsertOrUpdate(final UserInfo et,
final InsertOption<UserInfoCB> iop,
final UpdateOption<UserInfoCB> uop) {
assertObjectNotNull("userInfo", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doCreateOrModify(et, iop, uop);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -960,30 +753,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
doDelete(userInfo, null);
}
protected void doDelete(final UserInfo et, final DeleteOption<UserInfoCB> op) {
assertObjectNotNull("userInfo", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(final DeleteOption<UserInfoCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doRemove(et, op);
}
// ===================================================================================
// Batch Update
// ============
@ -1015,32 +784,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
return doBatchInsert(userInfoList, null);
}
protected int[] doBatchInsert(final List<UserInfo> ls,
final InsertOption<UserInfoCB> op) {
assertObjectNotNull("userInfoList", ls);
InsertOption<UserInfoCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<UserInfo> ls,
final InsertOption<UserInfoCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -1069,31 +812,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
return doBatchUpdate(userInfoList, null);
}
protected int[] doBatchUpdate(final List<UserInfo> ls,
final UpdateOption<UserInfoCB> op) {
assertObjectNotNull("userInfoList", ls);
UpdateOption<UserInfoCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<UserInfo> ls,
final UpdateOption<UserInfoCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1128,12 +846,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doLumpModify(ls, op);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1145,25 +857,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
return doBatchDelete(userInfoList, null);
}
protected int[] doBatchDelete(final List<UserInfo> ls,
final DeleteOption<UserInfoCB> op) {
assertObjectNotNull("userInfoList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doLumpRemove(ls, op);
}
// ===================================================================================
// Query Update
// ============
@ -1171,7 +864,7 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* userInfoBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;UserInfo, UserInfoCB&gt;() {
* public ConditionBean setup(userInfo entity, UserInfoCB intoCB) {
* public ConditionBean setup(UserInfo entity, UserInfoCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1190,7 +883,7 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1198,29 +891,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<UserInfo, UserInfoCB> sp,
final InsertOption<UserInfoCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final UserInfo et = newEntity();
final UserInfoCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected UserInfoCB createCBForQueryInsert() {
final UserInfoCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1247,21 +917,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
return doQueryUpdate(userInfo, cb, null);
}
protected int doQueryUpdate(final UserInfo et, final UserInfoCB cb,
final UpdateOption<UserInfoCB> op) {
assertObjectNotNull("userInfo", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1277,20 +932,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final UserInfoCB cb,
final DeleteOption<UserInfoCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1444,7 +1085,7 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1545,46 +1186,20 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<UserInfo> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends UserInfo> typeOfSelectedEntity() {
return UserInfo.class;
}
protected UserInfo downcast(final Entity et) {
return helpEntityDowncastInternally(et, UserInfo.class);
@Override
protected Class<UserInfo> typeOfHandlingEntity() {
return UserInfo.class;
}
protected UserInfoCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb, UserInfoCB.class);
}
@SuppressWarnings("unchecked")
protected List<UserInfo> downcast(final List<? extends Entity> ls) {
return (List<UserInfo>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<UserInfoCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<UserInfoCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<UserInfoCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<UserInfoCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<UserInfoCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<UserInfoCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<UserInfo, UserInfoCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<UserInfo, UserInfoCB>) sp;
@Override
protected Class<UserInfoCB> typeOfHandlingConditionBean() {
return UserInfoCB.class;
}
}

View file

@ -37,9 +37,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
@ -84,7 +82,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
public abstract class BsWebAuthenticationBhv extends
AbstractBehaviorWritable<WebAuthentication, WebAuthenticationCB> {
// ===================================================================================
// Definition
@ -92,21 +91,12 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "WEB_AUTHENTICATION";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public WebAuthenticationDbm getDBMeta() {
return WebAuthenticationDbm.getInstance();
}
@ -118,12 +108,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public WebAuthentication newEntity() {
return new WebAuthentication();
}
/** {@inheritDoc} */
@Override
public WebAuthenticationCB newConditionBean() {
@ -158,25 +142,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final WebAuthenticationCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final WebAuthenticationCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final WebAuthenticationCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -207,13 +172,8 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends WebAuthentication> ENTITY doSelectEntity(
final WebAuthenticationCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends WebAuthentication> OptionalEntity<ENTITY> doSelectOptionalEntity(
final WebAuthenticationCB cb, final Class<ENTITY> tp) {
final WebAuthenticationCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -242,23 +202,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected WebAuthentication facadeSelectEntityWithDeletedCheck(
final WebAuthenticationCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends WebAuthentication> ENTITY doSelectEntityWithDeletedCheck(
final WebAuthenticationCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -275,12 +218,12 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends WebAuthentication> ENTITY doSelectByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends WebAuthentication> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -329,21 +272,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<WebAuthentication> facadeSelectList(
final WebAuthenticationCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends WebAuthentication> ListResultBean<ENTITY> doSelectList(
final WebAuthenticationCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -374,22 +302,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<WebAuthentication> facadeSelectPage(
final WebAuthenticationCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends WebAuthentication> PagingResultBean<ENTITY> doSelectPage(
final WebAuthenticationCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -412,21 +324,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final WebAuthenticationCB cb,
final EntityRowHandler<WebAuthentication> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends WebAuthentication> void doSelectCursor(
final WebAuthenticationCB cb,
final EntityRowHandler<ENTITY> handler, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -450,27 +347,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<WebAuthenticationCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends WebAuthenticationCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -610,30 +486,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
doInsert(webAuthentication, null);
}
protected void doInsert(final WebAuthentication et,
final InsertOption<WebAuthenticationCB> op) {
assertObjectNotNull("webAuthentication", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(
final InsertOption<WebAuthenticationCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -660,45 +512,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
doUpdate(webAuthentication, null);
}
protected void doUpdate(final WebAuthentication et,
final UpdateOption<WebAuthenticationCB> op) {
assertObjectNotNull("webAuthentication", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(
final UpdateOption<WebAuthenticationCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected WebAuthenticationCB createCBForVaryingUpdate() {
final WebAuthenticationCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected WebAuthenticationCB createCBForSpecifiedUpdate() {
final WebAuthenticationCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
/**
* Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -722,19 +535,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
doUpdateNonstrict(webAuthentication, null);
}
protected void doUpdateNonstrict(final WebAuthentication et,
final UpdateOption<WebAuthenticationCB> op) {
assertObjectNotNull("webAuthentication", et);
prepareUpdateOption(op);
helpUpdateNonstrictInternally(et, op);
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdateNonstrict(downcast(et), downcast(op));
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -748,20 +548,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(webAuthentication, null, null);
}
protected void doInsertOrUpdate(final WebAuthentication et,
final InsertOption<WebAuthenticationCB> iop,
final UpdateOption<WebAuthenticationCB> uop) {
assertObjectNotNull("webAuthentication", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
/**
* Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@ -776,20 +562,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
doInsertOrUpdateNonstrict(webAuthentication, null, null);
}
protected void doInsertOrUpdateNonstrict(final WebAuthentication et,
final InsertOption<WebAuthenticationCB> iop,
final UpdateOption<WebAuthenticationCB> uop) {
assertObjectNotNull("webAuthentication", et);
helpInsertOrUpdateNonstrictInternally(et, iop, uop);
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop));
}
/**
* Delete the entity. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -811,26 +583,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
doDelete(webAuthentication, null);
}
protected void doDelete(final WebAuthentication et,
final DeleteOption<WebAuthenticationCB> op) {
assertObjectNotNull("webAuthentication", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(
final DeleteOption<WebAuthenticationCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
/**
* Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -849,13 +601,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
doDeleteNonstrict(webAuthentication, null);
}
protected void doDeleteNonstrict(final WebAuthentication et,
final DeleteOption<WebAuthenticationCB> op) {
assertObjectNotNull("webAuthentication", et);
prepareDeleteOption(op);
helpDeleteNonstrictInternally(et, op);
}
/**
* Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -882,12 +627,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
helpDeleteNonstrictIgnoreDeletedInternally(et, op);
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDeleteNonstrict(downcast(et), downcast(op));
}
// ===================================================================================
// Batch Update
// ============
@ -919,32 +658,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
return doBatchInsert(webAuthenticationList, null);
}
protected int[] doBatchInsert(final List<WebAuthentication> ls,
final InsertOption<WebAuthenticationCB> op) {
assertObjectNotNull("webAuthenticationList", ls);
InsertOption<WebAuthenticationCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<WebAuthentication> ls,
final InsertOption<WebAuthenticationCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -973,31 +686,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
return doBatchUpdate(webAuthenticationList, null);
}
protected int[] doBatchUpdate(final List<WebAuthentication> ls,
final UpdateOption<WebAuthenticationCB> op) {
assertObjectNotNull("webAuthenticationList", ls);
UpdateOption<WebAuthenticationCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<WebAuthentication> ls,
final UpdateOption<WebAuthenticationCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1062,19 +750,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
return doBatchUpdateNonstrict(webAuthenticationList, null);
}
protected int[] doBatchUpdateNonstrict(final List<WebAuthentication> ls,
final UpdateOption<WebAuthenticationCB> op) {
assertObjectNotNull("webAuthenticationList", ls);
UpdateOption<WebAuthenticationCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop);
return delegateBatchUpdateNonstrict(ls, rlop);
}
/**
* Batch-update the entity list non-strictly specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1109,12 +784,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdateNonstrict(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1126,19 +795,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
return doBatchDelete(webAuthenticationList, null);
}
protected int[] doBatchDelete(final List<WebAuthentication> ls,
final DeleteOption<WebAuthenticationCB> op) {
assertObjectNotNull("webAuthenticationList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list non-strictly. {NonExclusiveControl} <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1151,19 +807,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
return doBatchDeleteNonstrict(webAuthenticationList, null);
}
protected int[] doBatchDeleteNonstrict(final List<WebAuthentication> ls,
final DeleteOption<WebAuthenticationCB> op) {
assertObjectNotNull("webAuthenticationList", ls);
prepareDeleteOption(op);
return delegateBatchDeleteNonstrict(ls, op);
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDeleteNonstrict(downcast(ls), downcast(op));
}
// ===================================================================================
// Query Update
// ============
@ -1171,7 +814,7 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* webAuthenticationBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;WebAuthentication, WebAuthenticationCB&gt;() {
* public ConditionBean setup(webAuthentication entity, WebAuthenticationCB intoCB) {
* public ConditionBean setup(WebAuthentication entity, WebAuthenticationCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1190,7 +833,7 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1198,29 +841,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<WebAuthentication, WebAuthenticationCB> sp,
final InsertOption<WebAuthenticationCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final WebAuthentication et = newEntity();
final WebAuthenticationCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected WebAuthenticationCB createCBForQueryInsert() {
final WebAuthenticationCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1248,22 +868,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
return doQueryUpdate(webAuthentication, cb, null);
}
protected int doQueryUpdate(final WebAuthentication et,
final WebAuthenticationCB cb,
final UpdateOption<WebAuthenticationCB> op) {
assertObjectNotNull("webAuthentication", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1279,20 +883,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final WebAuthenticationCB cb,
final DeleteOption<WebAuthenticationCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1549,7 +1139,7 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1659,47 +1249,20 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<WebAuthentication> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends WebAuthentication> typeOfSelectedEntity() {
return WebAuthentication.class;
}
protected WebAuthentication downcast(final Entity et) {
return helpEntityDowncastInternally(et, WebAuthentication.class);
@Override
protected Class<WebAuthentication> typeOfHandlingEntity() {
return WebAuthentication.class;
}
protected WebAuthenticationCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb,
WebAuthenticationCB.class);
}
@SuppressWarnings("unchecked")
protected List<WebAuthentication> downcast(final List<? extends Entity> ls) {
return (List<WebAuthentication>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<WebAuthenticationCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<WebAuthenticationCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<WebAuthenticationCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<WebAuthenticationCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<WebAuthenticationCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<WebAuthenticationCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<WebAuthentication, WebAuthenticationCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<WebAuthentication, WebAuthenticationCB>) sp;
@Override
protected Class<WebAuthenticationCB> typeOfHandlingConditionBean() {
return WebAuthenticationCB.class;
}
}

View file

@ -38,9 +38,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
import org.seasar.dbflute.exception.EntityAlreadyExistsException;
@ -83,8 +81,9 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsWebConfigToLabelTypeMappingBhv extends
AbstractBehaviorWritable {
public abstract class BsWebConfigToLabelTypeMappingBhv
extends
AbstractBehaviorWritable<WebConfigToLabelTypeMapping, WebConfigToLabelTypeMappingCB> {
// ===================================================================================
// Definition
@ -92,21 +91,12 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "WEB_CONFIG_TO_LABEL_TYPE_MAPPING";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public WebConfigToLabelTypeMappingDbm getDBMeta() {
return WebConfigToLabelTypeMappingDbm.getInstance();
}
@ -118,12 +108,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public WebConfigToLabelTypeMapping newEntity() {
return new WebConfigToLabelTypeMapping();
}
/** {@inheritDoc} */
@Override
public WebConfigToLabelTypeMappingCB newConditionBean() {
@ -158,25 +142,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final WebConfigToLabelTypeMappingCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final WebConfigToLabelTypeMappingCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final WebConfigToLabelTypeMappingCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -209,13 +174,9 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends WebConfigToLabelTypeMapping> ENTITY doSelectEntity(
final WebConfigToLabelTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends WebConfigToLabelTypeMapping> OptionalEntity<ENTITY> doSelectOptionalEntity(
final WebConfigToLabelTypeMappingCB cb, final Class<ENTITY> tp) {
final WebConfigToLabelTypeMappingCB cb,
final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -244,23 +205,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
return facadeSelectEntityWithDeletedCheck(cb);
}
protected WebConfigToLabelTypeMapping facadeSelectEntityWithDeletedCheck(
final WebConfigToLabelTypeMappingCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends WebConfigToLabelTypeMapping> ENTITY doSelectEntityWithDeletedCheck(
final WebConfigToLabelTypeMappingCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -277,12 +221,12 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
}
protected <ENTITY extends WebConfigToLabelTypeMapping> ENTITY doSelectByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends WebConfigToLabelTypeMapping> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -332,21 +276,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
return facadeSelectList(cb);
}
protected ListResultBean<WebConfigToLabelTypeMapping> facadeSelectList(
final WebConfigToLabelTypeMappingCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends WebConfigToLabelTypeMapping> ListResultBean<ENTITY> doSelectList(
final WebConfigToLabelTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -377,22 +306,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
return facadeSelectPage(cb);
}
protected PagingResultBean<WebConfigToLabelTypeMapping> facadeSelectPage(
final WebConfigToLabelTypeMappingCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends WebConfigToLabelTypeMapping> PagingResultBean<ENTITY> doSelectPage(
final WebConfigToLabelTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -415,21 +328,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final WebConfigToLabelTypeMappingCB cb,
final EntityRowHandler<WebConfigToLabelTypeMapping> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends WebConfigToLabelTypeMapping> void doSelectCursor(
final WebConfigToLabelTypeMappingCB cb,
final EntityRowHandler<ENTITY> handler, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -453,27 +351,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<WebConfigToLabelTypeMappingCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends WebConfigToLabelTypeMappingCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -628,30 +505,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
doInsert(webConfigToLabelTypeMapping, null);
}
protected void doInsert(final WebConfigToLabelTypeMapping et,
final InsertOption<WebConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("webConfigToLabelTypeMapping", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(
final InsertOption<WebConfigToLabelTypeMappingCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -679,51 +532,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
doUpdate(webConfigToLabelTypeMapping, null);
}
protected void doUpdate(final WebConfigToLabelTypeMapping et,
final UpdateOption<WebConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("webConfigToLabelTypeMapping", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(
final UpdateOption<WebConfigToLabelTypeMappingCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected WebConfigToLabelTypeMappingCB createCBForVaryingUpdate() {
final WebConfigToLabelTypeMappingCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected WebConfigToLabelTypeMappingCB createCBForSpecifiedUpdate() {
final WebConfigToLabelTypeMappingCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doModify(et, op);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -738,27 +546,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
doInsertOrUpdate(webConfigToLabelTypeMapping, null, null);
}
protected void doInsertOrUpdate(final WebConfigToLabelTypeMapping et,
final InsertOption<WebConfigToLabelTypeMappingCB> iop,
final UpdateOption<WebConfigToLabelTypeMappingCB> uop) {
assertObjectNotNull("webConfigToLabelTypeMapping", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doCreateOrModify(et, iop, uop);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -781,32 +568,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
doDelete(webConfigToLabelTypeMapping, null);
}
protected void doDelete(final WebConfigToLabelTypeMapping et,
final DeleteOption<WebConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("webConfigToLabelTypeMapping", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(
final DeleteOption<WebConfigToLabelTypeMappingCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doRemove(et, op);
}
// ===================================================================================
// Batch Update
// ============
@ -839,33 +600,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
return doBatchInsert(webConfigToLabelTypeMappingList, null);
}
protected int[] doBatchInsert(final List<WebConfigToLabelTypeMapping> ls,
final InsertOption<WebConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("webConfigToLabelTypeMappingList", ls);
InsertOption<WebConfigToLabelTypeMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(
final List<WebConfigToLabelTypeMapping> ls,
final InsertOption<WebConfigToLabelTypeMappingCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -895,32 +629,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
return doBatchUpdate(webConfigToLabelTypeMappingList, null);
}
protected int[] doBatchUpdate(final List<WebConfigToLabelTypeMapping> ls,
final UpdateOption<WebConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("webConfigToLabelTypeMappingList", ls);
UpdateOption<WebConfigToLabelTypeMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(
final List<WebConfigToLabelTypeMapping> ls,
final UpdateOption<WebConfigToLabelTypeMappingCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -956,12 +664,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doLumpModify(ls, op);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -974,25 +676,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
return doBatchDelete(webConfigToLabelTypeMappingList, null);
}
protected int[] doBatchDelete(final List<WebConfigToLabelTypeMapping> ls,
final DeleteOption<WebConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("webConfigToLabelTypeMappingList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doLumpRemove(ls, op);
}
// ===================================================================================
// Query Update
// ============
@ -1000,7 +683,7 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* webConfigToLabelTypeMappingBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;WebConfigToLabelTypeMapping, WebConfigToLabelTypeMappingCB&gt;() {
* public ConditionBean setup(webConfigToLabelTypeMapping entity, WebConfigToLabelTypeMappingCB intoCB) {
* public ConditionBean setup(WebConfigToLabelTypeMapping entity, WebConfigToLabelTypeMappingCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1019,7 +702,7 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1027,29 +710,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<WebConfigToLabelTypeMapping, WebConfigToLabelTypeMappingCB> sp,
final InsertOption<WebConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final WebConfigToLabelTypeMapping et = newEntity();
final WebConfigToLabelTypeMappingCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected WebConfigToLabelTypeMappingCB createCBForQueryInsert() {
final WebConfigToLabelTypeMappingCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1078,22 +738,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
return doQueryUpdate(webConfigToLabelTypeMapping, cb, null);
}
protected int doQueryUpdate(final WebConfigToLabelTypeMapping et,
final WebConfigToLabelTypeMappingCB cb,
final UpdateOption<WebConfigToLabelTypeMappingCB> op) {
assertObjectNotNull("webConfigToLabelTypeMapping", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1109,20 +753,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final WebConfigToLabelTypeMappingCB cb,
final DeleteOption<WebConfigToLabelTypeMappingCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1284,7 +914,7 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1387,49 +1017,20 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
}
// ===================================================================================
// Assist Helper
// =============
protected Class<WebConfigToLabelTypeMapping> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends WebConfigToLabelTypeMapping> typeOfSelectedEntity() {
return WebConfigToLabelTypeMapping.class;
}
protected WebConfigToLabelTypeMapping downcast(final Entity et) {
return helpEntityDowncastInternally(et,
WebConfigToLabelTypeMapping.class);
@Override
protected Class<WebConfigToLabelTypeMapping> typeOfHandlingEntity() {
return WebConfigToLabelTypeMapping.class;
}
protected WebConfigToLabelTypeMappingCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb,
WebConfigToLabelTypeMappingCB.class);
}
@SuppressWarnings("unchecked")
protected List<WebConfigToLabelTypeMapping> downcast(
final List<? extends Entity> ls) {
return (List<WebConfigToLabelTypeMapping>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<WebConfigToLabelTypeMappingCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<WebConfigToLabelTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<WebConfigToLabelTypeMappingCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<WebConfigToLabelTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<WebConfigToLabelTypeMappingCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<WebConfigToLabelTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<WebConfigToLabelTypeMapping, WebConfigToLabelTypeMappingCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<WebConfigToLabelTypeMapping, WebConfigToLabelTypeMappingCB>) sp;
@Override
protected Class<WebConfigToLabelTypeMappingCB> typeOfHandlingConditionBean() {
return WebConfigToLabelTypeMappingCB.class;
}
}

View file

@ -38,9 +38,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
import org.seasar.dbflute.exception.EntityAlreadyExistsException;
@ -83,8 +81,9 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsWebConfigToRoleTypeMappingBhv extends
AbstractBehaviorWritable {
public abstract class BsWebConfigToRoleTypeMappingBhv
extends
AbstractBehaviorWritable<WebConfigToRoleTypeMapping, WebConfigToRoleTypeMappingCB> {
// ===================================================================================
// Definition
@ -92,21 +91,12 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "WEB_CONFIG_TO_ROLE_TYPE_MAPPING";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public WebConfigToRoleTypeMappingDbm getDBMeta() {
return WebConfigToRoleTypeMappingDbm.getInstance();
}
@ -118,12 +108,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public WebConfigToRoleTypeMapping newEntity() {
return new WebConfigToRoleTypeMapping();
}
/** {@inheritDoc} */
@Override
public WebConfigToRoleTypeMappingCB newConditionBean() {
@ -158,25 +142,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final WebConfigToRoleTypeMappingCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final WebConfigToRoleTypeMappingCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final WebConfigToRoleTypeMappingCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -209,13 +174,9 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends WebConfigToRoleTypeMapping> ENTITY doSelectEntity(
final WebConfigToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends WebConfigToRoleTypeMapping> OptionalEntity<ENTITY> doSelectOptionalEntity(
final WebConfigToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
final WebConfigToRoleTypeMappingCB cb,
final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -244,23 +205,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
return facadeSelectEntityWithDeletedCheck(cb);
}
protected WebConfigToRoleTypeMapping facadeSelectEntityWithDeletedCheck(
final WebConfigToRoleTypeMappingCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends WebConfigToRoleTypeMapping> ENTITY doSelectEntityWithDeletedCheck(
final WebConfigToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -277,12 +221,12 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
}
protected <ENTITY extends WebConfigToRoleTypeMapping> ENTITY doSelectByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends WebConfigToRoleTypeMapping> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -332,21 +276,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
return facadeSelectList(cb);
}
protected ListResultBean<WebConfigToRoleTypeMapping> facadeSelectList(
final WebConfigToRoleTypeMappingCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends WebConfigToRoleTypeMapping> ListResultBean<ENTITY> doSelectList(
final WebConfigToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -377,22 +306,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
return facadeSelectPage(cb);
}
protected PagingResultBean<WebConfigToRoleTypeMapping> facadeSelectPage(
final WebConfigToRoleTypeMappingCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends WebConfigToRoleTypeMapping> PagingResultBean<ENTITY> doSelectPage(
final WebConfigToRoleTypeMappingCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -415,21 +328,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final WebConfigToRoleTypeMappingCB cb,
final EntityRowHandler<WebConfigToRoleTypeMapping> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends WebConfigToRoleTypeMapping> void doSelectCursor(
final WebConfigToRoleTypeMappingCB cb,
final EntityRowHandler<ENTITY> handler, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -453,27 +351,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<WebConfigToRoleTypeMappingCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends WebConfigToRoleTypeMappingCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -627,30 +504,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
doInsert(webConfigToRoleTypeMapping, null);
}
protected void doInsert(final WebConfigToRoleTypeMapping et,
final InsertOption<WebConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("webConfigToRoleTypeMapping", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(
final InsertOption<WebConfigToRoleTypeMappingCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -678,51 +531,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
doUpdate(webConfigToRoleTypeMapping, null);
}
protected void doUpdate(final WebConfigToRoleTypeMapping et,
final UpdateOption<WebConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("webConfigToRoleTypeMapping", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(
final UpdateOption<WebConfigToRoleTypeMappingCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected WebConfigToRoleTypeMappingCB createCBForVaryingUpdate() {
final WebConfigToRoleTypeMappingCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected WebConfigToRoleTypeMappingCB createCBForSpecifiedUpdate() {
final WebConfigToRoleTypeMappingCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doModify(et, op);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -737,27 +545,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
doInsertOrUpdate(webConfigToRoleTypeMapping, null, null);
}
protected void doInsertOrUpdate(final WebConfigToRoleTypeMapping et,
final InsertOption<WebConfigToRoleTypeMappingCB> iop,
final UpdateOption<WebConfigToRoleTypeMappingCB> uop) {
assertObjectNotNull("webConfigToRoleTypeMapping", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doCreateOrModify(et, iop, uop);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -780,32 +567,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
doDelete(webConfigToRoleTypeMapping, null);
}
protected void doDelete(final WebConfigToRoleTypeMapping et,
final DeleteOption<WebConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("webConfigToRoleTypeMapping", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(
final DeleteOption<WebConfigToRoleTypeMappingCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doRemove(et, op);
}
// ===================================================================================
// Batch Update
// ============
@ -838,33 +599,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
return doBatchInsert(webConfigToRoleTypeMappingList, null);
}
protected int[] doBatchInsert(final List<WebConfigToRoleTypeMapping> ls,
final InsertOption<WebConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("webConfigToRoleTypeMappingList", ls);
InsertOption<WebConfigToRoleTypeMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(
final List<WebConfigToRoleTypeMapping> ls,
final InsertOption<WebConfigToRoleTypeMappingCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -894,32 +628,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
return doBatchUpdate(webConfigToRoleTypeMappingList, null);
}
protected int[] doBatchUpdate(final List<WebConfigToRoleTypeMapping> ls,
final UpdateOption<WebConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("webConfigToRoleTypeMappingList", ls);
UpdateOption<WebConfigToRoleTypeMappingCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(
final List<WebConfigToRoleTypeMapping> ls,
final UpdateOption<WebConfigToRoleTypeMappingCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -955,12 +663,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doLumpModify(ls, op);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -973,25 +675,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
return doBatchDelete(webConfigToRoleTypeMappingList, null);
}
protected int[] doBatchDelete(final List<WebConfigToRoleTypeMapping> ls,
final DeleteOption<WebConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("webConfigToRoleTypeMappingList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doLumpRemove(ls, op);
}
// ===================================================================================
// Query Update
// ============
@ -999,7 +682,7 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* webConfigToRoleTypeMappingBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;WebConfigToRoleTypeMapping, WebConfigToRoleTypeMappingCB&gt;() {
* public ConditionBean setup(webConfigToRoleTypeMapping entity, WebConfigToRoleTypeMappingCB intoCB) {
* public ConditionBean setup(WebConfigToRoleTypeMapping entity, WebConfigToRoleTypeMappingCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1018,7 +701,7 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1026,29 +709,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<WebConfigToRoleTypeMapping, WebConfigToRoleTypeMappingCB> sp,
final InsertOption<WebConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final WebConfigToRoleTypeMapping et = newEntity();
final WebConfigToRoleTypeMappingCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected WebConfigToRoleTypeMappingCB createCBForQueryInsert() {
final WebConfigToRoleTypeMappingCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1077,22 +737,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
return doQueryUpdate(webConfigToRoleTypeMapping, cb, null);
}
protected int doQueryUpdate(final WebConfigToRoleTypeMapping et,
final WebConfigToRoleTypeMappingCB cb,
final UpdateOption<WebConfigToRoleTypeMappingCB> op) {
assertObjectNotNull("webConfigToRoleTypeMapping", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1108,20 +752,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final WebConfigToRoleTypeMappingCB cb,
final DeleteOption<WebConfigToRoleTypeMappingCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1282,7 +912,7 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -1385,49 +1015,20 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
}
// ===================================================================================
// Assist Helper
// =============
protected Class<WebConfigToRoleTypeMapping> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends WebConfigToRoleTypeMapping> typeOfSelectedEntity() {
return WebConfigToRoleTypeMapping.class;
}
protected WebConfigToRoleTypeMapping downcast(final Entity et) {
return helpEntityDowncastInternally(et,
WebConfigToRoleTypeMapping.class);
@Override
protected Class<WebConfigToRoleTypeMapping> typeOfHandlingEntity() {
return WebConfigToRoleTypeMapping.class;
}
protected WebConfigToRoleTypeMappingCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb,
WebConfigToRoleTypeMappingCB.class);
}
@SuppressWarnings("unchecked")
protected List<WebConfigToRoleTypeMapping> downcast(
final List<? extends Entity> ls) {
return (List<WebConfigToRoleTypeMapping>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<WebConfigToRoleTypeMappingCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<WebConfigToRoleTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<WebConfigToRoleTypeMappingCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<WebConfigToRoleTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<WebConfigToRoleTypeMappingCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<WebConfigToRoleTypeMappingCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<WebConfigToRoleTypeMapping, WebConfigToRoleTypeMappingCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<WebConfigToRoleTypeMapping, WebConfigToRoleTypeMappingCB>) sp;
@Override
protected Class<WebConfigToRoleTypeMappingCB> typeOfHandlingConditionBean() {
return WebConfigToRoleTypeMappingCB.class;
}
}

View file

@ -47,9 +47,7 @@ import org.seasar.dbflute.cbean.EntityRowHandler;
import org.seasar.dbflute.cbean.ListResultBean;
import org.seasar.dbflute.cbean.PagingResultBean;
import org.seasar.dbflute.cbean.SpecifyQuery;
import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
import org.seasar.dbflute.dbmeta.DBMeta;
import org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException;
import org.seasar.dbflute.exception.DangerousResultSizeException;
import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
@ -94,7 +92,8 @@ import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
public abstract class BsWebCrawlingConfigBhv extends
AbstractBehaviorWritable<WebCrawlingConfig, WebCrawlingConfigCB> {
// ===================================================================================
// Definition
@ -102,21 +101,12 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// Table name
// ==========
/** @return The name on database of table. (NotNull) */
@Override
public String getTableDbName() {
return "WEB_CRAWLING_CONFIG";
}
// ===================================================================================
// DBMeta
// ======
/** {@inheritDoc} */
@Override
public DBMeta getDBMeta() {
public WebCrawlingConfigDbm getDBMeta() {
return WebCrawlingConfigDbm.getInstance();
}
@ -128,12 +118,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
@Override
public WebCrawlingConfig newEntity() {
return new WebCrawlingConfig();
}
/** {@inheritDoc} */
@Override
public WebCrawlingConfigCB newConditionBean() {
@ -168,25 +152,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
return facadeSelectCount(cb);
}
protected int facadeSelectCount(final WebCrawlingConfigCB cb) {
return doSelectCountUniquely(cb);
}
protected int doSelectCountUniquely(final WebCrawlingConfigCB cb) { // called by selectCount(cb)
assertCBStateValid(cb);
return delegateSelectCountUniquely(cb);
}
protected int doSelectCountPlainly(final WebCrawlingConfigCB cb) { // called by selectPage(cb)
assertCBStateValid(cb);
return delegateSelectCountPlainly(cb);
}
@Override
protected int doReadCount(final ConditionBean cb) {
return facadeSelectCount(downcast(cb));
}
// ===================================================================================
// Entity Select
// =============
@ -217,13 +182,8 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
return doSelectEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends WebCrawlingConfig> ENTITY doSelectEntity(
final WebCrawlingConfigCB cb, final Class<ENTITY> tp) {
return helpSelectEntityInternally(cb, tp);
}
protected <ENTITY extends WebCrawlingConfig> OptionalEntity<ENTITY> doSelectOptionalEntity(
final WebCrawlingConfigCB cb, final Class<ENTITY> tp) {
final WebCrawlingConfigCB cb, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
@ -252,23 +212,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
return facadeSelectEntityWithDeletedCheck(cb);
}
protected WebCrawlingConfig facadeSelectEntityWithDeletedCheck(
final WebCrawlingConfigCB cb) {
return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
}
protected <ENTITY extends WebCrawlingConfig> ENTITY doSelectEntityWithDeletedCheck(
final WebCrawlingConfigCB cb, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityType", tp);
return helpSelectEntityWithDeletedCheckInternally(cb, tp);
}
@Override
protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
return facadeSelectEntityWithDeletedCheck(downcast(cb));
}
/**
* Select the entity by the primary-key value.
* @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
@ -285,12 +228,12 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
}
protected <ENTITY extends WebCrawlingConfig> ENTITY doSelectByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(id), tp);
}
protected <ENTITY extends WebCrawlingConfig> OptionalEntity<ENTITY> doSelectOptionalByPK(
final Long id, final Class<ENTITY> tp) {
final Long id, final Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(id, tp), id);
}
@ -339,21 +282,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
return facadeSelectList(cb);
}
protected ListResultBean<WebCrawlingConfig> facadeSelectList(
final WebCrawlingConfigCB cb) {
return doSelectList(cb, typeOfSelectedEntity());
}
protected <ENTITY extends WebCrawlingConfig> ListResultBean<ENTITY> doSelectList(
final WebCrawlingConfigCB cb, final Class<ENTITY> tp) {
return helpSelectListInternally(cb, tp);
}
@Override
protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
return facadeSelectList(downcast(cb));
}
// ===================================================================================
// Page Select
// ===========
@ -384,22 +312,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
return facadeSelectPage(cb);
}
protected PagingResultBean<WebCrawlingConfig> facadeSelectPage(
final WebCrawlingConfigCB cb) {
return doSelectPage(cb, typeOfSelectedEntity());
}
protected <ENTITY extends WebCrawlingConfig> PagingResultBean<ENTITY> doSelectPage(
final WebCrawlingConfigCB cb, final Class<ENTITY> tp) {
return helpSelectPageInternally(cb, tp);
}
@Override
protected PagingResultBean<? extends Entity> doReadPage(
final ConditionBean cb) {
return facadeSelectPage(downcast(cb));
}
// ===================================================================================
// Cursor Select
// =============
@ -422,21 +334,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
facadeSelectCursor(cb, entityRowHandler);
}
protected void facadeSelectCursor(final WebCrawlingConfigCB cb,
final EntityRowHandler<WebCrawlingConfig> entityRowHandler) {
doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
}
protected <ENTITY extends WebCrawlingConfig> void doSelectCursor(
final WebCrawlingConfigCB cb,
final EntityRowHandler<ENTITY> handler, final Class<ENTITY> tp) {
assertCBStateValid(cb);
assertObjectNotNull("entityRowHandler", handler);
assertObjectNotNull("entityType", tp);
assertSpecifyDerivedReferrerEntityProperty(cb, tp);
helpSelectCursorInternally(cb, handler, tp);
}
// ===================================================================================
// Scalar Select
// =============
@ -460,27 +357,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
return facadeScalarSelect(resultType);
}
protected <RESULT> HpSLSFunction<WebCrawlingConfigCB, RESULT> facadeScalarSelect(
final Class<RESULT> resultType) {
return doScalarSelect(resultType, newConditionBean());
}
protected <RESULT, CB extends WebCrawlingConfigCB> HpSLSFunction<CB, RESULT> doScalarSelect(
final Class<RESULT> tp, final CB cb) {
assertObjectNotNull("resultType", tp);
assertCBStateValid(cb);
cb.xsetupForScalarSelect();
cb.getSqlClause().disableSelectIndex(); // for when you use union
final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
return createSLSFunction(cb, tp, executor);
}
@Override
protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
final Class<RESULT> tp) {
return facadeScalarSelect(tp);
}
// ===================================================================================
// Sequence
// ========
@ -657,7 +533,7 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param webCrawlingConfigList The entity list of webCrawlingConfig. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -770,7 +646,7 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param webCrawlingConfigList The entity list of webCrawlingConfig. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -883,7 +759,7 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param webCrawlingConfigList The entity list of webCrawlingConfig. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -996,7 +872,7 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
}
/**
* {Refer to overload method that has an argument of condition-bean setupper.} #beforejava8
* {Refer to overload method that has an argument of condition-bean set-upper} #beforejava8
* @param webCrawlingConfigList The entity list of webCrawlingConfig. (NotNull)
* @param loadReferrerOption The option of load-referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
@ -1060,30 +936,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
doInsert(webCrawlingConfig, null);
}
protected void doInsert(final WebCrawlingConfig et,
final InsertOption<WebCrawlingConfigCB> op) {
assertObjectNotNull("webCrawlingConfig", et);
prepareInsertOption(op);
delegateInsert(et, op);
}
protected void prepareInsertOption(
final InsertOption<WebCrawlingConfigCB> op) {
if (op == null) {
return;
}
assertInsertOptionStatus(op);
if (op.hasSpecifiedInsertColumn()) {
op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
}
}
@Override
protected void doCreate(final Entity et,
final InsertOption<? extends ConditionBean> op) {
doInsert(downcast(et), downcast(op));
}
/**
* Update the entity modified-only. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -1110,45 +962,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
doUpdate(webCrawlingConfig, null);
}
protected void doUpdate(final WebCrawlingConfig et,
final UpdateOption<WebCrawlingConfigCB> op) {
assertObjectNotNull("webCrawlingConfig", et);
prepareUpdateOption(op);
helpUpdateInternally(et, op);
}
protected void prepareUpdateOption(
final UpdateOption<WebCrawlingConfigCB> op) {
if (op == null) {
return;
}
assertUpdateOptionStatus(op);
if (op.hasSelfSpecification()) {
op.resolveSelfSpecification(createCBForVaryingUpdate());
}
if (op.hasSpecifiedUpdateColumn()) {
op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
}
}
protected WebCrawlingConfigCB createCBForVaryingUpdate() {
final WebCrawlingConfigCB cb = newConditionBean();
cb.xsetupForVaryingUpdate();
return cb;
}
protected WebCrawlingConfigCB createCBForSpecifiedUpdate() {
final WebCrawlingConfigCB cb = newConditionBean();
cb.xsetupForSpecifiedUpdate();
return cb;
}
@Override
protected void doModify(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdate(downcast(et), downcast(op));
}
/**
* Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
* <pre>
@ -1172,19 +985,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
doUpdateNonstrict(webCrawlingConfig, null);
}
protected void doUpdateNonstrict(final WebCrawlingConfig et,
final UpdateOption<WebCrawlingConfigCB> op) {
assertObjectNotNull("webCrawlingConfig", et);
prepareUpdateOption(op);
helpUpdateNonstrictInternally(et, op);
}
@Override
protected void doModifyNonstrict(final Entity et,
final UpdateOption<? extends ConditionBean> op) {
doUpdateNonstrict(downcast(et), downcast(op));
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
@ -1198,20 +998,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
doInsertOrUpdate(webCrawlingConfig, null, null);
}
protected void doInsertOrUpdate(final WebCrawlingConfig et,
final InsertOption<WebCrawlingConfigCB> iop,
final UpdateOption<WebCrawlingConfigCB> uop) {
assertObjectNotNull("webCrawlingConfig", et);
helpInsertOrUpdateInternally(et, iop, uop);
}
@Override
protected void doCreateOrModify(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
}
/**
* Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@ -1226,20 +1012,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
doInsertOrUpdateNonstrict(webCrawlingConfig, null, null);
}
protected void doInsertOrUpdateNonstrict(final WebCrawlingConfig et,
final InsertOption<WebCrawlingConfigCB> iop,
final UpdateOption<WebCrawlingConfigCB> uop) {
assertObjectNotNull("webCrawlingConfig", et);
helpInsertOrUpdateNonstrictInternally(et, iop, uop);
}
@Override
protected void doCreateOrModifyNonstrict(final Entity et,
final InsertOption<? extends ConditionBean> iop,
final UpdateOption<? extends ConditionBean> uop) {
doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop));
}
/**
* Delete the entity. (ZeroUpdateException, ExclusiveControl)
* <pre>
@ -1261,26 +1033,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
doDelete(webCrawlingConfig, null);
}
protected void doDelete(final WebCrawlingConfig et,
final DeleteOption<WebCrawlingConfigCB> op) {
assertObjectNotNull("webCrawlingConfig", et);
prepareDeleteOption(op);
helpDeleteInternally(et, op);
}
protected void prepareDeleteOption(
final DeleteOption<WebCrawlingConfigCB> op) {
if (op != null) {
assertDeleteOptionStatus(op);
}
}
@Override
protected void doRemove(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDelete(downcast(et), downcast(op));
}
/**
* Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -1299,13 +1051,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
doDeleteNonstrict(webCrawlingConfig, null);
}
protected void doDeleteNonstrict(final WebCrawlingConfig et,
final DeleteOption<WebCrawlingConfigCB> op) {
assertObjectNotNull("webCrawlingConfig", et);
prepareDeleteOption(op);
helpDeleteNonstrictInternally(et, op);
}
/**
* Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
* <pre>
@ -1332,12 +1077,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
helpDeleteNonstrictIgnoreDeletedInternally(et, op);
}
@Override
protected void doRemoveNonstrict(final Entity et,
final DeleteOption<? extends ConditionBean> op) {
doDeleteNonstrict(downcast(et), downcast(op));
}
// ===================================================================================
// Batch Update
// ============
@ -1369,32 +1108,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
return doBatchInsert(webCrawlingConfigList, null);
}
protected int[] doBatchInsert(final List<WebCrawlingConfig> ls,
final InsertOption<WebCrawlingConfigCB> op) {
assertObjectNotNull("webCrawlingConfigList", ls);
InsertOption<WebCrawlingConfigCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainInsertOption();
}
prepareBatchInsertOption(ls, rlop); // required
return delegateBatchInsert(ls, rlop);
}
protected void prepareBatchInsertOption(final List<WebCrawlingConfig> ls,
final InsertOption<WebCrawlingConfigCB> op) {
op.xallowInsertColumnModifiedPropertiesFragmented();
op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
prepareInsertOption(op);
}
@Override
protected int[] doLumpCreate(final List<Entity> ls,
final InsertOption<? extends ConditionBean> op) {
return doBatchInsert(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement. <br />
@ -1423,31 +1136,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
return doBatchUpdate(webCrawlingConfigList, null);
}
protected int[] doBatchUpdate(final List<WebCrawlingConfig> ls,
final UpdateOption<WebCrawlingConfigCB> op) {
assertObjectNotNull("webCrawlingConfigList", ls);
UpdateOption<WebCrawlingConfigCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop); // required
return delegateBatchUpdate(ls, rlop);
}
protected void prepareBatchUpdateOption(final List<WebCrawlingConfig> ls,
final UpdateOption<WebCrawlingConfigCB> op) {
op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
prepareUpdateOption(op);
}
@Override
protected int[] doLumpModify(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdate(downcast(ls), downcast(op));
}
/**
* Batch-update the entity list specified-only. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1512,19 +1200,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
return doBatchUpdateNonstrict(webCrawlingConfigList, null);
}
protected int[] doBatchUpdateNonstrict(final List<WebCrawlingConfig> ls,
final UpdateOption<WebCrawlingConfigCB> op) {
assertObjectNotNull("webCrawlingConfigList", ls);
UpdateOption<WebCrawlingConfigCB> rlop;
if (op != null) {
rlop = op;
} else {
rlop = createPlainUpdateOption();
}
prepareBatchUpdateOption(ls, rlop);
return delegateBatchUpdateNonstrict(ls, rlop);
}
/**
* Batch-update the entity list non-strictly specified-only. (NonExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1559,12 +1234,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
createSpecifiedUpdateOption(updateColumnSpec));
}
@Override
protected int[] doLumpModifyNonstrict(final List<Entity> ls,
final UpdateOption<? extends ConditionBean> op) {
return doBatchUpdateNonstrict(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list. (ExclusiveControl) <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1576,19 +1245,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
return doBatchDelete(webCrawlingConfigList, null);
}
protected int[] doBatchDelete(final List<WebCrawlingConfig> ls,
final DeleteOption<WebCrawlingConfigCB> op) {
assertObjectNotNull("webCrawlingConfigList", ls);
prepareDeleteOption(op);
return delegateBatchDelete(ls, op);
}
@Override
protected int[] doLumpRemove(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDelete(downcast(ls), downcast(op));
}
/**
* Batch-delete the entity list non-strictly. {NonExclusiveControl} <br />
* This method uses executeBatch() of java.sql.PreparedStatement.
@ -1601,19 +1257,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
return doBatchDeleteNonstrict(webCrawlingConfigList, null);
}
protected int[] doBatchDeleteNonstrict(final List<WebCrawlingConfig> ls,
final DeleteOption<WebCrawlingConfigCB> op) {
assertObjectNotNull("webCrawlingConfigList", ls);
prepareDeleteOption(op);
return delegateBatchDeleteNonstrict(ls, op);
}
@Override
protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
final DeleteOption<? extends ConditionBean> op) {
return doBatchDeleteNonstrict(downcast(ls), downcast(op));
}
// ===================================================================================
// Query Update
// ============
@ -1621,7 +1264,7 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* webCrawlingConfigBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;WebCrawlingConfig, WebCrawlingConfigCB&gt;() {
* public ConditionBean setup(webCrawlingConfig entity, WebCrawlingConfigCB intoCB) {
* public ConditionBean setup(WebCrawlingConfig entity, WebCrawlingConfigCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
@ -1640,7 +1283,7 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
* }
* });
* </pre>
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(
@ -1648,29 +1291,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
return doQueryInsert(setupper, null);
}
protected int doQueryInsert(
final QueryInsertSetupper<WebCrawlingConfig, WebCrawlingConfigCB> sp,
final InsertOption<WebCrawlingConfigCB> op) {
assertObjectNotNull("setupper", sp);
prepareInsertOption(op);
final WebCrawlingConfig et = newEntity();
final WebCrawlingConfigCB cb = createCBForQueryInsert();
return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
}
protected WebCrawlingConfigCB createCBForQueryInsert() {
final WebCrawlingConfigCB cb = newConditionBean();
cb.xsetupForQueryInsert();
return cb;
}
@Override
protected int doRangeCreate(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
final InsertOption<? extends ConditionBean> op) {
return doQueryInsert(downcast(setupper), downcast(op));
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
@ -1698,22 +1318,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
return doQueryUpdate(webCrawlingConfig, cb, null);
}
protected int doQueryUpdate(final WebCrawlingConfig et,
final WebCrawlingConfigCB cb,
final UpdateOption<WebCrawlingConfigCB> op) {
assertObjectNotNull("webCrawlingConfig", et);
assertCBStateValid(cb);
prepareUpdateOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
cb, op) : 0;
}
@Override
protected int doRangeModify(final Entity et, final ConditionBean cb,
final UpdateOption<? extends ConditionBean> op) {
return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
@ -1729,20 +1333,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
return doQueryDelete(cb, null);
}
protected int doQueryDelete(final WebCrawlingConfigCB cb,
final DeleteOption<WebCrawlingConfigCB> op) {
assertCBStateValid(cb);
prepareDeleteOption(op);
return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
op) : 0;
}
@Override
protected int doRangeRemove(final ConditionBean cb,
final DeleteOption<? extends ConditionBean> op) {
return doQueryDelete(downcast(cb), downcast(op));
}
// ===================================================================================
// Varying Update
// ==============
@ -1999,7 +1589,7 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
* Insert the several entities by query with varying requests (modified-only for fixed value). <br />
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
* Other specifications are same as queryInsert(entity, setupper).
* @param setupper The setup-per of query-insert. (NotNull)
* @param setupper The set-upper of query-insert. (NotNull)
* @param option The option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
@ -2109,47 +1699,20 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
}
// ===================================================================================
// Assist Helper
// =============
protected Class<WebCrawlingConfig> typeOfSelectedEntity() {
// Type Helper
// ===========
@Override
protected Class<? extends WebCrawlingConfig> typeOfSelectedEntity() {
return WebCrawlingConfig.class;
}
protected WebCrawlingConfig downcast(final Entity et) {
return helpEntityDowncastInternally(et, WebCrawlingConfig.class);
@Override
protected Class<WebCrawlingConfig> typeOfHandlingEntity() {
return WebCrawlingConfig.class;
}
protected WebCrawlingConfigCB downcast(final ConditionBean cb) {
return helpConditionBeanDowncastInternally(cb,
WebCrawlingConfigCB.class);
}
@SuppressWarnings("unchecked")
protected List<WebCrawlingConfig> downcast(final List<? extends Entity> ls) {
return (List<WebCrawlingConfig>) ls;
}
@SuppressWarnings("unchecked")
protected InsertOption<WebCrawlingConfigCB> downcast(
final InsertOption<? extends ConditionBean> op) {
return (InsertOption<WebCrawlingConfigCB>) op;
}
@SuppressWarnings("unchecked")
protected UpdateOption<WebCrawlingConfigCB> downcast(
final UpdateOption<? extends ConditionBean> op) {
return (UpdateOption<WebCrawlingConfigCB>) op;
}
@SuppressWarnings("unchecked")
protected DeleteOption<WebCrawlingConfigCB> downcast(
final DeleteOption<? extends ConditionBean> op) {
return (DeleteOption<WebCrawlingConfigCB>) op;
}
@SuppressWarnings("unchecked")
protected QueryInsertSetupper<WebCrawlingConfig, WebCrawlingConfigCB> downcast(
final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
return (QueryInsertSetupper<WebCrawlingConfig, WebCrawlingConfigCB>) sp;
@Override
protected Class<WebCrawlingConfigCB> typeOfHandlingConditionBean() {
return WebCrawlingConfigCB.class;
}
}

View file

@ -0,0 +1,102 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.db.bsbhv.loader;
import java.util.List;
import jp.sf.fess.db.exbhv.BoostDocumentRuleBhv;
import jp.sf.fess.db.exentity.BoostDocumentRule;
import org.seasar.dbflute.BehaviorSelector;
/**
* The referrer loader of BOOST_DOCUMENT_RULE as TABLE. <br />
* <pre>
* [primary key]
* ID
*
* [column]
* ID, URL_EXPR, BOOST_EXPR, SORT_ORDER, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETED_BY, DELETED_TIME, VERSION_NO
*
* [sequence]
*
*
* [identity]
* ID
*
* [version-no]
* VERSION_NO
*
* [foreign table]
*
*
* [referrer table]
*
*
* [foreign property]
*
*
* [referrer property]
*
* </pre>
* @author DBFlute(AutoGenerator)
*/
public class LoaderOfBoostDocumentRule {
// ===================================================================================
// Attribute
// =========
protected List<BoostDocumentRule> _selectedList;
protected BehaviorSelector _selector;
protected BoostDocumentRuleBhv _myBhv; // lazy-loaded
// ===================================================================================
// Ready for Loading
// =================
public LoaderOfBoostDocumentRule ready(
final List<BoostDocumentRule> selectedList,
final BehaviorSelector selector) {
_selectedList = selectedList;
_selector = selector;
return this;
}
protected BoostDocumentRuleBhv myBhv() {
if (_myBhv != null) {
return _myBhv;
} else {
_myBhv = _selector.select(BoostDocumentRuleBhv.class);
return _myBhv;
}
}
// ===================================================================================
// Pull out Foreign
// ================
// ===================================================================================
// Accessor
// ========
public List<BoostDocumentRule> getSelectedList() {
return _selectedList;
}
public BehaviorSelector getSelector() {
return _selector;
}
}

View file

@ -0,0 +1,102 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.db.bsbhv.loader;
import java.util.List;
import jp.sf.fess.db.exbhv.SuggestBadWordBhv;
import jp.sf.fess.db.exentity.SuggestBadWord;
import org.seasar.dbflute.BehaviorSelector;
/**
* The referrer loader of SUGGEST_BAD_WORD as TABLE. <br />
* <pre>
* [primary key]
* ID
*
* [column]
* ID, SUGGEST_WORD, TARGET_ROLE, TARGET_LABEL, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETED_BY, DELETED_TIME, VERSION_NO
*
* [sequence]
*
*
* [identity]
* ID
*
* [version-no]
* VERSION_NO
*
* [foreign table]
*
*
* [referrer table]
*
*
* [foreign property]
*
*
* [referrer property]
*
* </pre>
* @author DBFlute(AutoGenerator)
*/
public class LoaderOfSuggestBadWord {
// ===================================================================================
// Attribute
// =========
protected List<SuggestBadWord> _selectedList;
protected BehaviorSelector _selector;
protected SuggestBadWordBhv _myBhv; // lazy-loaded
// ===================================================================================
// Ready for Loading
// =================
public LoaderOfSuggestBadWord ready(
final List<SuggestBadWord> selectedList,
final BehaviorSelector selector) {
_selectedList = selectedList;
_selector = selector;
return this;
}
protected SuggestBadWordBhv myBhv() {
if (_myBhv != null) {
return _myBhv;
} else {
_myBhv = _selector.select(SuggestBadWordBhv.class);
return _myBhv;
}
}
// ===================================================================================
// Pull out Foreign
// ================
// ===================================================================================
// Accessor
// ========
public List<SuggestBadWord> getSelectedList() {
return _selectedList;
}
public BehaviorSelector getSelector() {
return _selector;
}
}

View file

@ -0,0 +1,102 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.db.bsbhv.loader;
import java.util.List;
import jp.sf.fess.db.exbhv.SuggestElevateWordBhv;
import jp.sf.fess.db.exentity.SuggestElevateWord;
import org.seasar.dbflute.BehaviorSelector;
/**
* The referrer loader of SUGGEST_ELEVATE_WORD as TABLE. <br />
* <pre>
* [primary key]
* ID
*
* [column]
* ID, SUGGEST_WORD, READING, TARGET_ROLE, TARGET_LABEL, BOOST, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETED_BY, DELETED_TIME, VERSION_NO
*
* [sequence]
*
*
* [identity]
* ID
*
* [version-no]
* VERSION_NO
*
* [foreign table]
*
*
* [referrer table]
*
*
* [foreign property]
*
*
* [referrer property]
*
* </pre>
* @author DBFlute(AutoGenerator)
*/
public class LoaderOfSuggestElevateWord {
// ===================================================================================
// Attribute
// =========
protected List<SuggestElevateWord> _selectedList;
protected BehaviorSelector _selector;
protected SuggestElevateWordBhv _myBhv; // lazy-loaded
// ===================================================================================
// Ready for Loading
// =================
public LoaderOfSuggestElevateWord ready(
final List<SuggestElevateWord> selectedList,
final BehaviorSelector selector) {
_selectedList = selectedList;
_selector = selector;
return this;
}
protected SuggestElevateWordBhv myBhv() {
if (_myBhv != null) {
return _myBhv;
} else {
_myBhv = _selector.select(SuggestElevateWordBhv.class);
return _myBhv;
}
}
// ===================================================================================
// Pull out Foreign
// ================
// ===================================================================================
// Accessor
// ========
public List<SuggestElevateWord> getSelectedList() {
return _selectedList;
}
public BehaviorSelector getSelector() {
return _selector;
}
}

View file

@ -175,7 +175,7 @@ public class BsClickUrlRankingPmb extends SimplePagingBean implements
// ========
/**
* [get] fromRequestedTime <br />
* @return The value of fromRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of fromRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getFromRequestedTime() {
return _fromRequestedTime;
@ -191,7 +191,7 @@ public class BsClickUrlRankingPmb extends SimplePagingBean implements
/**
* [get] toRequestedTime <br />
* @return The value of toRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of toRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getToRequestedTime() {
return _toRequestedTime;

View file

@ -175,7 +175,7 @@ public class BsClientIpRankingPmb extends SimplePagingBean implements
// ========
/**
* [get] fromRequestedTime <br />
* @return The value of fromRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of fromRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getFromRequestedTime() {
return _fromRequestedTime;
@ -191,7 +191,7 @@ public class BsClientIpRankingPmb extends SimplePagingBean implements
/**
* [get] toRequestedTime <br />
* @return The value of toRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of toRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getToRequestedTime() {
return _toRequestedTime;

View file

@ -171,7 +171,7 @@ public class BsFavoriteUrlCountPmb extends SimplePagingBean implements
// ========
/**
* [get] url <br />
* @return The value of url. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of url. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public String getUrl() {
return filterStringParameter(_url);

View file

@ -175,7 +175,7 @@ public class BsFavoriteUrlRankingPmb extends SimplePagingBean implements
// ========
/**
* [get] fromCreatedTime <br />
* @return The value of fromCreatedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of fromCreatedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getFromCreatedTime() {
return _fromCreatedTime;
@ -191,7 +191,7 @@ public class BsFavoriteUrlRankingPmb extends SimplePagingBean implements
/**
* [get] toCreatedTime <br />
* @return The value of toCreatedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of toCreatedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getToCreatedTime() {
return _toCreatedTime;

View file

@ -175,7 +175,7 @@ public class BsHotSearchWordPmb extends SimplePagingBean implements
// ========
/**
* [get] fromRequestedTime <br />
* @return The value of fromRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of fromRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getFromRequestedTime() {
return _fromRequestedTime;
@ -191,7 +191,7 @@ public class BsHotSearchWordPmb extends SimplePagingBean implements
/**
* [get] toRequestedTime <br />
* @return The value of toRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of toRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getToRequestedTime() {
return _toRequestedTime;

View file

@ -175,7 +175,7 @@ public class BsRefererRankingPmb extends SimplePagingBean implements
// ========
/**
* [get] fromRequestedTime <br />
* @return The value of fromRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of fromRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getFromRequestedTime() {
return _fromRequestedTime;
@ -191,7 +191,7 @@ public class BsRefererRankingPmb extends SimplePagingBean implements
/**
* [get] toRequestedTime <br />
* @return The value of toRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of toRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getToRequestedTime() {
return _toRequestedTime;

View file

@ -179,7 +179,7 @@ public class BsSearchFieldRankingPmb extends SimplePagingBean implements
// ========
/**
* [get] searchFieldName <br />
* @return The value of searchFieldName. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of searchFieldName. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public String getSearchFieldName() {
return filterStringParameter(_searchFieldName);
@ -195,7 +195,7 @@ public class BsSearchFieldRankingPmb extends SimplePagingBean implements
/**
* [get] fromRequestedTime <br />
* @return The value of fromRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of fromRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getFromRequestedTime() {
return _fromRequestedTime;
@ -211,7 +211,7 @@ public class BsSearchFieldRankingPmb extends SimplePagingBean implements
/**
* [get] toRequestedTime <br />
* @return The value of toRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of toRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getToRequestedTime() {
return _toRequestedTime;

View file

@ -175,7 +175,7 @@ public class BsSearchQueryRankingPmb extends SimplePagingBean implements
// ========
/**
* [get] fromRequestedTime <br />
* @return The value of fromRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of fromRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getFromRequestedTime() {
return _fromRequestedTime;
@ -191,7 +191,7 @@ public class BsSearchQueryRankingPmb extends SimplePagingBean implements
/**
* [get] toRequestedTime <br />
* @return The value of toRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of toRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getToRequestedTime() {
return _toRequestedTime;

View file

@ -175,7 +175,7 @@ public class BsSearchWordRankingPmb extends SimplePagingBean implements
// ========
/**
* [get] fromRequestedTime <br />
* @return The value of fromRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of fromRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getFromRequestedTime() {
return _fromRequestedTime;
@ -191,7 +191,7 @@ public class BsSearchWordRankingPmb extends SimplePagingBean implements
/**
* [get] toRequestedTime <br />
* @return The value of toRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of toRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getToRequestedTime() {
return _toRequestedTime;

View file

@ -175,7 +175,7 @@ public class BsSolrQueryRankingPmb extends SimplePagingBean implements
// ========
/**
* [get] fromRequestedTime <br />
* @return The value of fromRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of fromRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getFromRequestedTime() {
return _fromRequestedTime;
@ -191,7 +191,7 @@ public class BsSolrQueryRankingPmb extends SimplePagingBean implements
/**
* [get] toRequestedTime <br />
* @return The value of toRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of toRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getToRequestedTime() {
return _toRequestedTime;

View file

@ -175,7 +175,7 @@ public class BsUserAgentRankingPmb extends SimplePagingBean implements
// ========
/**
* [get] fromRequestedTime <br />
* @return The value of fromRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of fromRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getFromRequestedTime() {
return _fromRequestedTime;
@ -191,7 +191,7 @@ public class BsUserAgentRankingPmb extends SimplePagingBean implements
/**
* [get] toRequestedTime <br />
* @return The value of toRequestedTime. (Nullable, NotEmptyString(when String): if empty string, returns null)
* @return The value of toRequestedTime. (NullAllowed, NotEmptyString(when String): if empty string, returns null)
*/
public java.sql.Timestamp getToRequestedTime() {
return _toRequestedTime;

View file

@ -0,0 +1,580 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.db.bsentity;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import jp.sf.fess.db.allcommon.DBMetaInstanceHandler;
import jp.sf.fess.db.exentity.BoostDocumentRule;
import org.seasar.dbflute.Entity;
import org.seasar.dbflute.dbmeta.DBMeta;
/**
* The entity of BOOST_DOCUMENT_RULE as TABLE. <br />
* <pre>
* [primary-key]
* ID
*
* [column]
* ID, URL_EXPR, BOOST_EXPR, SORT_ORDER, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETED_BY, DELETED_TIME, VERSION_NO
*
* [sequence]
*
*
* [identity]
* ID
*
* [version-no]
* VERSION_NO
*
* [foreign table]
*
*
* [referrer table]
*
*
* [foreign property]
*
*
* [referrer property]
*
*
* [get/set template]
* /= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
* Long id = entity.getId();
* String urlExpr = entity.getUrlExpr();
* String boostExpr = entity.getBoostExpr();
* Integer sortOrder = entity.getSortOrder();
* String createdBy = entity.getCreatedBy();
* java.sql.Timestamp createdTime = entity.getCreatedTime();
* String updatedBy = entity.getUpdatedBy();
* java.sql.Timestamp updatedTime = entity.getUpdatedTime();
* String deletedBy = entity.getDeletedBy();
* java.sql.Timestamp deletedTime = entity.getDeletedTime();
* Integer versionNo = entity.getVersionNo();
* entity.setId(id);
* entity.setUrlExpr(urlExpr);
* entity.setBoostExpr(boostExpr);
* entity.setSortOrder(sortOrder);
* entity.setCreatedBy(createdBy);
* entity.setCreatedTime(createdTime);
* entity.setUpdatedBy(updatedBy);
* entity.setUpdatedTime(updatedTime);
* entity.setDeletedBy(deletedBy);
* entity.setDeletedTime(deletedTime);
* entity.setVersionNo(versionNo);
* = = = = = = = = = =/
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsBoostDocumentRule implements Entity, Serializable,
Cloneable {
// ===================================================================================
// Definition
// ==========
/** Serial version UID. (Default) */
private static final long serialVersionUID = 1L;
// ===================================================================================
// Attribute
// =========
// -----------------------------------------------------
// Column
// ------
/** ID: {PK, ID, NotNull, BIGINT(19)} */
protected Long _id;
/** URL_EXPR: {NotNull, VARCHAR(4000)} */
protected String _urlExpr;
/** BOOST_EXPR: {NotNull, VARCHAR(4000)} */
protected String _boostExpr;
/** SORT_ORDER: {NotNull, INTEGER(10)} */
protected Integer _sortOrder;
/** CREATED_BY: {NotNull, VARCHAR(255)} */
protected String _createdBy;
/** CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} */
protected java.sql.Timestamp _createdTime;
/** UPDATED_BY: {VARCHAR(255)} */
protected String _updatedBy;
/** UPDATED_TIME: {TIMESTAMP(23, 10)} */
protected java.sql.Timestamp _updatedTime;
/** DELETED_BY: {VARCHAR(255)} */
protected String _deletedBy;
/** DELETED_TIME: {TIMESTAMP(23, 10)} */
protected java.sql.Timestamp _deletedTime;
/** VERSION_NO: {NotNull, INTEGER(10)} */
protected Integer _versionNo;
// -----------------------------------------------------
// Internal
// --------
/** The unique-driven properties for this entity. (NotNull) */
protected final EntityUniqueDrivenProperties __uniqueDrivenProperties = newUniqueDrivenProperties();
/** The modified properties for this entity. (NotNull) */
protected final EntityModifiedProperties __modifiedProperties = newModifiedProperties();
/** Is the entity created by DBFlute select process? */
protected boolean __createdBySelect;
// ===================================================================================
// Table Name
// ==========
/**
* {@inheritDoc}
*/
@Override
public String getTableDbName() {
return "BOOST_DOCUMENT_RULE";
}
/**
* {@inheritDoc}
*/
@Override
public String getTablePropertyName() { // according to Java Beans rule
return "boostDocumentRule";
}
// ===================================================================================
// DBMeta
// ======
/**
* {@inheritDoc}
*/
@Override
public DBMeta getDBMeta() {
return DBMetaInstanceHandler.findDBMeta(getTableDbName());
}
// ===================================================================================
// Primary Key
// ===========
/**
* {@inheritDoc}
*/
@Override
public boolean hasPrimaryKeyValue() {
if (getId() == null) {
return false;
}
return true;
}
/**
* {@inheritDoc}
*/
@Override
public Set<String> myuniqueDrivenProperties() {
return __uniqueDrivenProperties.getPropertyNames();
}
protected EntityUniqueDrivenProperties newUniqueDrivenProperties() {
return new EntityUniqueDrivenProperties();
}
// ===================================================================================
// Foreign Property
// ================
// ===================================================================================
// Referrer Property
// =================
protected <ELEMENT> List<ELEMENT> newReferrerList() {
return new ArrayList<ELEMENT>();
}
// ===================================================================================
// Modified Properties
// ===================
/**
* {@inheritDoc}
*/
@Override
public Set<String> modifiedProperties() {
return __modifiedProperties.getPropertyNames();
}
/**
* {@inheritDoc}
*/
@Override
public void clearModifiedInfo() {
__modifiedProperties.clear();
}
/**
* {@inheritDoc}
*/
@Override
public boolean hasModification() {
return !__modifiedProperties.isEmpty();
}
protected EntityModifiedProperties newModifiedProperties() {
return new EntityModifiedProperties();
}
// ===================================================================================
// Birthplace Mark
// ===============
/**
* {@inheritDoc}
*/
@Override
public void markAsSelect() {
__createdBySelect = true;
}
/**
* {@inheritDoc}
*/
@Override
public boolean createdBySelect() {
return __createdBySelect;
}
// ===================================================================================
// Basic Override
// ==============
/**
* Determine the object is equal with this. <br />
* If primary-keys or columns of the other are same as this one, returns true.
* @param obj The object as other entity. (NullAllowed: if null, returns false fixedly)
* @return Comparing result.
*/
@Override
public boolean equals(final Object obj) {
if (obj == null || !(obj instanceof BsBoostDocumentRule)) {
return false;
}
final BsBoostDocumentRule other = (BsBoostDocumentRule) obj;
if (!xSV(getId(), other.getId())) {
return false;
}
return true;
}
protected boolean xSV(final Object v1, final Object v2) {
return FunCustodial.isSameValue(v1, v2);
}
/**
* Calculate the hash-code from primary-keys or columns.
* @return The hash-code from primary-key or columns.
*/
@Override
public int hashCode() {
int hs = 17;
hs = xCH(hs, getTableDbName());
hs = xCH(hs, getId());
return hs;
}
protected int xCH(final int hs, final Object vl) {
return FunCustodial.calculateHashcode(hs, vl);
}
/**
* {@inheritDoc}
*/
@Override
public int instanceHash() {
return super.hashCode();
}
/**
* Convert to display string of entity's data. (no relation data)
* @return The display string of all columns and relation existences. (NotNull)
*/
@Override
public String toString() {
return buildDisplayString(FunCustodial.toClassTitle(this), true, true);
}
/**
* {@inheritDoc}
*/
@Override
public String toStringWithRelation() {
final StringBuilder sb = new StringBuilder();
sb.append(toString());
return sb.toString();
}
/**
* {@inheritDoc}
*/
@Override
public String buildDisplayString(final String name, final boolean column,
final boolean relation) {
final StringBuilder sb = new StringBuilder();
if (name != null) {
sb.append(name).append(column || relation ? ":" : "");
}
if (column) {
sb.append(buildColumnString());
}
if (relation) {
sb.append(buildRelationString());
}
sb.append("@").append(Integer.toHexString(hashCode()));
return sb.toString();
}
protected String buildColumnString() {
final StringBuilder sb = new StringBuilder();
final String dm = ", ";
sb.append(dm).append(getId());
sb.append(dm).append(getUrlExpr());
sb.append(dm).append(getBoostExpr());
sb.append(dm).append(getSortOrder());
sb.append(dm).append(getCreatedBy());
sb.append(dm).append(getCreatedTime());
sb.append(dm).append(getUpdatedBy());
sb.append(dm).append(getUpdatedTime());
sb.append(dm).append(getDeletedBy());
sb.append(dm).append(getDeletedTime());
sb.append(dm).append(getVersionNo());
if (sb.length() > dm.length()) {
sb.delete(0, dm.length());
}
sb.insert(0, "{").append("}");
return sb.toString();
}
protected String buildRelationString() {
return "";
}
/**
* Clone entity instance using super.clone(). (shallow copy)
* @return The cloned instance of this entity. (NotNull)
*/
@Override
public BoostDocumentRule clone() {
try {
return (BoostDocumentRule) super.clone();
} catch (final CloneNotSupportedException e) {
throw new IllegalStateException("Failed to clone the entity: "
+ toString(), e);
}
}
// ===================================================================================
// Accessor
// ========
/**
* [get] ID: {PK, ID, NotNull, BIGINT(19)} <br />
* @return The value of the column 'ID'. (basically NotNull if selected: for the constraint)
*/
public Long getId() {
return _id;
}
/**
* [set] ID: {PK, ID, NotNull, BIGINT(19)} <br />
* @param id The value of the column 'ID'. (basically NotNull if update: for the constraint)
*/
public void setId(final Long id) {
__modifiedProperties.addPropertyName("id");
_id = id;
}
/**
* [get] URL_EXPR: {NotNull, VARCHAR(4000)} <br />
* @return The value of the column 'URL_EXPR'. (basically NotNull if selected: for the constraint)
*/
public String getUrlExpr() {
return _urlExpr;
}
/**
* [set] URL_EXPR: {NotNull, VARCHAR(4000)} <br />
* @param urlExpr The value of the column 'URL_EXPR'. (basically NotNull if update: for the constraint)
*/
public void setUrlExpr(final String urlExpr) {
__modifiedProperties.addPropertyName("urlExpr");
_urlExpr = urlExpr;
}
/**
* [get] BOOST_EXPR: {NotNull, VARCHAR(4000)} <br />
* @return The value of the column 'BOOST_EXPR'. (basically NotNull if selected: for the constraint)
*/
public String getBoostExpr() {
return _boostExpr;
}
/**
* [set] BOOST_EXPR: {NotNull, VARCHAR(4000)} <br />
* @param boostExpr The value of the column 'BOOST_EXPR'. (basically NotNull if update: for the constraint)
*/
public void setBoostExpr(final String boostExpr) {
__modifiedProperties.addPropertyName("boostExpr");
_boostExpr = boostExpr;
}
/**
* [get] SORT_ORDER: {NotNull, INTEGER(10)} <br />
* @return The value of the column 'SORT_ORDER'. (basically NotNull if selected: for the constraint)
*/
public Integer getSortOrder() {
return _sortOrder;
}
/**
* [set] SORT_ORDER: {NotNull, INTEGER(10)} <br />
* @param sortOrder The value of the column 'SORT_ORDER'. (basically NotNull if update: for the constraint)
*/
public void setSortOrder(final Integer sortOrder) {
__modifiedProperties.addPropertyName("sortOrder");
_sortOrder = sortOrder;
}
/**
* [get] CREATED_BY: {NotNull, VARCHAR(255)} <br />
* @return The value of the column 'CREATED_BY'. (basically NotNull if selected: for the constraint)
*/
public String getCreatedBy() {
return _createdBy;
}
/**
* [set] CREATED_BY: {NotNull, VARCHAR(255)} <br />
* @param createdBy The value of the column 'CREATED_BY'. (basically NotNull if update: for the constraint)
*/
public void setCreatedBy(final String createdBy) {
__modifiedProperties.addPropertyName("createdBy");
_createdBy = createdBy;
}
/**
* [get] CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} <br />
* @return The value of the column 'CREATED_TIME'. (basically NotNull if selected: for the constraint)
*/
public java.sql.Timestamp getCreatedTime() {
return _createdTime;
}
/**
* [set] CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} <br />
* @param createdTime The value of the column 'CREATED_TIME'. (basically NotNull if update: for the constraint)
*/
public void setCreatedTime(final java.sql.Timestamp createdTime) {
__modifiedProperties.addPropertyName("createdTime");
_createdTime = createdTime;
}
/**
* [get] UPDATED_BY: {VARCHAR(255)} <br />
* @return The value of the column 'UPDATED_BY'. (NullAllowed even if selected: for no constraint)
*/
public String getUpdatedBy() {
return _updatedBy;
}
/**
* [set] UPDATED_BY: {VARCHAR(255)} <br />
* @param updatedBy The value of the column 'UPDATED_BY'. (NullAllowed: null update allowed for no constraint)
*/
public void setUpdatedBy(final String updatedBy) {
__modifiedProperties.addPropertyName("updatedBy");
_updatedBy = updatedBy;
}
/**
* [get] UPDATED_TIME: {TIMESTAMP(23, 10)} <br />
* @return The value of the column 'UPDATED_TIME'. (NullAllowed even if selected: for no constraint)
*/
public java.sql.Timestamp getUpdatedTime() {
return _updatedTime;
}
/**
* [set] UPDATED_TIME: {TIMESTAMP(23, 10)} <br />
* @param updatedTime The value of the column 'UPDATED_TIME'. (NullAllowed: null update allowed for no constraint)
*/
public void setUpdatedTime(final java.sql.Timestamp updatedTime) {
__modifiedProperties.addPropertyName("updatedTime");
_updatedTime = updatedTime;
}
/**
* [get] DELETED_BY: {VARCHAR(255)} <br />
* @return The value of the column 'DELETED_BY'. (NullAllowed even if selected: for no constraint)
*/
public String getDeletedBy() {
return _deletedBy;
}
/**
* [set] DELETED_BY: {VARCHAR(255)} <br />
* @param deletedBy The value of the column 'DELETED_BY'. (NullAllowed: null update allowed for no constraint)
*/
public void setDeletedBy(final String deletedBy) {
__modifiedProperties.addPropertyName("deletedBy");
_deletedBy = deletedBy;
}
/**
* [get] DELETED_TIME: {TIMESTAMP(23, 10)} <br />
* @return The value of the column 'DELETED_TIME'. (NullAllowed even if selected: for no constraint)
*/
public java.sql.Timestamp getDeletedTime() {
return _deletedTime;
}
/**
* [set] DELETED_TIME: {TIMESTAMP(23, 10)} <br />
* @param deletedTime The value of the column 'DELETED_TIME'. (NullAllowed: null update allowed for no constraint)
*/
public void setDeletedTime(final java.sql.Timestamp deletedTime) {
__modifiedProperties.addPropertyName("deletedTime");
_deletedTime = deletedTime;
}
/**
* [get] VERSION_NO: {NotNull, INTEGER(10)} <br />
* @return The value of the column 'VERSION_NO'. (basically NotNull if selected: for the constraint)
*/
public Integer getVersionNo() {
return _versionNo;
}
/**
* [set] VERSION_NO: {NotNull, INTEGER(10)} <br />
* @param versionNo The value of the column 'VERSION_NO'. (basically NotNull if update: for the constraint)
*/
public void setVersionNo(final Integer versionNo) {
__modifiedProperties.addPropertyName("versionNo");
_versionNo = versionNo;
}
}

View file

@ -0,0 +1,580 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.db.bsentity;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import jp.sf.fess.db.allcommon.DBMetaInstanceHandler;
import jp.sf.fess.db.exentity.SuggestBadWord;
import org.seasar.dbflute.Entity;
import org.seasar.dbflute.dbmeta.DBMeta;
/**
* The entity of SUGGEST_BAD_WORD as TABLE. <br />
* <pre>
* [primary-key]
* ID
*
* [column]
* ID, SUGGEST_WORD, TARGET_ROLE, TARGET_LABEL, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETED_BY, DELETED_TIME, VERSION_NO
*
* [sequence]
*
*
* [identity]
* ID
*
* [version-no]
* VERSION_NO
*
* [foreign table]
*
*
* [referrer table]
*
*
* [foreign property]
*
*
* [referrer property]
*
*
* [get/set template]
* /= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
* Long id = entity.getId();
* String suggestWord = entity.getSuggestWord();
* String targetRole = entity.getTargetRole();
* String targetLabel = entity.getTargetLabel();
* String createdBy = entity.getCreatedBy();
* java.sql.Timestamp createdTime = entity.getCreatedTime();
* String updatedBy = entity.getUpdatedBy();
* java.sql.Timestamp updatedTime = entity.getUpdatedTime();
* String deletedBy = entity.getDeletedBy();
* java.sql.Timestamp deletedTime = entity.getDeletedTime();
* Integer versionNo = entity.getVersionNo();
* entity.setId(id);
* entity.setSuggestWord(suggestWord);
* entity.setTargetRole(targetRole);
* entity.setTargetLabel(targetLabel);
* entity.setCreatedBy(createdBy);
* entity.setCreatedTime(createdTime);
* entity.setUpdatedBy(updatedBy);
* entity.setUpdatedTime(updatedTime);
* entity.setDeletedBy(deletedBy);
* entity.setDeletedTime(deletedTime);
* entity.setVersionNo(versionNo);
* = = = = = = = = = =/
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsSuggestBadWord implements Entity, Serializable,
Cloneable {
// ===================================================================================
// Definition
// ==========
/** Serial version UID. (Default) */
private static final long serialVersionUID = 1L;
// ===================================================================================
// Attribute
// =========
// -----------------------------------------------------
// Column
// ------
/** ID: {PK, ID, NotNull, BIGINT(19)} */
protected Long _id;
/** SUGGEST_WORD: {NotNull, VARCHAR(255)} */
protected String _suggestWord;
/** TARGET_ROLE: {VARCHAR(255)} */
protected String _targetRole;
/** TARGET_LABEL: {VARCHAR(255)} */
protected String _targetLabel;
/** CREATED_BY: {NotNull, VARCHAR(255)} */
protected String _createdBy;
/** CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} */
protected java.sql.Timestamp _createdTime;
/** UPDATED_BY: {VARCHAR(255)} */
protected String _updatedBy;
/** UPDATED_TIME: {TIMESTAMP(23, 10)} */
protected java.sql.Timestamp _updatedTime;
/** DELETED_BY: {VARCHAR(255)} */
protected String _deletedBy;
/** DELETED_TIME: {TIMESTAMP(23, 10)} */
protected java.sql.Timestamp _deletedTime;
/** VERSION_NO: {NotNull, INTEGER(10)} */
protected Integer _versionNo;
// -----------------------------------------------------
// Internal
// --------
/** The unique-driven properties for this entity. (NotNull) */
protected final EntityUniqueDrivenProperties __uniqueDrivenProperties = newUniqueDrivenProperties();
/** The modified properties for this entity. (NotNull) */
protected final EntityModifiedProperties __modifiedProperties = newModifiedProperties();
/** Is the entity created by DBFlute select process? */
protected boolean __createdBySelect;
// ===================================================================================
// Table Name
// ==========
/**
* {@inheritDoc}
*/
@Override
public String getTableDbName() {
return "SUGGEST_BAD_WORD";
}
/**
* {@inheritDoc}
*/
@Override
public String getTablePropertyName() { // according to Java Beans rule
return "suggestBadWord";
}
// ===================================================================================
// DBMeta
// ======
/**
* {@inheritDoc}
*/
@Override
public DBMeta getDBMeta() {
return DBMetaInstanceHandler.findDBMeta(getTableDbName());
}
// ===================================================================================
// Primary Key
// ===========
/**
* {@inheritDoc}
*/
@Override
public boolean hasPrimaryKeyValue() {
if (getId() == null) {
return false;
}
return true;
}
/**
* {@inheritDoc}
*/
@Override
public Set<String> myuniqueDrivenProperties() {
return __uniqueDrivenProperties.getPropertyNames();
}
protected EntityUniqueDrivenProperties newUniqueDrivenProperties() {
return new EntityUniqueDrivenProperties();
}
// ===================================================================================
// Foreign Property
// ================
// ===================================================================================
// Referrer Property
// =================
protected <ELEMENT> List<ELEMENT> newReferrerList() {
return new ArrayList<ELEMENT>();
}
// ===================================================================================
// Modified Properties
// ===================
/**
* {@inheritDoc}
*/
@Override
public Set<String> modifiedProperties() {
return __modifiedProperties.getPropertyNames();
}
/**
* {@inheritDoc}
*/
@Override
public void clearModifiedInfo() {
__modifiedProperties.clear();
}
/**
* {@inheritDoc}
*/
@Override
public boolean hasModification() {
return !__modifiedProperties.isEmpty();
}
protected EntityModifiedProperties newModifiedProperties() {
return new EntityModifiedProperties();
}
// ===================================================================================
// Birthplace Mark
// ===============
/**
* {@inheritDoc}
*/
@Override
public void markAsSelect() {
__createdBySelect = true;
}
/**
* {@inheritDoc}
*/
@Override
public boolean createdBySelect() {
return __createdBySelect;
}
// ===================================================================================
// Basic Override
// ==============
/**
* Determine the object is equal with this. <br />
* If primary-keys or columns of the other are same as this one, returns true.
* @param obj The object as other entity. (NullAllowed: if null, returns false fixedly)
* @return Comparing result.
*/
@Override
public boolean equals(final Object obj) {
if (obj == null || !(obj instanceof BsSuggestBadWord)) {
return false;
}
final BsSuggestBadWord other = (BsSuggestBadWord) obj;
if (!xSV(getId(), other.getId())) {
return false;
}
return true;
}
protected boolean xSV(final Object v1, final Object v2) {
return FunCustodial.isSameValue(v1, v2);
}
/**
* Calculate the hash-code from primary-keys or columns.
* @return The hash-code from primary-key or columns.
*/
@Override
public int hashCode() {
int hs = 17;
hs = xCH(hs, getTableDbName());
hs = xCH(hs, getId());
return hs;
}
protected int xCH(final int hs, final Object vl) {
return FunCustodial.calculateHashcode(hs, vl);
}
/**
* {@inheritDoc}
*/
@Override
public int instanceHash() {
return super.hashCode();
}
/**
* Convert to display string of entity's data. (no relation data)
* @return The display string of all columns and relation existences. (NotNull)
*/
@Override
public String toString() {
return buildDisplayString(FunCustodial.toClassTitle(this), true, true);
}
/**
* {@inheritDoc}
*/
@Override
public String toStringWithRelation() {
final StringBuilder sb = new StringBuilder();
sb.append(toString());
return sb.toString();
}
/**
* {@inheritDoc}
*/
@Override
public String buildDisplayString(final String name, final boolean column,
final boolean relation) {
final StringBuilder sb = new StringBuilder();
if (name != null) {
sb.append(name).append(column || relation ? ":" : "");
}
if (column) {
sb.append(buildColumnString());
}
if (relation) {
sb.append(buildRelationString());
}
sb.append("@").append(Integer.toHexString(hashCode()));
return sb.toString();
}
protected String buildColumnString() {
final StringBuilder sb = new StringBuilder();
final String dm = ", ";
sb.append(dm).append(getId());
sb.append(dm).append(getSuggestWord());
sb.append(dm).append(getTargetRole());
sb.append(dm).append(getTargetLabel());
sb.append(dm).append(getCreatedBy());
sb.append(dm).append(getCreatedTime());
sb.append(dm).append(getUpdatedBy());
sb.append(dm).append(getUpdatedTime());
sb.append(dm).append(getDeletedBy());
sb.append(dm).append(getDeletedTime());
sb.append(dm).append(getVersionNo());
if (sb.length() > dm.length()) {
sb.delete(0, dm.length());
}
sb.insert(0, "{").append("}");
return sb.toString();
}
protected String buildRelationString() {
return "";
}
/**
* Clone entity instance using super.clone(). (shallow copy)
* @return The cloned instance of this entity. (NotNull)
*/
@Override
public SuggestBadWord clone() {
try {
return (SuggestBadWord) super.clone();
} catch (final CloneNotSupportedException e) {
throw new IllegalStateException("Failed to clone the entity: "
+ toString(), e);
}
}
// ===================================================================================
// Accessor
// ========
/**
* [get] ID: {PK, ID, NotNull, BIGINT(19)} <br />
* @return The value of the column 'ID'. (basically NotNull if selected: for the constraint)
*/
public Long getId() {
return _id;
}
/**
* [set] ID: {PK, ID, NotNull, BIGINT(19)} <br />
* @param id The value of the column 'ID'. (basically NotNull if update: for the constraint)
*/
public void setId(final Long id) {
__modifiedProperties.addPropertyName("id");
_id = id;
}
/**
* [get] SUGGEST_WORD: {NotNull, VARCHAR(255)} <br />
* @return The value of the column 'SUGGEST_WORD'. (basically NotNull if selected: for the constraint)
*/
public String getSuggestWord() {
return _suggestWord;
}
/**
* [set] SUGGEST_WORD: {NotNull, VARCHAR(255)} <br />
* @param suggestWord The value of the column 'SUGGEST_WORD'. (basically NotNull if update: for the constraint)
*/
public void setSuggestWord(final String suggestWord) {
__modifiedProperties.addPropertyName("suggestWord");
_suggestWord = suggestWord;
}
/**
* [get] TARGET_ROLE: {VARCHAR(255)} <br />
* @return The value of the column 'TARGET_ROLE'. (NullAllowed even if selected: for no constraint)
*/
public String getTargetRole() {
return _targetRole;
}
/**
* [set] TARGET_ROLE: {VARCHAR(255)} <br />
* @param targetRole The value of the column 'TARGET_ROLE'. (NullAllowed: null update allowed for no constraint)
*/
public void setTargetRole(final String targetRole) {
__modifiedProperties.addPropertyName("targetRole");
_targetRole = targetRole;
}
/**
* [get] TARGET_LABEL: {VARCHAR(255)} <br />
* @return The value of the column 'TARGET_LABEL'. (NullAllowed even if selected: for no constraint)
*/
public String getTargetLabel() {
return _targetLabel;
}
/**
* [set] TARGET_LABEL: {VARCHAR(255)} <br />
* @param targetLabel The value of the column 'TARGET_LABEL'. (NullAllowed: null update allowed for no constraint)
*/
public void setTargetLabel(final String targetLabel) {
__modifiedProperties.addPropertyName("targetLabel");
_targetLabel = targetLabel;
}
/**
* [get] CREATED_BY: {NotNull, VARCHAR(255)} <br />
* @return The value of the column 'CREATED_BY'. (basically NotNull if selected: for the constraint)
*/
public String getCreatedBy() {
return _createdBy;
}
/**
* [set] CREATED_BY: {NotNull, VARCHAR(255)} <br />
* @param createdBy The value of the column 'CREATED_BY'. (basically NotNull if update: for the constraint)
*/
public void setCreatedBy(final String createdBy) {
__modifiedProperties.addPropertyName("createdBy");
_createdBy = createdBy;
}
/**
* [get] CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} <br />
* @return The value of the column 'CREATED_TIME'. (basically NotNull if selected: for the constraint)
*/
public java.sql.Timestamp getCreatedTime() {
return _createdTime;
}
/**
* [set] CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} <br />
* @param createdTime The value of the column 'CREATED_TIME'. (basically NotNull if update: for the constraint)
*/
public void setCreatedTime(final java.sql.Timestamp createdTime) {
__modifiedProperties.addPropertyName("createdTime");
_createdTime = createdTime;
}
/**
* [get] UPDATED_BY: {VARCHAR(255)} <br />
* @return The value of the column 'UPDATED_BY'. (NullAllowed even if selected: for no constraint)
*/
public String getUpdatedBy() {
return _updatedBy;
}
/**
* [set] UPDATED_BY: {VARCHAR(255)} <br />
* @param updatedBy The value of the column 'UPDATED_BY'. (NullAllowed: null update allowed for no constraint)
*/
public void setUpdatedBy(final String updatedBy) {
__modifiedProperties.addPropertyName("updatedBy");
_updatedBy = updatedBy;
}
/**
* [get] UPDATED_TIME: {TIMESTAMP(23, 10)} <br />
* @return The value of the column 'UPDATED_TIME'. (NullAllowed even if selected: for no constraint)
*/
public java.sql.Timestamp getUpdatedTime() {
return _updatedTime;
}
/**
* [set] UPDATED_TIME: {TIMESTAMP(23, 10)} <br />
* @param updatedTime The value of the column 'UPDATED_TIME'. (NullAllowed: null update allowed for no constraint)
*/
public void setUpdatedTime(final java.sql.Timestamp updatedTime) {
__modifiedProperties.addPropertyName("updatedTime");
_updatedTime = updatedTime;
}
/**
* [get] DELETED_BY: {VARCHAR(255)} <br />
* @return The value of the column 'DELETED_BY'. (NullAllowed even if selected: for no constraint)
*/
public String getDeletedBy() {
return _deletedBy;
}
/**
* [set] DELETED_BY: {VARCHAR(255)} <br />
* @param deletedBy The value of the column 'DELETED_BY'. (NullAllowed: null update allowed for no constraint)
*/
public void setDeletedBy(final String deletedBy) {
__modifiedProperties.addPropertyName("deletedBy");
_deletedBy = deletedBy;
}
/**
* [get] DELETED_TIME: {TIMESTAMP(23, 10)} <br />
* @return The value of the column 'DELETED_TIME'. (NullAllowed even if selected: for no constraint)
*/
public java.sql.Timestamp getDeletedTime() {
return _deletedTime;
}
/**
* [set] DELETED_TIME: {TIMESTAMP(23, 10)} <br />
* @param deletedTime The value of the column 'DELETED_TIME'. (NullAllowed: null update allowed for no constraint)
*/
public void setDeletedTime(final java.sql.Timestamp deletedTime) {
__modifiedProperties.addPropertyName("deletedTime");
_deletedTime = deletedTime;
}
/**
* [get] VERSION_NO: {NotNull, INTEGER(10)} <br />
* @return The value of the column 'VERSION_NO'. (basically NotNull if selected: for the constraint)
*/
public Integer getVersionNo() {
return _versionNo;
}
/**
* [set] VERSION_NO: {NotNull, INTEGER(10)} <br />
* @param versionNo The value of the column 'VERSION_NO'. (basically NotNull if update: for the constraint)
*/
public void setVersionNo(final Integer versionNo) {
__modifiedProperties.addPropertyName("versionNo");
_versionNo = versionNo;
}
}

View file

@ -0,0 +1,626 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.db.bsentity;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import jp.sf.fess.db.allcommon.DBMetaInstanceHandler;
import jp.sf.fess.db.exentity.SuggestElevateWord;
import org.seasar.dbflute.Entity;
import org.seasar.dbflute.dbmeta.DBMeta;
/**
* The entity of SUGGEST_ELEVATE_WORD as TABLE. <br />
* <pre>
* [primary-key]
* ID
*
* [column]
* ID, SUGGEST_WORD, READING, TARGET_ROLE, TARGET_LABEL, BOOST, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETED_BY, DELETED_TIME, VERSION_NO
*
* [sequence]
*
*
* [identity]
* ID
*
* [version-no]
* VERSION_NO
*
* [foreign table]
*
*
* [referrer table]
*
*
* [foreign property]
*
*
* [referrer property]
*
*
* [get/set template]
* /= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
* Long id = entity.getId();
* String suggestWord = entity.getSuggestWord();
* String reading = entity.getReading();
* String targetRole = entity.getTargetRole();
* String targetLabel = entity.getTargetLabel();
* java.math.BigDecimal boost = entity.getBoost();
* String createdBy = entity.getCreatedBy();
* java.sql.Timestamp createdTime = entity.getCreatedTime();
* String updatedBy = entity.getUpdatedBy();
* java.sql.Timestamp updatedTime = entity.getUpdatedTime();
* String deletedBy = entity.getDeletedBy();
* java.sql.Timestamp deletedTime = entity.getDeletedTime();
* Integer versionNo = entity.getVersionNo();
* entity.setId(id);
* entity.setSuggestWord(suggestWord);
* entity.setReading(reading);
* entity.setTargetRole(targetRole);
* entity.setTargetLabel(targetLabel);
* entity.setBoost(boost);
* entity.setCreatedBy(createdBy);
* entity.setCreatedTime(createdTime);
* entity.setUpdatedBy(updatedBy);
* entity.setUpdatedTime(updatedTime);
* entity.setDeletedBy(deletedBy);
* entity.setDeletedTime(deletedTime);
* entity.setVersionNo(versionNo);
* = = = = = = = = = =/
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsSuggestElevateWord implements Entity, Serializable,
Cloneable {
// ===================================================================================
// Definition
// ==========
/** Serial version UID. (Default) */
private static final long serialVersionUID = 1L;
// ===================================================================================
// Attribute
// =========
// -----------------------------------------------------
// Column
// ------
/** ID: {PK, ID, NotNull, BIGINT(19)} */
protected Long _id;
/** SUGGEST_WORD: {NotNull, VARCHAR(255)} */
protected String _suggestWord;
/** READING: {VARCHAR(255)} */
protected String _reading;
/** TARGET_ROLE: {VARCHAR(255)} */
protected String _targetRole;
/** TARGET_LABEL: {VARCHAR(255)} */
protected String _targetLabel;
/** BOOST: {NotNull, DOUBLE(17)} */
protected java.math.BigDecimal _boost;
/** CREATED_BY: {NotNull, VARCHAR(255)} */
protected String _createdBy;
/** CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} */
protected java.sql.Timestamp _createdTime;
/** UPDATED_BY: {VARCHAR(255)} */
protected String _updatedBy;
/** UPDATED_TIME: {TIMESTAMP(23, 10)} */
protected java.sql.Timestamp _updatedTime;
/** DELETED_BY: {VARCHAR(255)} */
protected String _deletedBy;
/** DELETED_TIME: {TIMESTAMP(23, 10)} */
protected java.sql.Timestamp _deletedTime;
/** VERSION_NO: {NotNull, INTEGER(10)} */
protected Integer _versionNo;
// -----------------------------------------------------
// Internal
// --------
/** The unique-driven properties for this entity. (NotNull) */
protected final EntityUniqueDrivenProperties __uniqueDrivenProperties = newUniqueDrivenProperties();
/** The modified properties for this entity. (NotNull) */
protected final EntityModifiedProperties __modifiedProperties = newModifiedProperties();
/** Is the entity created by DBFlute select process? */
protected boolean __createdBySelect;
// ===================================================================================
// Table Name
// ==========
/**
* {@inheritDoc}
*/
@Override
public String getTableDbName() {
return "SUGGEST_ELEVATE_WORD";
}
/**
* {@inheritDoc}
*/
@Override
public String getTablePropertyName() { // according to Java Beans rule
return "suggestElevateWord";
}
// ===================================================================================
// DBMeta
// ======
/**
* {@inheritDoc}
*/
@Override
public DBMeta getDBMeta() {
return DBMetaInstanceHandler.findDBMeta(getTableDbName());
}
// ===================================================================================
// Primary Key
// ===========
/**
* {@inheritDoc}
*/
@Override
public boolean hasPrimaryKeyValue() {
if (getId() == null) {
return false;
}
return true;
}
/**
* {@inheritDoc}
*/
@Override
public Set<String> myuniqueDrivenProperties() {
return __uniqueDrivenProperties.getPropertyNames();
}
protected EntityUniqueDrivenProperties newUniqueDrivenProperties() {
return new EntityUniqueDrivenProperties();
}
// ===================================================================================
// Foreign Property
// ================
// ===================================================================================
// Referrer Property
// =================
protected <ELEMENT> List<ELEMENT> newReferrerList() {
return new ArrayList<ELEMENT>();
}
// ===================================================================================
// Modified Properties
// ===================
/**
* {@inheritDoc}
*/
@Override
public Set<String> modifiedProperties() {
return __modifiedProperties.getPropertyNames();
}
/**
* {@inheritDoc}
*/
@Override
public void clearModifiedInfo() {
__modifiedProperties.clear();
}
/**
* {@inheritDoc}
*/
@Override
public boolean hasModification() {
return !__modifiedProperties.isEmpty();
}
protected EntityModifiedProperties newModifiedProperties() {
return new EntityModifiedProperties();
}
// ===================================================================================
// Birthplace Mark
// ===============
/**
* {@inheritDoc}
*/
@Override
public void markAsSelect() {
__createdBySelect = true;
}
/**
* {@inheritDoc}
*/
@Override
public boolean createdBySelect() {
return __createdBySelect;
}
// ===================================================================================
// Basic Override
// ==============
/**
* Determine the object is equal with this. <br />
* If primary-keys or columns of the other are same as this one, returns true.
* @param obj The object as other entity. (NullAllowed: if null, returns false fixedly)
* @return Comparing result.
*/
@Override
public boolean equals(final Object obj) {
if (obj == null || !(obj instanceof BsSuggestElevateWord)) {
return false;
}
final BsSuggestElevateWord other = (BsSuggestElevateWord) obj;
if (!xSV(getId(), other.getId())) {
return false;
}
return true;
}
protected boolean xSV(final Object v1, final Object v2) {
return FunCustodial.isSameValue(v1, v2);
}
/**
* Calculate the hash-code from primary-keys or columns.
* @return The hash-code from primary-key or columns.
*/
@Override
public int hashCode() {
int hs = 17;
hs = xCH(hs, getTableDbName());
hs = xCH(hs, getId());
return hs;
}
protected int xCH(final int hs, final Object vl) {
return FunCustodial.calculateHashcode(hs, vl);
}
/**
* {@inheritDoc}
*/
@Override
public int instanceHash() {
return super.hashCode();
}
/**
* Convert to display string of entity's data. (no relation data)
* @return The display string of all columns and relation existences. (NotNull)
*/
@Override
public String toString() {
return buildDisplayString(FunCustodial.toClassTitle(this), true, true);
}
/**
* {@inheritDoc}
*/
@Override
public String toStringWithRelation() {
final StringBuilder sb = new StringBuilder();
sb.append(toString());
return sb.toString();
}
/**
* {@inheritDoc}
*/
@Override
public String buildDisplayString(final String name, final boolean column,
final boolean relation) {
final StringBuilder sb = new StringBuilder();
if (name != null) {
sb.append(name).append(column || relation ? ":" : "");
}
if (column) {
sb.append(buildColumnString());
}
if (relation) {
sb.append(buildRelationString());
}
sb.append("@").append(Integer.toHexString(hashCode()));
return sb.toString();
}
protected String buildColumnString() {
final StringBuilder sb = new StringBuilder();
final String dm = ", ";
sb.append(dm).append(getId());
sb.append(dm).append(getSuggestWord());
sb.append(dm).append(getReading());
sb.append(dm).append(getTargetRole());
sb.append(dm).append(getTargetLabel());
sb.append(dm).append(getBoost());
sb.append(dm).append(getCreatedBy());
sb.append(dm).append(getCreatedTime());
sb.append(dm).append(getUpdatedBy());
sb.append(dm).append(getUpdatedTime());
sb.append(dm).append(getDeletedBy());
sb.append(dm).append(getDeletedTime());
sb.append(dm).append(getVersionNo());
if (sb.length() > dm.length()) {
sb.delete(0, dm.length());
}
sb.insert(0, "{").append("}");
return sb.toString();
}
protected String buildRelationString() {
return "";
}
/**
* Clone entity instance using super.clone(). (shallow copy)
* @return The cloned instance of this entity. (NotNull)
*/
@Override
public SuggestElevateWord clone() {
try {
return (SuggestElevateWord) super.clone();
} catch (final CloneNotSupportedException e) {
throw new IllegalStateException("Failed to clone the entity: "
+ toString(), e);
}
}
// ===================================================================================
// Accessor
// ========
/**
* [get] ID: {PK, ID, NotNull, BIGINT(19)} <br />
* @return The value of the column 'ID'. (basically NotNull if selected: for the constraint)
*/
public Long getId() {
return _id;
}
/**
* [set] ID: {PK, ID, NotNull, BIGINT(19)} <br />
* @param id The value of the column 'ID'. (basically NotNull if update: for the constraint)
*/
public void setId(final Long id) {
__modifiedProperties.addPropertyName("id");
_id = id;
}
/**
* [get] SUGGEST_WORD: {NotNull, VARCHAR(255)} <br />
* @return The value of the column 'SUGGEST_WORD'. (basically NotNull if selected: for the constraint)
*/
public String getSuggestWord() {
return _suggestWord;
}
/**
* [set] SUGGEST_WORD: {NotNull, VARCHAR(255)} <br />
* @param suggestWord The value of the column 'SUGGEST_WORD'. (basically NotNull if update: for the constraint)
*/
public void setSuggestWord(final String suggestWord) {
__modifiedProperties.addPropertyName("suggestWord");
_suggestWord = suggestWord;
}
/**
* [get] READING: {VARCHAR(255)} <br />
* @return The value of the column 'READING'. (NullAllowed even if selected: for no constraint)
*/
public String getReading() {
return _reading;
}
/**
* [set] READING: {VARCHAR(255)} <br />
* @param reading The value of the column 'READING'. (NullAllowed: null update allowed for no constraint)
*/
public void setReading(final String reading) {
__modifiedProperties.addPropertyName("reading");
_reading = reading;
}
/**
* [get] TARGET_ROLE: {VARCHAR(255)} <br />
* @return The value of the column 'TARGET_ROLE'. (NullAllowed even if selected: for no constraint)
*/
public String getTargetRole() {
return _targetRole;
}
/**
* [set] TARGET_ROLE: {VARCHAR(255)} <br />
* @param targetRole The value of the column 'TARGET_ROLE'. (NullAllowed: null update allowed for no constraint)
*/
public void setTargetRole(final String targetRole) {
__modifiedProperties.addPropertyName("targetRole");
_targetRole = targetRole;
}
/**
* [get] TARGET_LABEL: {VARCHAR(255)} <br />
* @return The value of the column 'TARGET_LABEL'. (NullAllowed even if selected: for no constraint)
*/
public String getTargetLabel() {
return _targetLabel;
}
/**
* [set] TARGET_LABEL: {VARCHAR(255)} <br />
* @param targetLabel The value of the column 'TARGET_LABEL'. (NullAllowed: null update allowed for no constraint)
*/
public void setTargetLabel(final String targetLabel) {
__modifiedProperties.addPropertyName("targetLabel");
_targetLabel = targetLabel;
}
/**
* [get] BOOST: {NotNull, DOUBLE(17)} <br />
* @return The value of the column 'BOOST'. (basically NotNull if selected: for the constraint)
*/
public java.math.BigDecimal getBoost() {
return _boost;
}
/**
* [set] BOOST: {NotNull, DOUBLE(17)} <br />
* @param boost The value of the column 'BOOST'. (basically NotNull if update: for the constraint)
*/
public void setBoost(final java.math.BigDecimal boost) {
__modifiedProperties.addPropertyName("boost");
_boost = boost;
}
/**
* [get] CREATED_BY: {NotNull, VARCHAR(255)} <br />
* @return The value of the column 'CREATED_BY'. (basically NotNull if selected: for the constraint)
*/
public String getCreatedBy() {
return _createdBy;
}
/**
* [set] CREATED_BY: {NotNull, VARCHAR(255)} <br />
* @param createdBy The value of the column 'CREATED_BY'. (basically NotNull if update: for the constraint)
*/
public void setCreatedBy(final String createdBy) {
__modifiedProperties.addPropertyName("createdBy");
_createdBy = createdBy;
}
/**
* [get] CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} <br />
* @return The value of the column 'CREATED_TIME'. (basically NotNull if selected: for the constraint)
*/
public java.sql.Timestamp getCreatedTime() {
return _createdTime;
}
/**
* [set] CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} <br />
* @param createdTime The value of the column 'CREATED_TIME'. (basically NotNull if update: for the constraint)
*/
public void setCreatedTime(final java.sql.Timestamp createdTime) {
__modifiedProperties.addPropertyName("createdTime");
_createdTime = createdTime;
}
/**
* [get] UPDATED_BY: {VARCHAR(255)} <br />
* @return The value of the column 'UPDATED_BY'. (NullAllowed even if selected: for no constraint)
*/
public String getUpdatedBy() {
return _updatedBy;
}
/**
* [set] UPDATED_BY: {VARCHAR(255)} <br />
* @param updatedBy The value of the column 'UPDATED_BY'. (NullAllowed: null update allowed for no constraint)
*/
public void setUpdatedBy(final String updatedBy) {
__modifiedProperties.addPropertyName("updatedBy");
_updatedBy = updatedBy;
}
/**
* [get] UPDATED_TIME: {TIMESTAMP(23, 10)} <br />
* @return The value of the column 'UPDATED_TIME'. (NullAllowed even if selected: for no constraint)
*/
public java.sql.Timestamp getUpdatedTime() {
return _updatedTime;
}
/**
* [set] UPDATED_TIME: {TIMESTAMP(23, 10)} <br />
* @param updatedTime The value of the column 'UPDATED_TIME'. (NullAllowed: null update allowed for no constraint)
*/
public void setUpdatedTime(final java.sql.Timestamp updatedTime) {
__modifiedProperties.addPropertyName("updatedTime");
_updatedTime = updatedTime;
}
/**
* [get] DELETED_BY: {VARCHAR(255)} <br />
* @return The value of the column 'DELETED_BY'. (NullAllowed even if selected: for no constraint)
*/
public String getDeletedBy() {
return _deletedBy;
}
/**
* [set] DELETED_BY: {VARCHAR(255)} <br />
* @param deletedBy The value of the column 'DELETED_BY'. (NullAllowed: null update allowed for no constraint)
*/
public void setDeletedBy(final String deletedBy) {
__modifiedProperties.addPropertyName("deletedBy");
_deletedBy = deletedBy;
}
/**
* [get] DELETED_TIME: {TIMESTAMP(23, 10)} <br />
* @return The value of the column 'DELETED_TIME'. (NullAllowed even if selected: for no constraint)
*/
public java.sql.Timestamp getDeletedTime() {
return _deletedTime;
}
/**
* [set] DELETED_TIME: {TIMESTAMP(23, 10)} <br />
* @param deletedTime The value of the column 'DELETED_TIME'. (NullAllowed: null update allowed for no constraint)
*/
public void setDeletedTime(final java.sql.Timestamp deletedTime) {
__modifiedProperties.addPropertyName("deletedTime");
_deletedTime = deletedTime;
}
/**
* [get] VERSION_NO: {NotNull, INTEGER(10)} <br />
* @return The value of the column 'VERSION_NO'. (basically NotNull if selected: for the constraint)
*/
public Integer getVersionNo() {
return _versionNo;
}
/**
* [set] VERSION_NO: {NotNull, INTEGER(10)} <br />
* @param versionNo The value of the column 'VERSION_NO'. (basically NotNull if update: for the constraint)
*/
public void setVersionNo(final Integer versionNo) {
__modifiedProperties.addPropertyName("versionNo");
_versionNo = versionNo;
}
}

View file

@ -0,0 +1,539 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.db.bsentity.dbmeta;
import java.util.List;
import java.util.Map;
import jp.sf.fess.db.allcommon.DBCurrent;
import jp.sf.fess.db.allcommon.DBFluteConfig;
import jp.sf.fess.db.exentity.BoostDocumentRule;
import org.seasar.dbflute.DBDef;
import org.seasar.dbflute.Entity;
import org.seasar.dbflute.dbmeta.AbstractDBMeta;
import org.seasar.dbflute.dbmeta.PropertyGateway;
import org.seasar.dbflute.dbmeta.info.ColumnInfo;
import org.seasar.dbflute.dbmeta.info.UniqueInfo;
import org.seasar.dbflute.dbmeta.name.TableSqlName;
/**
* The DB meta of BOOST_DOCUMENT_RULE. (Singleton)
* @author DBFlute(AutoGenerator)
*/
public class BoostDocumentRuleDbm extends AbstractDBMeta {
// ===================================================================================
// Singleton
// =========
private static final BoostDocumentRuleDbm _instance = new BoostDocumentRuleDbm();
private BoostDocumentRuleDbm() {
}
public static BoostDocumentRuleDbm getInstance() {
return _instance;
}
// ===================================================================================
// Current DBDef
// =============
@Override
public DBDef getCurrentDBDef() {
return DBCurrent.getInstance().currentDBDef();
}
// ===================================================================================
// Property Gateway
// ================
// -----------------------------------------------------
// Column Property
// ---------------
protected final Map<String, PropertyGateway> _epgMap = newHashMap();
{
setupEpg(_epgMap, new EpgId(), "id");
setupEpg(_epgMap, new EpgUrlExpr(), "urlExpr");
setupEpg(_epgMap, new EpgBoostExpr(), "boostExpr");
setupEpg(_epgMap, new EpgSortOrder(), "sortOrder");
setupEpg(_epgMap, new EpgCreatedBy(), "createdBy");
setupEpg(_epgMap, new EpgCreatedTime(), "createdTime");
setupEpg(_epgMap, new EpgUpdatedBy(), "updatedBy");
setupEpg(_epgMap, new EpgUpdatedTime(), "updatedTime");
setupEpg(_epgMap, new EpgDeletedBy(), "deletedBy");
setupEpg(_epgMap, new EpgDeletedTime(), "deletedTime");
setupEpg(_epgMap, new EpgVersionNo(), "versionNo");
}
public static class EpgId implements PropertyGateway {
@Override
public Object read(final Entity et) {
return ((BoostDocumentRule) et).getId();
}
@Override
public void write(final Entity et, final Object vl) {
((BoostDocumentRule) et).setId(ctl(vl));
}
}
public static class EpgUrlExpr implements PropertyGateway {
@Override
public Object read(final Entity et) {
return ((BoostDocumentRule) et).getUrlExpr();
}
@Override
public void write(final Entity et, final Object vl) {
((BoostDocumentRule) et).setUrlExpr((String) vl);
}
}
public static class EpgBoostExpr implements PropertyGateway {
@Override
public Object read(final Entity et) {
return ((BoostDocumentRule) et).getBoostExpr();
}
@Override
public void write(final Entity et, final Object vl) {
((BoostDocumentRule) et).setBoostExpr((String) vl);
}
}
public static class EpgSortOrder implements PropertyGateway {
@Override
public Object read(final Entity et) {
return ((BoostDocumentRule) et).getSortOrder();
}
@Override
public void write(final Entity et, final Object vl) {
((BoostDocumentRule) et).setSortOrder(cti(vl));
}
}
public static class EpgCreatedBy implements PropertyGateway {
@Override
public Object read(final Entity et) {
return ((BoostDocumentRule) et).getCreatedBy();
}
@Override
public void write(final Entity et, final Object vl) {
((BoostDocumentRule) et).setCreatedBy((String) vl);
}
}
public static class EpgCreatedTime implements PropertyGateway {
@Override
public Object read(final Entity et) {
return ((BoostDocumentRule) et).getCreatedTime();
}
@Override
public void write(final Entity et, final Object vl) {
((BoostDocumentRule) et).setCreatedTime((java.sql.Timestamp) vl);
}
}
public static class EpgUpdatedBy implements PropertyGateway {
@Override
public Object read(final Entity et) {
return ((BoostDocumentRule) et).getUpdatedBy();
}
@Override
public void write(final Entity et, final Object vl) {
((BoostDocumentRule) et).setUpdatedBy((String) vl);
}
}
public static class EpgUpdatedTime implements PropertyGateway {
@Override
public Object read(final Entity et) {
return ((BoostDocumentRule) et).getUpdatedTime();
}
@Override
public void write(final Entity et, final Object vl) {
((BoostDocumentRule) et).setUpdatedTime((java.sql.Timestamp) vl);
}
}
public static class EpgDeletedBy implements PropertyGateway {
@Override
public Object read(final Entity et) {
return ((BoostDocumentRule) et).getDeletedBy();
}
@Override
public void write(final Entity et, final Object vl) {
((BoostDocumentRule) et).setDeletedBy((String) vl);
}
}
public static class EpgDeletedTime implements PropertyGateway {
@Override
public Object read(final Entity et) {
return ((BoostDocumentRule) et).getDeletedTime();
}
@Override
public void write(final Entity et, final Object vl) {
((BoostDocumentRule) et).setDeletedTime((java.sql.Timestamp) vl);
}
}
public static class EpgVersionNo implements PropertyGateway {
@Override
public Object read(final Entity et) {
return ((BoostDocumentRule) et).getVersionNo();
}
@Override
public void write(final Entity et, final Object vl) {
((BoostDocumentRule) et).setVersionNo(cti(vl));
}
}
@Override
public PropertyGateway findPropertyGateway(final String prop) {
return doFindEpg(_epgMap, prop);
}
// ===================================================================================
// Table Info
// ==========
protected final String _tableDbName = "BOOST_DOCUMENT_RULE";
protected final String _tablePropertyName = "boostDocumentRule";
protected final TableSqlName _tableSqlName = new TableSqlName(
"BOOST_DOCUMENT_RULE", _tableDbName);
{
_tableSqlName.xacceptFilter(DBFluteConfig.getInstance()
.getTableSqlNameFilter());
}
@Override
public String getTableDbName() {
return _tableDbName;
}
@Override
public String getTablePropertyName() {
return _tablePropertyName;
}
@Override
public TableSqlName getTableSqlName() {
return _tableSqlName;
}
// ===================================================================================
// Column Info
// ===========
protected final ColumnInfo _columnId = cci(
"ID",
"ID",
null,
null,
Long.class,
"id",
null,
true,
true,
true,
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_03250CCA_C571_467F_BACC_1E7336564197",
false, null, null, null, null, null);
protected final ColumnInfo _columnUrlExpr = cci("URL_EXPR", "URL_EXPR",
null, null, String.class, "urlExpr", null, false, false, true,
"VARCHAR", 4000, 0, null, false, null, null, null, null, null);
protected final ColumnInfo _columnBoostExpr = cci("BOOST_EXPR",
"BOOST_EXPR", null, null, String.class, "boostExpr", null, false,
false, true, "VARCHAR", 4000, 0, null, false, null, null, null,
null, null);
protected final ColumnInfo _columnSortOrder = cci("SORT_ORDER",
"SORT_ORDER", null, null, Integer.class, "sortOrder", null, false,
false, true, "INTEGER", 10, 0, null, false, null, null, null, null,
null);
protected final ColumnInfo _columnCreatedBy = cci("CREATED_BY",
"CREATED_BY", null, null, String.class, "createdBy", null, false,
false, true, "VARCHAR", 255, 0, null, false, null, null, null,
null, null);
protected final ColumnInfo _columnCreatedTime = cci("CREATED_TIME",
"CREATED_TIME", null, null, java.sql.Timestamp.class,
"createdTime", null, false, false, true, "TIMESTAMP", 23, 10, null,
false, null, null, null, null, null);
protected final ColumnInfo _columnUpdatedBy = cci("UPDATED_BY",
"UPDATED_BY", null, null, String.class, "updatedBy", null, false,
false, false, "VARCHAR", 255, 0, null, false, null, null, null,
null, null);
protected final ColumnInfo _columnUpdatedTime = cci("UPDATED_TIME",
"UPDATED_TIME", null, null, java.sql.Timestamp.class,
"updatedTime", null, false, false, false, "TIMESTAMP", 23, 10,
null, false, null, null, null, null, null);
protected final ColumnInfo _columnDeletedBy = cci("DELETED_BY",
"DELETED_BY", null, null, String.class, "deletedBy", null, false,
false, false, "VARCHAR", 255, 0, null, false, null, null, null,
null, null);
protected final ColumnInfo _columnDeletedTime = cci("DELETED_TIME",
"DELETED_TIME", null, null, java.sql.Timestamp.class,
"deletedTime", null, false, false, false, "TIMESTAMP", 23, 10,
null, false, null, null, null, null, null);
protected final ColumnInfo _columnVersionNo = cci("VERSION_NO",
"VERSION_NO", null, null, Integer.class, "versionNo", null, false,
false, true, "INTEGER", 10, 0, null, false,
OptimisticLockType.VERSION_NO, null, null, null, null);
/**
* ID: {PK, ID, NotNull, BIGINT(19)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnId() {
return _columnId;
}
/**
* URL_EXPR: {NotNull, VARCHAR(4000)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnUrlExpr() {
return _columnUrlExpr;
}
/**
* BOOST_EXPR: {NotNull, VARCHAR(4000)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnBoostExpr() {
return _columnBoostExpr;
}
/**
* SORT_ORDER: {NotNull, INTEGER(10)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnSortOrder() {
return _columnSortOrder;
}
/**
* CREATED_BY: {NotNull, VARCHAR(255)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnCreatedBy() {
return _columnCreatedBy;
}
/**
* CREATED_TIME: {NotNull, TIMESTAMP(23, 10)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnCreatedTime() {
return _columnCreatedTime;
}
/**
* UPDATED_BY: {VARCHAR(255)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnUpdatedBy() {
return _columnUpdatedBy;
}
/**
* UPDATED_TIME: {TIMESTAMP(23, 10)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnUpdatedTime() {
return _columnUpdatedTime;
}
/**
* DELETED_BY: {VARCHAR(255)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnDeletedBy() {
return _columnDeletedBy;
}
/**
* DELETED_TIME: {TIMESTAMP(23, 10)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnDeletedTime() {
return _columnDeletedTime;
}
/**
* VERSION_NO: {NotNull, INTEGER(10)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnVersionNo() {
return _columnVersionNo;
}
@Override
protected List<ColumnInfo> ccil() {
final List<ColumnInfo> ls = newArrayList();
ls.add(columnId());
ls.add(columnUrlExpr());
ls.add(columnBoostExpr());
ls.add(columnSortOrder());
ls.add(columnCreatedBy());
ls.add(columnCreatedTime());
ls.add(columnUpdatedBy());
ls.add(columnUpdatedTime());
ls.add(columnDeletedBy());
ls.add(columnDeletedTime());
ls.add(columnVersionNo());
return ls;
}
{
initializeInformationResource();
}
// ===================================================================================
// Unique Info
// ===========
// -----------------------------------------------------
// Primary Element
// ---------------
@Override
protected UniqueInfo cpui() {
return hpcpui(columnId());
}
@Override
public boolean hasPrimaryKey() {
return true;
}
@Override
public boolean hasCompoundPrimaryKey() {
return false;
}
// ===================================================================================
// Relation Info
// =============
// cannot cache because it uses related DB meta instance while booting
// (instead, cached by super's collection)
// -----------------------------------------------------
// Foreign Property
// ----------------
// -----------------------------------------------------
// Referrer Property
// -----------------
// ===================================================================================
// Various Info
// ============
@Override
public boolean hasIdentity() {
return true;
}
@Override
public boolean hasVersionNo() {
return true;
}
@Override
public ColumnInfo getVersionNoColumnInfo() {
return _columnVersionNo;
}
// ===================================================================================
// Type Name
// =========
@Override
public String getEntityTypeName() {
return "jp.sf.fess.db.exentity.BoostDocumentRule";
}
@Override
public String getConditionBeanTypeName() {
return "jp.sf.fess.db.cbean.BoostDocumentRuleCB";
}
@Override
public String getBehaviorTypeName() {
return "jp.sf.fess.db.exbhv.BoostDocumentRuleBhv";
}
// ===================================================================================
// Object Type
// ===========
@Override
public Class<BoostDocumentRule> getEntityType() {
return BoostDocumentRule.class;
}
// ===================================================================================
// Object Instance
// ===============
@Override
public BoostDocumentRule newEntity() {
return new BoostDocumentRule();
}
public BoostDocumentRule newMyEntity() {
return new BoostDocumentRule();
}
// ===================================================================================
// Map Communication
// =================
@Override
public void acceptPrimaryKeyMap(final Entity et,
final Map<String, ? extends Object> mp) {
doAcceptPrimaryKeyMap((BoostDocumentRule) et, mp);
}
@Override
public void acceptAllColumnMap(final Entity et,
final Map<String, ? extends Object> mp) {
doAcceptAllColumnMap((BoostDocumentRule) et, mp);
}
@Override
public Map<String, Object> extractPrimaryKeyMap(final Entity et) {
return doExtractPrimaryKeyMap(et);
}
@Override
public Map<String, Object> extractAllColumnMap(final Entity et) {
return doExtractAllColumnMap(et);
}
}

View file

@ -197,7 +197,7 @@ public class ClickLogDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_1C4461A0_8D02_4547_BE0E_3178BBF09289",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_AE95CA21_D229_4F94_BB27_1C5304BCCAE7",
false, null, null, null, null, null);
protected final ColumnInfo _columnSearchId = cci("SEARCH_ID", "SEARCH_ID",

View file

@ -184,7 +184,7 @@ public class CrawlingSessionDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_86E39EF1_506E_49C7_919A_335F7363C6EE",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_418E8D15_C49A_4774_8DED_C81C870868B8",
false, null, null, null, "crawlingSessionInfoList", null);
protected final ColumnInfo _columnSessionId = cci("SESSION_ID",

View file

@ -210,7 +210,7 @@ public class CrawlingSessionInfoDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_E5E807B1_85D9_481E_9BF7_8CE454A49335",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_29DD8876_FC93_4DBC_99ED_A5DB7B4192B6",
false, null, null, null, null, null);
protected final ColumnInfo _columnCrawlingSessionId = cci(

View file

@ -199,7 +199,7 @@ public class DataConfigToLabelTypeMappingDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_9598A6F0_57BF_424A_99E2_BC2B484B294E",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_1F48F9B6_F3A1_4D33_9BE2_433B5D6C3018",
false, null, null, null, null, null);
protected final ColumnInfo _columnDataConfigId = cci("DATA_CONFIG_ID",

View file

@ -199,7 +199,7 @@ public class DataConfigToRoleTypeMappingDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_E34A2367_6704_437E_9EE0_B5E3E3C8331D",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_300FB2ED_6799_4994_A551_59917B5AC058",
false, null, null, null, null, null);
protected final ColumnInfo _columnDataConfigId = cci("DATA_CONFIG_ID",

View file

@ -314,7 +314,7 @@ public class DataCrawlingConfigDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_278EE728_8AF5_49C3_AD88_4E244E2ADCD3",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_5851DAB8_EEE1_40A9_AD4C_63E3783E9984",
false, null, null, null,
"dataConfigToLabelTypeMappingList,dataConfigToRoleTypeMappingList",
null);

View file

@ -222,7 +222,7 @@ public class FailureUrlDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_4FF7C61F_EA19_46A8_AD20_9C681D07CA6A",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_275DAA65_E8B1_48D7_AC90_CAC87877E583",
false, null, null, null, null, null);
protected final ColumnInfo _columnUrl = cci("URL", "URL", null, null,

View file

@ -197,7 +197,7 @@ public class FavoriteLogDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_00130965_7882_4795_A93F_D65309A1B482",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_1C39C16E_1BD4_4B10_8B71_2339D929A3CB",
false, null, null, null, null, null);
protected final ColumnInfo _columnUserId = cci("USER_ID", "USER_ID", null,

View file

@ -341,7 +341,7 @@ public class FileAuthenticationDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_E661CD0A_DFB5_49EA_9DDC_A77B303BC06A",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_57E14B65_6683_4409_9BC0_4CCB7DFFB677",
false, null, null, null, null, null);
protected final ColumnInfo _columnHostname = cci("HOSTNAME", "HOSTNAME",

View file

@ -199,7 +199,7 @@ public class FileConfigToLabelTypeMappingDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_E2C38DC8_5424_4E72_BE70_DA5CD73398ED",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_9F525E8F_8FA0_43E4_91DA_4482B4A2D7A9",
false, null, null, null, null, null);
protected final ColumnInfo _columnFileConfigId = cci("FILE_CONFIG_ID",

View file

@ -199,7 +199,7 @@ public class FileConfigToRoleTypeMappingDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_753BD317_B84F_44B6_804F_A15B41D531BD",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_0E8E967B_45AF_45B3_BFF5_54A9DCD38376",
false, null, null, null, null, null);
protected final ColumnInfo _columnFileConfigId = cci("FILE_CONFIG_ID",

View file

@ -405,7 +405,7 @@ public class FileCrawlingConfigDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_FE7EF642_99AD_4E9E_B3AB_DA2A78E5F974",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_92C9BA4B_DAC0_4884_8CD3_7B05BDD9AD3C",
false,
null,
null,

View file

@ -235,7 +235,7 @@ public class JobLogDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_18428598_57ED_471A_8B9C_911274CEE79E",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_05A68D8C_FBBB_4144_97A9_4F66452123EE",
false, null, null, null, null, null);
protected final ColumnInfo _columnJobName = cci("JOB_NAME", "JOB_NAME",

View file

@ -274,7 +274,7 @@ public class KeyMatchDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_625A1706_CD07_4633_868A_6845956B2285",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_49E4DBD0_2D86_4C3C_8FB2_0BBBFC00FE29",
false, null, null, null, null, null);
protected final ColumnInfo _columnTerm = cci("TERM", "TERM", null, null,

View file

@ -288,7 +288,7 @@ public class LabelTypeDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_39EA4F20_1968_4E93_9F48_EDD8DD9A25B2",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_EDC5E40D_5414_428B_A8CE_221673E1F528",
false,
null,
null,

View file

@ -198,7 +198,7 @@ public class LabelTypeToRoleTypeMappingDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_EBC6D553_E53B_4789_8B97_BA3ECC49A013",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_E182F353_BF93_4A0C_AB63_35943DD6862B",
false, null, null, null, null, null);
protected final ColumnInfo _columnLabelTypeId = cci("LABEL_TYPE_ID",

View file

@ -261,7 +261,7 @@ public class OverlappingHostDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_1754F480_A0A6_476F_BA83_17293AD5DBFE",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_7831BA07_C376_450B_BFBA_69716B6395E1",
false, null, null, null, null, null);
protected final ColumnInfo _columnRegularName = cci("REGULAR_NAME",

View file

@ -275,7 +275,7 @@ public class PathMappingDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_99FAF328_55B8_4575_A678_CDBD4AEF08A9",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_517DE2D9_E34C_4896_8AED_9F4601BF195C",
false, null, null, null, null, null);
protected final ColumnInfo _columnRegex = cci("REGEX", "REGEX", null, null,

View file

@ -288,7 +288,7 @@ public class RequestHeaderDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_2B556B07_8FAA_4D93_A710_76083509BE1B",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_05567061_C6AA_4536_BDB5_59C3D86B630E",
false, null, null, null, null, null);
protected final ColumnInfo _columnName = cci("NAME", "NAME", null, null,

View file

@ -262,7 +262,7 @@ public class RoleTypeDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_8E1E8109_9B47_4727_9690_CE17BF777340",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_98A73057_DD05_44E8_BE5A_EB50044424D0",
false,
null,
null,

View file

@ -339,7 +339,7 @@ public class ScheduledJobDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_B76470FB_53A8_401B_9095_426F84B5B7B8",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_B6A4FF05_ABF5_4436_B82A_CC1845FCFBA1",
false, null, null, null, null, null);
protected final ColumnInfo _columnName = cci("NAME", "NAME", null, null,

View file

@ -197,7 +197,7 @@ public class SearchFieldLogDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_65FE5119_EB8F_467C_BE7A_43D53B162A90",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_9073D7B3_DAA5_4428_9A25_73DFA7973FA0",
false, null, null, null, null, null);
protected final ColumnInfo _columnSearchId = cci("SEARCH_ID", "SEARCH_ID",

View file

@ -316,7 +316,7 @@ public class SearchLogDbm extends AbstractDBMeta {
"BIGINT",
19,
0,
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_C9A95574_1382_47A1_9C54_F71929A22BDA",
"NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_8609B14F_3D70_4BDE_8BE0_9559075768F5",
false, null, null, null, "clickLogList,searchFieldLogList", null);
protected final ColumnInfo _columnSearchWord = cci("SEARCH_WORD",

Some files were not shown because too many files have changed in this diff Show more