diff --git a/src/main/config/tablemeta.properties b/src/main/config/tablemeta.properties index 0efdb0399..5119ea1d3 100644 --- a/src/main/config/tablemeta.properties +++ b/src/main/config/tablemeta.properties @@ -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= diff --git a/src/main/h2/webapp/WEB-INF/db/fess.mv.db b/src/main/h2/webapp/WEB-INF/db/fess.mv.db index c27d7dedd..19d455ef2 100644 Binary files a/src/main/h2/webapp/WEB-INF/db/fess.mv.db and b/src/main/h2/webapp/WEB-INF/db/fess.mv.db differ diff --git a/src/main/java/jp/sf/fess/Constants.java b/src/main/java/jp/sf/fess/Constants.java index 435eb6795..7461aaf5f 100644 --- a/src/main/java/jp/sf/fess/Constants.java +++ b/src/main/java/jp/sf/fess/Constants.java @@ -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}]|(&&)|(\\|\\|))"); // "*", "?", diff --git a/src/main/java/jp/sf/fess/action/admin/BoostDocumentRuleAction.java b/src/main/java/jp/sf/fess/action/admin/BoostDocumentRuleAction.java new file mode 100644 index 000000000..20095bff8 --- /dev/null +++ b/src/main/java/jp/sf/fess/action/admin/BoostDocumentRuleAction.java @@ -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"); + } + } +} diff --git a/src/main/java/jp/sf/fess/action/admin/CrawlAction.java b/src/main/java/jp/sf/fess/action/admin/CrawlAction.java index e810c110f..cb7892b98 100644 --- a/src/main/java/jp/sf/fess/action/admin/CrawlAction.java +++ b/src/main/java/jp/sf/fess/action/admin/CrawlAction.java @@ -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); diff --git a/src/main/java/jp/sf/fess/action/admin/SuggestBadWordAction.java b/src/main/java/jp/sf/fess/action/admin/SuggestBadWordAction.java new file mode 100644 index 000000000..bf6041e17 --- /dev/null +++ b/src/main/java/jp/sf/fess/action/admin/SuggestBadWordAction.java @@ -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"); + } + } +} diff --git a/src/main/java/jp/sf/fess/action/admin/SuggestElevateWordAction.java b/src/main/java/jp/sf/fess/action/admin/SuggestElevateWordAction.java new file mode 100644 index 000000000..b86fabecd --- /dev/null +++ b/src/main/java/jp/sf/fess/action/admin/SuggestElevateWordAction.java @@ -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"); + } + } +} diff --git a/src/main/java/jp/sf/fess/action/admin/SystemAction.java b/src/main/java/jp/sf/fess/action/admin/SystemAction.java index c705e15cd..93bed1c4b 100644 --- a/src/main/java/jp/sf/fess/action/admin/SystemAction.java +++ b/src/main/java/jp/sf/fess/action/admin/SystemAction.java @@ -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); } diff --git a/src/main/java/jp/sf/fess/api/xml/XmlApiManager.java b/src/main/java/jp/sf/fess/api/xml/XmlApiManager.java index 868bec22d..e5d9ddf2e 100644 --- a/src/main/java/jp/sf/fess/api/xml/XmlApiManager.java +++ b/src/main/java/jp/sf/fess/api/xml/XmlApiManager.java @@ -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(""); + .append(escapeXml(fEntry.getKey())).append("\">"); for (final Map.Entry>> aEntry : fEntry .getValue().entrySet()) { buf.append(""); + .append(escapeXml(aEntry.getKey())) + .append("\">"); for (final Map dataMap : aEntry .getValue()) { buf.append(""); @@ -538,10 +538,10 @@ public class XmlApiManager extends BaseApiManager implements WebApiManager { final Object value = dEntry.getValue(); if (StringUtil.isNotBlank(key) && value != null) { buf.append("") - .append(escapeXml(value)) - .append(""); + .append(escapeXml(key)) + .append("\">") + .append(escapeXml(value)) + .append(""); } } buf.append(""); @@ -605,8 +605,8 @@ public class XmlApiManager extends BaseApiManager implements WebApiManager { for (final Map.Entry entry : ((Map) obj).entrySet()) { buf.append("").append(escapeXml(entry.getKey())) - .append("") - .append(escapeXml(entry.getValue())).append(""); + .append("") + .append(escapeXml(entry.getValue())).append(""); } buf.append(""); } else if (obj instanceof Date) { diff --git a/src/main/java/jp/sf/fess/crud/action/admin/BsBoostDocumentRuleAction.java b/src/main/java/jp/sf/fess/crud/action/admin/BsBoostDocumentRuleAction.java new file mode 100644 index 000000000..d1ef3f430 --- /dev/null +++ b/src/main/java/jp/sf/fess/crud/action/admin/BsBoostDocumentRuleAction.java @@ -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 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 createKeyMap() { + final Map keys = new HashMap(); + + keys.put("id", boostDocumentRuleForm.id); + + return keys; + } +} diff --git a/src/main/java/jp/sf/fess/crud/action/admin/BsSuggestBadWordAction.java b/src/main/java/jp/sf/fess/crud/action/admin/BsSuggestBadWordAction.java new file mode 100644 index 000000000..ccc59dae2 --- /dev/null +++ b/src/main/java/jp/sf/fess/crud/action/admin/BsSuggestBadWordAction.java @@ -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 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 createKeyMap() { + final Map keys = new HashMap(); + + keys.put("id", suggestBadWordForm.id); + + return keys; + } +} diff --git a/src/main/java/jp/sf/fess/crud/action/admin/BsSuggestElevateWordAction.java b/src/main/java/jp/sf/fess/crud/action/admin/BsSuggestElevateWordAction.java new file mode 100644 index 000000000..61d7a4fc7 --- /dev/null +++ b/src/main/java/jp/sf/fess/crud/action/admin/BsSuggestElevateWordAction.java @@ -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 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 createKeyMap() { + final Map keys = new HashMap(); + + keys.put("id", suggestElevateWordForm.id); + + return keys; + } +} diff --git a/src/main/java/jp/sf/fess/crud/form/admin/BsBoostDocumentRuleForm.java b/src/main/java/jp/sf/fess/crud/form/admin/BsBoostDocumentRuleForm.java new file mode 100644 index 000000000..178879deb --- /dev/null +++ b/src/main/java/jp/sf/fess/crud/form/admin/BsBoostDocumentRuleForm.java @@ -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 searchParams = new HashMap(); + + @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; + + } + +} diff --git a/src/main/java/jp/sf/fess/crud/form/admin/BsDataCrawlingConfigForm.java b/src/main/java/jp/sf/fess/crud/form/admin/BsDataCrawlingConfigForm.java index 39befaf6e..e9e1c2cf8 100644 --- a/src/main/java/jp/sf/fess/crud/form/admin/BsDataCrawlingConfigForm.java +++ b/src/main/java/jp/sf/fess/crud/form/admin/BsDataCrawlingConfigForm.java @@ -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") diff --git a/src/main/java/jp/sf/fess/crud/form/admin/BsFileCrawlingConfigForm.java b/src/main/java/jp/sf/fess/crud/form/admin/BsFileCrawlingConfigForm.java index e9fdd0a33..613471cb9 100644 --- a/src/main/java/jp/sf/fess/crud/form/admin/BsFileCrawlingConfigForm.java +++ b/src/main/java/jp/sf/fess/crud/form/admin/BsFileCrawlingConfigForm.java @@ -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") diff --git a/src/main/java/jp/sf/fess/crud/form/admin/BsSuggestBadWordForm.java b/src/main/java/jp/sf/fess/crud/form/admin/BsSuggestBadWordForm.java new file mode 100644 index 000000000..0569463e1 --- /dev/null +++ b/src/main/java/jp/sf/fess/crud/form/admin/BsSuggestBadWordForm.java @@ -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 searchParams = new HashMap(); + + @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; + + } + +} diff --git a/src/main/java/jp/sf/fess/crud/form/admin/BsSuggestElevateWordForm.java b/src/main/java/jp/sf/fess/crud/form/admin/BsSuggestElevateWordForm.java new file mode 100644 index 000000000..a20f4a7d1 --- /dev/null +++ b/src/main/java/jp/sf/fess/crud/form/admin/BsSuggestElevateWordForm.java @@ -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 searchParams = new HashMap(); + + @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; + + } + +} diff --git a/src/main/java/jp/sf/fess/crud/pager/BsBoostDocumentRulePager.java b/src/main/java/jp/sf/fess/crud/pager/BsBoostDocumentRulePager.java new file mode 100644 index 000000000..315c9eac7 --- /dev/null +++ b/src/main/java/jp/sf/fess/crud/pager/BsBoostDocumentRulePager.java @@ -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 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 getPageNumberList() { + return pageNumberList; + } + + public void setPageNumberList(final List pageNumberList) { + this.pageNumberList = pageNumberList; + } +} diff --git a/src/main/java/jp/sf/fess/crud/pager/BsSuggestBadWordPager.java b/src/main/java/jp/sf/fess/crud/pager/BsSuggestBadWordPager.java new file mode 100644 index 000000000..f310a76c6 --- /dev/null +++ b/src/main/java/jp/sf/fess/crud/pager/BsSuggestBadWordPager.java @@ -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 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 getPageNumberList() { + return pageNumberList; + } + + public void setPageNumberList(final List pageNumberList) { + this.pageNumberList = pageNumberList; + } +} diff --git a/src/main/java/jp/sf/fess/crud/pager/BsSuggestElevateWordPager.java b/src/main/java/jp/sf/fess/crud/pager/BsSuggestElevateWordPager.java new file mode 100644 index 000000000..bf6c871f8 --- /dev/null +++ b/src/main/java/jp/sf/fess/crud/pager/BsSuggestElevateWordPager.java @@ -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 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 getPageNumberList() { + return pageNumberList; + } + + public void setPageNumberList(final List pageNumberList) { + this.pageNumberList = pageNumberList; + } +} diff --git a/src/main/java/jp/sf/fess/crud/service/BsBoostDocumentRuleService.java b/src/main/java/jp/sf/fess/crud/service/BsBoostDocumentRuleService.java new file mode 100644 index 000000000..46efed4ac --- /dev/null +++ b/src/main/java/jp/sf/fess/crud/service/BsBoostDocumentRuleService.java @@ -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 getBoostDocumentRuleList( + final BoostDocumentRulePager boostDocumentRulePager) { + + final BoostDocumentRuleCB cb = new BoostDocumentRuleCB(); + + cb.fetchFirst(boostDocumentRulePager.getPageSize()); + cb.fetchPage(boostDocumentRulePager.getCurrentPageNumber()); + + setupListCondition(cb, boostDocumentRulePager); + + final PagingResultBean 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 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 keys) { + } + + protected void setupStoreCondition(final BoostDocumentRule boostDocumentRule) { + } + + protected void setupDeleteCondition( + final BoostDocumentRule boostDocumentRule) { + } +} \ No newline at end of file diff --git a/src/main/java/jp/sf/fess/crud/service/BsSuggestBadWordService.java b/src/main/java/jp/sf/fess/crud/service/BsSuggestBadWordService.java new file mode 100644 index 000000000..8238ed25d --- /dev/null +++ b/src/main/java/jp/sf/fess/crud/service/BsSuggestBadWordService.java @@ -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 getSuggestBadWordList( + final SuggestBadWordPager suggestBadWordPager) { + + final SuggestBadWordCB cb = new SuggestBadWordCB(); + + cb.fetchFirst(suggestBadWordPager.getPageSize()); + cb.fetchPage(suggestBadWordPager.getCurrentPageNumber()); + + setupListCondition(cb, suggestBadWordPager); + + final PagingResultBean 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 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 keys) { + } + + protected void setupStoreCondition(final SuggestBadWord suggestBadWord) { + } + + protected void setupDeleteCondition(final SuggestBadWord suggestBadWord) { + } +} \ No newline at end of file diff --git a/src/main/java/jp/sf/fess/crud/service/BsSuggestElevateWordService.java b/src/main/java/jp/sf/fess/crud/service/BsSuggestElevateWordService.java new file mode 100644 index 000000000..7420ddadd --- /dev/null +++ b/src/main/java/jp/sf/fess/crud/service/BsSuggestElevateWordService.java @@ -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 getSuggestElevateWordList( + final SuggestElevateWordPager suggestElevateWordPager) { + + final SuggestElevateWordCB cb = new SuggestElevateWordCB(); + + cb.fetchFirst(suggestElevateWordPager.getPageSize()); + cb.fetchPage(suggestElevateWordPager.getCurrentPageNumber()); + + setupListCondition(cb, suggestElevateWordPager); + + final PagingResultBean 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 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 keys) { + } + + protected void setupStoreCondition( + final SuggestElevateWord suggestElevateWord) { + } + + protected void setupDeleteCondition( + final SuggestElevateWord suggestElevateWord) { + } +} \ No newline at end of file diff --git a/src/main/java/jp/sf/fess/db/allcommon/CDef.java b/src/main/java/jp/sf/fess/db/allcommon/CDef.java index e7bddd260..400a441bd 100644 --- a/src/main/java/jp/sf/fess/db/allcommon/CDef.java +++ b/src/main/java/jp/sf/fess/db/allcommon/CDef.java @@ -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 + } } } diff --git a/src/main/java/jp/sf/fess/db/allcommon/DBFluteConfig.java b/src/main/java/jp/sf/fess/db/allcommon/DBFluteConfig.java index 199b184b8..844a6f52e 100644 --- a/src/main/java/jp/sf/fess/db/allcommon/DBFluteConfig.java +++ b/src/main/java/jp/sf/fess/db/allcommon/DBFluteConfig.java @@ -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.
+ * 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}
+ * Set whether an empty string for query is allowed or not.
* 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}
+ * Set whether an empty string for parameter is allowed or not.
* 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}
+ * Set whether overriding query is allowed or not.
* 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; } // =================================================================================== diff --git a/src/main/java/jp/sf/fess/db/allcommon/DBMetaInstanceHandler.java b/src/main/java/jp/sf/fess/db/allcommon/DBMetaInstanceHandler.java index d21831679..a5b339306 100644 --- a/src/main/java/jp/sf/fess/db/allcommon/DBMetaInstanceHandler.java +++ b/src/main/java/jp/sf/fess/db/allcommon/DBMetaInstanceHandler.java @@ -47,6 +47,8 @@ public class DBMetaInstanceHandler implements DBMetaProvider { protected static final Map _tableDbNameClassNameMap; static { final Map 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"); diff --git a/src/main/java/jp/sf/fess/db/allcommon/ImplementedBehaviorSelector.java b/src/main/java/jp/sf/fess/db/allcommon/ImplementedBehaviorSelector.java index b6fc5eb0e..236b72496 100644 --- a/src/main/java/jp/sf/fess/db/allcommon/ImplementedBehaviorSelector.java +++ b/src/main/java/jp/sf/fess/db/allcommon/ImplementedBehaviorSelector.java @@ -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); } diff --git a/src/main/java/jp/sf/fess/db/allcommon/ImplementedSqlClauseCreator.java b/src/main/java/jp/sf/fess/db/allcommon/ImplementedSqlClauseCreator.java index 9c2cf5d4a..708e8fe70 100644 --- a/src/main/java/jp/sf/fess/db/allcommon/ImplementedSqlClauseCreator.java +++ b/src/main/java/jp/sf/fess/db/allcommon/ImplementedSqlClauseCreator.java @@ -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() { diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsBoostDocumentRuleBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsBoostDocumentRuleBhv.java new file mode 100644 index 000000000..15b2d998e --- /dev/null +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsBoostDocumentRuleBhv.java @@ -0,0 +1,1257 @@ +/* + * 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; + +import java.util.List; + +import jp.sf.fess.db.bsbhv.loader.LoaderOfBoostDocumentRule; +import jp.sf.fess.db.bsentity.dbmeta.BoostDocumentRuleDbm; +import jp.sf.fess.db.cbean.BoostDocumentRuleCB; +import jp.sf.fess.db.exbhv.BoostDocumentRuleBhv; +import jp.sf.fess.db.exentity.BoostDocumentRule; + +import org.seasar.dbflute.Entity; +import org.seasar.dbflute.bhv.AbstractBehaviorWritable; +import org.seasar.dbflute.bhv.DeleteOption; +import org.seasar.dbflute.bhv.InsertOption; +import org.seasar.dbflute.bhv.QueryInsertSetupper; +import org.seasar.dbflute.bhv.ReferrerLoaderHandler; +import org.seasar.dbflute.bhv.UpdateOption; +import org.seasar.dbflute.cbean.ConditionBean; +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.HpSLSFunction; +import org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException; +import org.seasar.dbflute.exception.DangerousResultSizeException; +import org.seasar.dbflute.exception.EntityAlreadyDeletedException; +import org.seasar.dbflute.exception.EntityAlreadyExistsException; +import org.seasar.dbflute.exception.EntityAlreadyUpdatedException; +import org.seasar.dbflute.exception.EntityDuplicatedException; +import org.seasar.dbflute.exception.NonQueryDeleteNotAllowedException; +import org.seasar.dbflute.exception.NonQueryUpdateNotAllowedException; +import org.seasar.dbflute.exception.SelectEntityConditionNotFoundException; +import org.seasar.dbflute.optional.OptionalEntity; +import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor; + +/** + * The behavior of BOOST_DOCUMENT_RULE as TABLE.
+ *
+ * [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]
+ *
+ * 
+ * @author DBFlute(AutoGenerator) + */ +public abstract class BsBoostDocumentRuleBhv extends + AbstractBehaviorWritable { + + // =================================================================================== + // Definition + // ========== + /*df:beginQueryPath*/ + /*df:endQueryPath*/ + + // =================================================================================== + // DBMeta + // ====== + /** {@inheritDoc} */ + @Override + public BoostDocumentRuleDbm getDBMeta() { + return BoostDocumentRuleDbm.getInstance(); + } + + /** @return The instance of DBMeta as my table type. (NotNull) */ + public BoostDocumentRuleDbm getMyDBMeta() { + return BoostDocumentRuleDbm.getInstance(); + } + + // =================================================================================== + // New Instance + // ============ + /** {@inheritDoc} */ + @Override + public BoostDocumentRuleCB newConditionBean() { + return new BoostDocumentRuleCB(); + } + + /** @return The instance of new entity as my table type. (NotNull) */ + public BoostDocumentRule newMyEntity() { + return new BoostDocumentRule(); + } + + /** @return The instance of new condition-bean as my table type. (NotNull) */ + public BoostDocumentRuleCB newMyConditionBean() { + return new BoostDocumentRuleCB(); + } + + // =================================================================================== + // Count Select + // ============ + /** + * Select the count of uniquely-selected records by the condition-bean. {IgnorePagingCondition, IgnoreSpecifyColumn}
+ * SpecifyColumn is ignored but you can use it only to remove text type column for union's distinct. + *
+     * BoostDocumentRuleCB cb = new BoostDocumentRuleCB();
+     * cb.query().setFoo...(value);
+     * int count = boostDocumentRuleBhv.selectCount(cb);
+     * 
+ * @param cb The condition-bean of BoostDocumentRule. (NotNull) + * @return The count for the condition. (NotMinus) + */ + public int selectCount(final BoostDocumentRuleCB cb) { + return facadeSelectCount(cb); + } + + // =================================================================================== + // Entity Select + // ============= + /** + * Select the entity by the condition-bean. #beforejava8
+ * The return might be null if no data, so you should have null check.
+ * If the data always exists as your business rule, use selectEntityWithDeletedCheck(). + *
+     * BoostDocumentRuleCB cb = new BoostDocumentRuleCB();
+     * cb.query().setFoo...(value);
+     * BoostDocumentRule boostDocumentRule = boostDocumentRuleBhv.selectEntity(cb);
+     * if (boostDocumentRule != null) { // null check
+     *     ... = boostDocumentRule.get...();
+     * } else {
+     *     ...
+     * }
+     * 
+ * @param cb The condition-bean of BoostDocumentRule. (NotNull) + * @return The entity selected by the condition. (NullAllowed: if no data, it returns null) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception SelectEntityConditionNotFoundException When the condition for selecting an entity is not found. + */ + public BoostDocumentRule selectEntity(final BoostDocumentRuleCB cb) { + return facadeSelectEntity(cb); + } + + protected BoostDocumentRule facadeSelectEntity(final BoostDocumentRuleCB cb) { + return doSelectEntity(cb, typeOfSelectedEntity()); + } + + protected OptionalEntity doSelectOptionalEntity( + final BoostDocumentRuleCB cb, final Class tp) { + return createOptionalEntity(doSelectEntity(cb, tp), cb); + } + + @Override + protected Entity doReadEntity(final ConditionBean cb) { + return facadeSelectEntity(downcast(cb)); + } + + /** + * Select the entity by the condition-bean with deleted check.
+ * If the data always exists as your business rule, this method is good. + *
+     * BoostDocumentRuleCB cb = new BoostDocumentRuleCB();
+     * cb.query().setFoo...(value);
+     * BoostDocumentRule boostDocumentRule = boostDocumentRuleBhv.selectEntityWithDeletedCheck(cb);
+     * ... = boostDocumentRule.get...(); // the entity always be not null
+     * 
+ * @param cb The condition-bean of BoostDocumentRule. (NotNull) + * @return The entity selected by the condition. (NotNull: if no data, throws exception) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception SelectEntityConditionNotFoundException When the condition for selecting an entity is not found. + */ + public BoostDocumentRule selectEntityWithDeletedCheck( + final BoostDocumentRuleCB cb) { + return facadeSelectEntityWithDeletedCheck(cb); + } + + /** + * Select the entity by the primary-key value. + * @param id : PK, ID, NotNull, BIGINT(19). (NotNull) + * @return The entity selected by the PK. (NullAllowed: if no data, it returns null) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception SelectEntityConditionNotFoundException When the condition for selecting an entity is not found. + */ + public BoostDocumentRule selectByPKValue(final Long id) { + return facadeSelectByPKValue(id); + } + + protected BoostDocumentRule facadeSelectByPKValue(final Long id) { + return doSelectByPK(id, typeOfSelectedEntity()); + } + + protected ENTITY doSelectByPK( + final Long id, final Class tp) { + return doSelectEntity(xprepareCBAsPK(id), tp); + } + + protected OptionalEntity doSelectOptionalByPK( + final Long id, final Class tp) { + return createOptionalEntity(doSelectByPK(id, tp), id); + } + + /** + * Select the entity by the primary-key value with deleted check. + * @param id : PK, ID, NotNull, BIGINT(19). (NotNull) + * @return The entity selected by the PK. (NotNull: if no data, throws exception) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception SelectEntityConditionNotFoundException When the condition for selecting an entity is not found. + */ + public BoostDocumentRule selectByPKValueWithDeletedCheck(final Long id) { + return doSelectByPKWithDeletedCheck(id, typeOfSelectedEntity()); + } + + protected ENTITY doSelectByPKWithDeletedCheck( + final Long id, final Class tp) { + return doSelectEntityWithDeletedCheck(xprepareCBAsPK(id), tp); + } + + protected BoostDocumentRuleCB xprepareCBAsPK(final Long id) { + assertObjectNotNull("id", id); + return newConditionBean().acceptPK(id); + } + + // =================================================================================== + // List Select + // =========== + /** + * Select the list as result bean. + *
+     * BoostDocumentRuleCB cb = new BoostDocumentRuleCB();
+     * cb.query().setFoo...(value);
+     * cb.query().addOrderBy_Bar...();
+     * ListResultBean<BoostDocumentRule> boostDocumentRuleList = boostDocumentRuleBhv.selectList(cb);
+     * for (BoostDocumentRule boostDocumentRule : boostDocumentRuleList) {
+     *     ... = boostDocumentRule.get...();
+     * }
+     * 
+ * @param cb The condition-bean of BoostDocumentRule. (NotNull) + * @return The result bean of selected list. (NotNull: if no data, returns empty list) + * @exception DangerousResultSizeException When the result size is over the specified safety size. + */ + public ListResultBean selectList( + final BoostDocumentRuleCB cb) { + return facadeSelectList(cb); + } + + // =================================================================================== + // Page Select + // =========== + /** + * Select the page as result bean.
+ * (both count-select and paging-select are executed) + *
+     * BoostDocumentRuleCB cb = new BoostDocumentRuleCB();
+     * cb.query().setFoo...(value);
+     * cb.query().addOrderBy_Bar...();
+     * cb.paging(20, 3); // 20 records per a page and current page number is 3
+     * PagingResultBean<BoostDocumentRule> page = boostDocumentRuleBhv.selectPage(cb);
+     * int allRecordCount = page.getAllRecordCount();
+     * int allPageCount = page.getAllPageCount();
+     * boolean isExistPrePage = page.isExistPrePage();
+     * boolean isExistNextPage = page.isExistNextPage();
+     * ...
+     * for (BoostDocumentRule boostDocumentRule : page) {
+     *     ... = boostDocumentRule.get...();
+     * }
+     * 
+ * @param cb The condition-bean of BoostDocumentRule. (NotNull) + * @return The result bean of selected page. (NotNull: if no data, returns bean as empty list) + * @exception DangerousResultSizeException When the result size is over the specified safety size. + */ + public PagingResultBean selectPage( + final BoostDocumentRuleCB cb) { + return facadeSelectPage(cb); + } + + // =================================================================================== + // Cursor Select + // ============= + /** + * Select the cursor by the condition-bean. + *
+     * BoostDocumentRuleCB cb = new BoostDocumentRuleCB();
+     * cb.query().setFoo...(value);
+     * boostDocumentRuleBhv.selectCursor(cb, new EntityRowHandler<BoostDocumentRule>() {
+     *     public void handle(BoostDocumentRule entity) {
+     *         ... = entity.getFoo...();
+     *     }
+     * });
+     * 
+ * @param cb The condition-bean of BoostDocumentRule. (NotNull) + * @param entityRowHandler The handler of entity row of BoostDocumentRule. (NotNull) + */ + public void selectCursor(final BoostDocumentRuleCB cb, + final EntityRowHandler entityRowHandler) { + facadeSelectCursor(cb, entityRowHandler); + } + + // =================================================================================== + // Scalar Select + // ============= + /** + * Select the scalar value derived by a function from uniquely-selected records.
+ * You should call a function method after this method called like as follows: + *
+     * boostDocumentRuleBhv.scalarSelect(Date.class).max(new ScalarQuery() {
+     *     public void query(BoostDocumentRuleCB cb) {
+     *         cb.specify().columnFooDatetime(); // required for a function
+     *         cb.query().setBarName_PrefixSearch("S");
+     *     }
+     * });
+     * 
+ * @param The type of result. + * @param resultType The type of result. (NotNull) + * @return The scalar function object to specify function for scalar value. (NotNull) + */ + public HpSLSFunction scalarSelect( + final Class resultType) { + return facadeScalarSelect(resultType); + } + + // =================================================================================== + // Sequence + // ======== + @Override + protected Number doReadNextVal() { + final String msg = "This table is NOT related to sequence: " + + getTableDbName(); + throw new UnsupportedOperationException(msg); + } + + // =================================================================================== + // Load Referrer + // ============= + /** + * Load referrer by the the referrer loader.
+ *
+     * MemberCB cb = new MemberCB();
+     * cb.query().set...
+     * List<Member> memberList = memberBhv.selectList(cb);
+     * memberBhv.load(memberList, loader -> {
+     *     loader.loadPurchaseList(purchaseCB -> {
+     *         purchaseCB.query().set...
+     *         purchaseCB.query().addOrderBy_PurchasePrice_Desc();
+     *     }); // you can also load nested referrer from here
+     *     //}).withNestedList(purchaseLoader -> {
+     *     //    purchaseLoader.loadPurchasePaymentList(...);
+     *     //});
+     *
+     *     // you can also pull out foreign table and load its referrer
+     *     // (setupSelect of the foreign table should be called)
+     *     //loader.pulloutMemberStatus().loadMemberLoginList(...)
+     * }
+     * for (Member member : memberList) {
+     *     List<Purchase> purchaseList = member.getPurchaseList();
+     *     for (Purchase purchase : purchaseList) {
+     *         ...
+     *     }
+     * }
+     * 
+ * About internal policy, the value of primary key (and others too) is treated as case-insensitive.
+ * The condition-bean, which the set-upper provides, has order by FK before callback. + * @param boostDocumentRuleList The entity list of boostDocumentRule. (NotNull) + * @param handler The callback to handle the referrer loader for actually loading referrer. (NotNull) + */ + public void load(final List boostDocumentRuleList, + final ReferrerLoaderHandler handler) { + xassLRArg(boostDocumentRuleList, handler); + handler.handle(new LoaderOfBoostDocumentRule().ready( + boostDocumentRuleList, _behaviorSelector)); + } + + /** + * Load referrer of ${referrer.referrerJavaBeansRulePropertyName} by the referrer loader.
+ *
+     * MemberCB cb = new MemberCB();
+     * cb.query().set...
+     * Member member = memberBhv.selectEntityWithDeletedCheck(cb);
+     * memberBhv.load(member, loader -> {
+     *     loader.loadPurchaseList(purchaseCB -> {
+     *         purchaseCB.query().set...
+     *         purchaseCB.query().addOrderBy_PurchasePrice_Desc();
+     *     }); // you can also load nested referrer from here
+     *     //}).withNestedList(purchaseLoader -> {
+     *     //    purchaseLoader.loadPurchasePaymentList(...);
+     *     //});
+     *
+     *     // you can also pull out foreign table and load its referrer
+     *     // (setupSelect of the foreign table should be called)
+     *     //loader.pulloutMemberStatus().loadMemberLoginList(...)
+     * }
+     * for (Member member : memberList) {
+     *     List<Purchase> purchaseList = member.getPurchaseList();
+     *     for (Purchase purchase : purchaseList) {
+     *         ...
+     *     }
+     * }
+     * 
+ * About internal policy, the value of primary key (and others too) is treated as case-insensitive.
+ * The condition-bean, which the set-upper provides, has order by FK before callback. + * @param boostDocumentRule The entity of boostDocumentRule. (NotNull) + * @param handler The callback to handle the referrer loader for actually loading referrer. (NotNull) + */ + public void load(final BoostDocumentRule boostDocumentRule, + final ReferrerLoaderHandler handler) { + xassLRArg(boostDocumentRule, handler); + handler.handle(new LoaderOfBoostDocumentRule().ready( + xnewLRAryLs(boostDocumentRule), _behaviorSelector)); + } + + // =================================================================================== + // Pull out Relation + // ================= + // =================================================================================== + // Extract Column + // ============== + /** + * Extract the value list of (single) primary key id. + * @param boostDocumentRuleList The list of boostDocumentRule. (NotNull, EmptyAllowed) + * @return The list of the column value. (NotNull, EmptyAllowed, NotNullElement) + */ + public List extractIdList( + final List boostDocumentRuleList) { + return helpExtractListInternally(boostDocumentRuleList, "id"); + } + + // =================================================================================== + // Entity Update + // ============= + /** + * Insert the entity modified-only. (DefaultConstraintsEnabled) + *
+     * BoostDocumentRule boostDocumentRule = new BoostDocumentRule();
+     * // if auto-increment, you don't need to set the PK value
+     * boostDocumentRule.setFoo...(value);
+     * boostDocumentRule.setBar...(value);
+     * // you don't need to set values of common columns
+     * //boostDocumentRule.setRegisterUser(value);
+     * //boostDocumentRule.set...;
+     * boostDocumentRuleBhv.insert(boostDocumentRule);
+     * ... = boostDocumentRule.getPK...(); // if auto-increment, you can get the value after
+     * 
+ *

While, when the entity is created by select, all columns are registered.

+ * @param boostDocumentRule The entity of insert. (NotNull, PrimaryKeyNullAllowed: when auto-increment) + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void insert(final BoostDocumentRule boostDocumentRule) { + doInsert(boostDocumentRule, null); + } + + /** + * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl) + *
+     * BoostDocumentRule boostDocumentRule = new BoostDocumentRule();
+     * boostDocumentRule.setPK...(value); // required
+     * boostDocumentRule.setFoo...(value); // you should set only modified columns
+     * // you don't need to set values of common columns
+     * //boostDocumentRule.setRegisterUser(value);
+     * //boostDocumentRule.set...;
+     * // if exclusive control, the value of concurrency column is required
+     * boostDocumentRule.setVersionNo(value);
+     * try {
+     *     boostDocumentRuleBhv.update(boostDocumentRule);
+     * } catch (EntityAlreadyUpdatedException e) { // if concurrent update
+     *     ...
+     * }
+     * 
+ * @param boostDocumentRule The entity of update. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void update(final BoostDocumentRule boostDocumentRule) { + doUpdate(boostDocumentRule, null); + } + + /** + * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl) + *
+     * BoostDocumentRule boostDocumentRule = new BoostDocumentRule();
+     * boostDocumentRule.setPK...(value); // required
+     * boostDocumentRule.setFoo...(value); // you should set only modified columns
+     * // you don't need to set values of common columns
+     * //boostDocumentRule.setRegisterUser(value);
+     * //boostDocumentRule.set...;
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //boostDocumentRule.setVersionNo(value);
+     * boostDocumentRuleBhv.updateNonstrict(boostDocumentRule);
+     * 
+ * @param boostDocumentRule The entity of update. (NotNull, PrimaryKeyNotNull) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void updateNonstrict(final BoostDocumentRule boostDocumentRule) { + doUpdateNonstrict(boostDocumentRule, null); + } + + /** + * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl)
+ * if (the entity has no PK) { insert() } else { update(), but no data, insert() }
+ *

Attention, you cannot update by unique keys instead of PK.

+ * @param boostDocumentRule The entity of insert or update. (NotNull, ...depends on insert or update) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void insertOrUpdate(final BoostDocumentRule boostDocumentRule) { + doInsertOrUpdate(boostDocumentRule, null, null); + } + + /** + * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+ * if (the entity has no PK) { insert() } else { update(), but no data, insert() } + *

Attention, you cannot update by unique keys instead of PK.

+ * @param boostDocumentRule The entity of insert or update. (NotNull, ...depends on insert or update) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void insertOrUpdateNonstrict( + final BoostDocumentRule boostDocumentRule) { + doInsertOrUpdateNonstrict(boostDocumentRule, null, null); + } + + /** + * Delete the entity. (ZeroUpdateException, ExclusiveControl) + *
+     * BoostDocumentRule boostDocumentRule = new BoostDocumentRule();
+     * boostDocumentRule.setPK...(value); // required
+     * // if exclusive control, the value of concurrency column is required
+     * boostDocumentRule.setVersionNo(value);
+     * try {
+     *     boostDocumentRuleBhv.delete(boostDocumentRule);
+     * } catch (EntityAlreadyUpdatedException e) { // if concurrent update
+     *     ...
+     * }
+     * 
+ * @param boostDocumentRule The entity of delete. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + */ + public void delete(final BoostDocumentRule boostDocumentRule) { + doDelete(boostDocumentRule, null); + } + + /** + * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl} + *
+     * BoostDocumentRule boostDocumentRule = new BoostDocumentRule();
+     * boostDocumentRule.setPK...(value); // required
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //boostDocumentRule.setVersionNo(value);
+     * boostDocumentRuleBhv.deleteNonstrict(boostDocumentRule);
+     * 
+ * @param boostDocumentRule The entity of delete. (NotNull, PrimaryKeyNotNull) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + */ + public void deleteNonstrict(final BoostDocumentRule boostDocumentRule) { + doDeleteNonstrict(boostDocumentRule, null); + } + + /** + * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl} + *
+     * BoostDocumentRule boostDocumentRule = new BoostDocumentRule();
+     * boostDocumentRule.setPK...(value); // required
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //boostDocumentRule.setVersionNo(value);
+     * boostDocumentRuleBhv.deleteNonstrictIgnoreDeleted(boostDocumentRule);
+     * // if the target entity doesn't exist, no exception
+     * 
+ * @param boostDocumentRule The entity of delete. (NotNull, PrimaryKeyNotNull) + * @exception EntityDuplicatedException When the entity has been duplicated. + */ + public void deleteNonstrictIgnoreDeleted( + final BoostDocumentRule boostDocumentRule) { + doDeleteNonstrictIgnoreDeleted(boostDocumentRule, null); + } + + protected void doDeleteNonstrictIgnoreDeleted(final BoostDocumentRule et, + final DeleteOption op) { + assertObjectNotNull("boostDocumentRule", et); + prepareDeleteOption(op); + helpDeleteNonstrictIgnoreDeletedInternally(et, op); + } + + // =================================================================================== + // Batch Update + // ============ + /** + * Batch-insert the entity list modified-only of same-set columns. (DefaultConstraintsEnabled)
+ * This method uses executeBatch() of java.sql.PreparedStatement.
+ *

The columns of least common multiple are registered like this:

+ *
+     * for (... : ...) {
+     *     BoostDocumentRule boostDocumentRule = new BoostDocumentRule();
+     *     boostDocumentRule.setFooName("foo");
+     *     if (...) {
+     *         boostDocumentRule.setFooPrice(123);
+     *     }
+     *     // FOO_NAME and FOO_PRICE (and record meta columns) are registered
+     *     // FOO_PRICE not-called in any entities are registered as null without default value
+     *     // columns not-called in all entities are registered as null or default value
+     *     boostDocumentRuleList.add(boostDocumentRule);
+     * }
+     * boostDocumentRuleBhv.batchInsert(boostDocumentRuleList);
+     * 
+ *

While, when the entities are created by select, all columns are registered.

+ *

And if the table has an identity, entities after the process don't have incremented values. + * (When you use the (normal) insert(), you can get the incremented value from your entity)

+ * @param boostDocumentRuleList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment) + * @return The array of inserted count. (NotNull, EmptyAllowed) + */ + public int[] batchInsert(final List boostDocumentRuleList) { + return doBatchInsert(boostDocumentRuleList, null); + } + + /** + * Batch-update the entity list modified-only of same-set columns. (ExclusiveControl)
+ * This method uses executeBatch() of java.sql.PreparedStatement.
+ * You should specify same-set columns to all entities like this: + *
+     * for (... : ...) {
+     *     BoostDocumentRule boostDocumentRule = new BoostDocumentRule();
+     *     boostDocumentRule.setFooName("foo");
+     *     if (...) {
+     *         boostDocumentRule.setFooPrice(123);
+     *     } else {
+     *         boostDocumentRule.setFooPrice(null); // updated as null
+     *         //boostDocumentRule.setFooDate(...); // *not allowed, fragmented
+     *     }
+     *     // FOO_NAME and FOO_PRICE (and record meta columns) are updated
+     *     // (others are not updated: their values are kept)
+     *     boostDocumentRuleList.add(boostDocumentRule);
+     * }
+     * boostDocumentRuleBhv.batchUpdate(boostDocumentRuleList);
+     * 
+ * @param boostDocumentRuleList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + * @exception BatchEntityAlreadyUpdatedException When the entity has already been updated. This exception extends EntityAlreadyUpdatedException. + */ + public int[] batchUpdate(final List boostDocumentRuleList) { + return doBatchUpdate(boostDocumentRuleList, null); + } + + /** + * Batch-update the entity list specified-only. (ExclusiveControl)
+ * This method uses executeBatch() of java.sql.PreparedStatement. + *
+     * // e.g. update two columns only
+     * boostDocumentRuleBhv.batchUpdate(boostDocumentRuleList, new SpecifyQuery() {
+     *     public void specify(BoostDocumentRuleCB cb) { // the two only updated
+     *         cb.specify().columnFooStatusCode(); // should be modified in any entities
+     *         cb.specify().columnBarDate(); // should be modified in any entities
+     *     }
+     * });
+     * // e.g. update every column in the table
+     * boostDocumentRuleBhv.batchUpdate(boostDocumentRuleList, new SpecifyQuery() {
+     *     public void specify(BoostDocumentRuleCB cb) { // all columns are updated
+     *         cb.specify().columnEveryColumn(); // no check of modified properties
+     *     }
+     * });
+     * 
+ *

You can specify update columns used on set clause of update statement. + * However you do not need to specify common columns for update + * and an optimistic lock column because they are specified implicitly.

+ *

And you should specify columns that are modified in any entities (at least one entity). + * But if you specify every column, it has no check.

+ * @param boostDocumentRuleList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @param updateColumnSpec The specification of update columns. (NotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + * @exception BatchEntityAlreadyUpdatedException When the entity has already been updated. This exception extends EntityAlreadyUpdatedException. + */ + public int[] batchUpdate( + final List boostDocumentRuleList, + final SpecifyQuery updateColumnSpec) { + return doBatchUpdate(boostDocumentRuleList, + createSpecifiedUpdateOption(updateColumnSpec)); + } + + /** + * Batch-update the entity list non-strictly modified-only of same-set columns. (NonExclusiveControl)
+ * This method uses executeBatch() of java.sql.PreparedStatement.
+ * You should specify same-set columns to all entities like this: + *
+     * for (... : ...) {
+     *     BoostDocumentRule boostDocumentRule = new BoostDocumentRule();
+     *     boostDocumentRule.setFooName("foo");
+     *     if (...) {
+     *         boostDocumentRule.setFooPrice(123);
+     *     } else {
+     *         boostDocumentRule.setFooPrice(null); // updated as null
+     *         //boostDocumentRule.setFooDate(...); // *not allowed, fragmented
+     *     }
+     *     // FOO_NAME and FOO_PRICE (and record meta columns) are updated
+     *     // (others are not updated: their values are kept)
+     *     boostDocumentRuleList.add(boostDocumentRule);
+     * }
+     * boostDocumentRuleBhv.batchUpdate(boostDocumentRuleList);
+     * 
+ * @param boostDocumentRuleList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + */ + public int[] batchUpdateNonstrict( + final List boostDocumentRuleList) { + return doBatchUpdateNonstrict(boostDocumentRuleList, null); + } + + /** + * Batch-update the entity list non-strictly specified-only. (NonExclusiveControl)
+ * This method uses executeBatch() of java.sql.PreparedStatement. + *
+     * // e.g. update two columns only
+     * boostDocumentRuleBhv.batchUpdateNonstrict(boostDocumentRuleList, new SpecifyQuery() {
+     *     public void specify(BoostDocumentRuleCB cb) { // the two only updated
+     *         cb.specify().columnFooStatusCode(); // should be modified in any entities
+     *         cb.specify().columnBarDate(); // should be modified in any entities
+     *     }
+     * });
+     * // e.g. update every column in the table
+     * boostDocumentRuleBhv.batchUpdateNonstrict(boostDocumentRuleList, new SpecifyQuery() {
+     *     public void specify(BoostDocumentRuleCB cb) { // all columns are updated
+     *         cb.specify().columnEveryColumn(); // no check of modified properties
+     *     }
+     * });
+     * 
+ *

You can specify update columns used on set clause of update statement. + * However you do not need to specify common columns for update + * and an optimistic lock column because they are specified implicitly.

+ *

And you should specify columns that are modified in any entities (at least one entity).

+ * @param boostDocumentRuleList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param updateColumnSpec The specification of update columns. (NotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + */ + public int[] batchUpdateNonstrict( + final List boostDocumentRuleList, + final SpecifyQuery updateColumnSpec) { + return doBatchUpdateNonstrict(boostDocumentRuleList, + createSpecifiedUpdateOption(updateColumnSpec)); + } + + /** + * Batch-delete the entity list. (ExclusiveControl)
+ * This method uses executeBatch() of java.sql.PreparedStatement. + * @param boostDocumentRuleList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @return The array of deleted count. (NotNull, EmptyAllowed) + * @exception BatchEntityAlreadyUpdatedException When the entity has already been updated. This exception extends EntityAlreadyUpdatedException. + */ + public int[] batchDelete(final List boostDocumentRuleList) { + return doBatchDelete(boostDocumentRuleList, null); + } + + /** + * Batch-delete the entity list non-strictly. {NonExclusiveControl}
+ * This method uses executeBatch() of java.sql.PreparedStatement. + * @param boostDocumentRuleList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @return The array of deleted count. (NotNull, EmptyAllowed) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + */ + public int[] batchDeleteNonstrict( + final List boostDocumentRuleList) { + return doBatchDeleteNonstrict(boostDocumentRuleList, null); + } + + // =================================================================================== + // Query Update + // ============ + /** + * Insert the several entities by query (modified-only for fixed value). + *
+     * boostDocumentRuleBhv.queryInsert(new QueryInsertSetupper<BoostDocumentRule, BoostDocumentRuleCB>() {
+     *     public ConditionBean setup(BoostDocumentRule entity, BoostDocumentRuleCB intoCB) {
+     *         FooCB cb = FooCB();
+     *         cb.setupSelect_Bar();
+     *
+     *         // mapping
+     *         intoCB.specify().columnMyName().mappedFrom(cb.specify().columnFooName());
+     *         intoCB.specify().columnMyCount().mappedFrom(cb.specify().columnFooCount());
+     *         intoCB.specify().columnMyDate().mappedFrom(cb.specify().specifyBar().columnBarDate());
+     *         entity.setMyFixedValue("foo"); // fixed value
+     *         // you don't need to set values of common columns
+     *         //entity.setRegisterUser(value);
+     *         //entity.set...;
+     *         // you don't need to set a value of concurrency column
+     *         //entity.setVersionNo(value);
+     *
+     *         return cb;
+     *     }
+     * });
+     * 
+ * @param setupper The set-upper of query-insert. (NotNull) + * @return The inserted count. + */ + public int queryInsert( + final QueryInsertSetupper setupper) { + return doQueryInsert(setupper, null); + } + + /** + * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) + *
+     * BoostDocumentRule boostDocumentRule = new BoostDocumentRule();
+     * // you don't need to set PK value
+     * //boostDocumentRule.setPK...(value);
+     * boostDocumentRule.setFoo...(value); // you should set only modified columns
+     * // you don't need to set values of common columns
+     * //boostDocumentRule.setRegisterUser(value);
+     * //boostDocumentRule.set...;
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //boostDocumentRule.setVersionNo(value);
+     * BoostDocumentRuleCB cb = new BoostDocumentRuleCB();
+     * cb.query().setFoo...(value);
+     * boostDocumentRuleBhv.queryUpdate(boostDocumentRule, cb);
+     * 
+ * @param boostDocumentRule The entity that contains update values. (NotNull, PrimaryKeyNullAllowed) + * @param cb The condition-bean of BoostDocumentRule. (NotNull) + * @return The updated count. + * @exception NonQueryUpdateNotAllowedException When the query has no condition. + */ + public int queryUpdate(final BoostDocumentRule boostDocumentRule, + final BoostDocumentRuleCB cb) { + return doQueryUpdate(boostDocumentRule, cb, null); + } + + /** + * Delete the several entities by query. (NonExclusiveControl) + *
+     * BoostDocumentRuleCB cb = new BoostDocumentRuleCB();
+     * cb.query().setFoo...(value);
+     * boostDocumentRuleBhv.queryDelete(boostDocumentRule, cb);
+     * 
+ * @param cb The condition-bean of BoostDocumentRule. (NotNull) + * @return The deleted count. + * @exception NonQueryDeleteNotAllowedException When the query has no condition. + */ + public int queryDelete(final BoostDocumentRuleCB cb) { + return doQueryDelete(cb, null); + } + + // =================================================================================== + // Varying Update + // ============== + // ----------------------------------------------------- + // Entity Update + // ------------- + /** + * Insert the entity with varying requests.
+ * For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
+ * Other specifications are same as insert(entity). + *
+     * BoostDocumentRule boostDocumentRule = new BoostDocumentRule();
+     * // if auto-increment, you don't need to set the PK value
+     * boostDocumentRule.setFoo...(value);
+     * boostDocumentRule.setBar...(value);
+     * InsertOption option = new InsertOption();
+     * // you can insert by your values for common columns
+     * option.disableCommonColumnAutoSetup();
+     * boostDocumentRuleBhv.varyingInsert(boostDocumentRule, option);
+     * ... = boostDocumentRule.getPK...(); // if auto-increment, you can get the value after
+     * 
+ * @param boostDocumentRule The entity of insert. (NotNull, PrimaryKeyNullAllowed: when auto-increment) + * @param option The option of insert for varying requests. (NotNull) + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void varyingInsert(final BoostDocumentRule boostDocumentRule, + final InsertOption option) { + assertInsertOptionNotNull(option); + doInsert(boostDocumentRule, option); + } + + /** + * Update the entity with varying requests modified-only. (ZeroUpdateException, ExclusiveControl)
+ * For example, self(selfCalculationSpecification), specify(updateColumnSpecification), disableCommonColumnAutoSetup().
+ * Other specifications are same as update(entity). + *
+     * BoostDocumentRule boostDocumentRule = new BoostDocumentRule();
+     * boostDocumentRule.setPK...(value); // required
+     * boostDocumentRule.setOther...(value); // you should set only modified columns
+     * // if exclusive control, the value of concurrency column is required
+     * boostDocumentRule.setVersionNo(value);
+     * try {
+     *     // you can update by self calculation values
+     *     UpdateOption<BoostDocumentRuleCB> option = new UpdateOption<BoostDocumentRuleCB>();
+     *     option.self(new SpecifyQuery<BoostDocumentRuleCB>() {
+     *         public void specify(BoostDocumentRuleCB cb) {
+     *             cb.specify().columnXxxCount();
+     *         }
+     *     }).plus(1); // XXX_COUNT = XXX_COUNT + 1
+     *     boostDocumentRuleBhv.varyingUpdate(boostDocumentRule, option);
+     * } catch (EntityAlreadyUpdatedException e) { // if concurrent update
+     *     ...
+     * }
+     * 
+ * @param boostDocumentRule The entity of update. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @param option The option of update for varying requests. (NotNull) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void varyingUpdate(final BoostDocumentRule boostDocumentRule, + final UpdateOption option) { + assertUpdateOptionNotNull(option); + doUpdate(boostDocumentRule, option); + } + + /** + * Update the entity with varying requests non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
+ * For example, self(selfCalculationSpecification), specify(updateColumnSpecification), disableCommonColumnAutoSetup().
+ * Other specifications are same as updateNonstrict(entity). + *
+     * // ex) you can update by self calculation values
+     * BoostDocumentRule boostDocumentRule = new BoostDocumentRule();
+     * boostDocumentRule.setPK...(value); // required
+     * boostDocumentRule.setOther...(value); // you should set only modified columns
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //boostDocumentRule.setVersionNo(value);
+     * UpdateOption<BoostDocumentRuleCB> option = new UpdateOption<BoostDocumentRuleCB>();
+     * option.self(new SpecifyQuery<BoostDocumentRuleCB>() {
+     *     public void specify(BoostDocumentRuleCB cb) {
+     *         cb.specify().columnFooCount();
+     *     }
+     * }).plus(1); // FOO_COUNT = FOO_COUNT + 1
+     * boostDocumentRuleBhv.varyingUpdateNonstrict(boostDocumentRule, option);
+     * 
+ * @param boostDocumentRule The entity of update. (NotNull, PrimaryKeyNotNull) + * @param option The option of update for varying requests. (NotNull) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void varyingUpdateNonstrict( + final BoostDocumentRule boostDocumentRule, + final UpdateOption option) { + assertUpdateOptionNotNull(option); + doUpdateNonstrict(boostDocumentRule, option); + } + + /** + * Insert or update the entity with varying requests. (ExclusiveControl: when update)
+ * Other specifications are same as insertOrUpdate(entity). + * @param boostDocumentRule The entity of insert or update. (NotNull) + * @param insertOption The option of insert for varying requests. (NotNull) + * @param updateOption The option of update for varying requests. (NotNull) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void varyingInsertOrUpdate( + final BoostDocumentRule boostDocumentRule, + final InsertOption insertOption, + final UpdateOption updateOption) { + assertInsertOptionNotNull(insertOption); + assertUpdateOptionNotNull(updateOption); + doInsertOrUpdate(boostDocumentRule, insertOption, updateOption); + } + + /** + * Insert or update the entity with varying requests non-strictly. (NonExclusiveControl: when update)
+ * Other specifications are same as insertOrUpdateNonstrict(entity). + * @param boostDocumentRule The entity of insert or update. (NotNull) + * @param insertOption The option of insert for varying requests. (NotNull) + * @param updateOption The option of update for varying requests. (NotNull) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void varyingInsertOrUpdateNonstrict( + final BoostDocumentRule boostDocumentRule, + final InsertOption insertOption, + final UpdateOption updateOption) { + assertInsertOptionNotNull(insertOption); + assertUpdateOptionNotNull(updateOption); + doInsertOrUpdateNonstrict(boostDocumentRule, insertOption, updateOption); + } + + /** + * Delete the entity with varying requests. (ZeroUpdateException, ExclusiveControl)
+ * Now a valid option does not exist.
+ * Other specifications are same as delete(entity). + * @param boostDocumentRule The entity of delete. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @param option The option of update for varying requests. (NotNull) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + */ + public void varyingDelete(final BoostDocumentRule boostDocumentRule, + final DeleteOption option) { + assertDeleteOptionNotNull(option); + doDelete(boostDocumentRule, option); + } + + /** + * Delete the entity with varying requests non-strictly. (ZeroUpdateException, NonExclusiveControl)
+ * Now a valid option does not exist.
+ * Other specifications are same as deleteNonstrict(entity). + * @param boostDocumentRule The entity of delete. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @param option The option of update for varying requests. (NotNull) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + */ + public void varyingDeleteNonstrict( + final BoostDocumentRule boostDocumentRule, + final DeleteOption option) { + assertDeleteOptionNotNull(option); + doDeleteNonstrict(boostDocumentRule, option); + } + + // ----------------------------------------------------- + // Batch Update + // ------------ + /** + * Batch-insert the list with varying requests.
+ * For example, disableCommonColumnAutoSetup() + * , disablePrimaryKeyIdentity(), limitBatchInsertLogging().
+ * Other specifications are same as batchInsert(entityList). + * @param boostDocumentRuleList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param option The option of insert for varying requests. (NotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + */ + public int[] varyingBatchInsert( + final List boostDocumentRuleList, + final InsertOption option) { + assertInsertOptionNotNull(option); + return doBatchInsert(boostDocumentRuleList, option); + } + + /** + * Batch-update the list with varying requests.
+ * For example, self(selfCalculationSpecification), specify(updateColumnSpecification) + * , disableCommonColumnAutoSetup(), limitBatchUpdateLogging().
+ * Other specifications are same as batchUpdate(entityList). + * @param boostDocumentRuleList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param option The option of update for varying requests. (NotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + */ + public int[] varyingBatchUpdate( + final List boostDocumentRuleList, + final UpdateOption option) { + assertUpdateOptionNotNull(option); + return doBatchUpdate(boostDocumentRuleList, option); + } + + /** + * Batch-update the list with varying requests non-strictly.
+ * For example, self(selfCalculationSpecification), specify(updateColumnSpecification) + * , disableCommonColumnAutoSetup(), limitBatchUpdateLogging().
+ * Other specifications are same as batchUpdateNonstrict(entityList). + * @param boostDocumentRuleList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param option The option of update for varying requests. (NotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + */ + public int[] varyingBatchUpdateNonstrict( + final List boostDocumentRuleList, + final UpdateOption option) { + assertUpdateOptionNotNull(option); + return doBatchUpdateNonstrict(boostDocumentRuleList, option); + } + + /** + * Batch-delete the list with varying requests.
+ * For example, limitBatchDeleteLogging().
+ * Other specifications are same as batchDelete(entityList). + * @param boostDocumentRuleList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param option The option of delete for varying requests. (NotNull) + * @return The array of deleted count. (NotNull, EmptyAllowed) + */ + public int[] varyingBatchDelete( + final List boostDocumentRuleList, + final DeleteOption option) { + assertDeleteOptionNotNull(option); + return doBatchDelete(boostDocumentRuleList, option); + } + + /** + * Batch-delete the list with varying requests non-strictly.
+ * For example, limitBatchDeleteLogging().
+ * Other specifications are same as batchDeleteNonstrict(entityList). + * @param boostDocumentRuleList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param option The option of delete for varying requests. (NotNull) + * @return The array of deleted count. (NotNull, EmptyAllowed) + */ + public int[] varyingBatchDeleteNonstrict( + final List boostDocumentRuleList, + final DeleteOption option) { + assertDeleteOptionNotNull(option); + return doBatchDeleteNonstrict(boostDocumentRuleList, option); + } + + // ----------------------------------------------------- + // Query Update + // ------------ + /** + * Insert the several entities by query with varying requests (modified-only for fixed value).
+ * For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
+ * Other specifications are same as queryInsert(entity, setupper). + * @param setupper The set-upper of query-insert. (NotNull) + * @param option The option of insert for varying requests. (NotNull) + * @return The inserted count. + */ + public int varyingQueryInsert( + final QueryInsertSetupper setupper, + final InsertOption option) { + assertInsertOptionNotNull(option); + return doQueryInsert(setupper, option); + } + + /** + * Update the several entities by query with varying requests non-strictly modified-only. {NonExclusiveControl}
+ * For example, self(selfCalculationSpecification), specify(updateColumnSpecification) + * , disableCommonColumnAutoSetup(), allowNonQueryUpdate().
+ * Other specifications are same as queryUpdate(entity, cb). + *
+     * // ex) you can update by self calculation values
+     * BoostDocumentRule boostDocumentRule = new BoostDocumentRule();
+     * // you don't need to set PK value
+     * //boostDocumentRule.setPK...(value);
+     * boostDocumentRule.setOther...(value); // you should set only modified columns
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //boostDocumentRule.setVersionNo(value);
+     * BoostDocumentRuleCB cb = new BoostDocumentRuleCB();
+     * cb.query().setFoo...(value);
+     * UpdateOption<BoostDocumentRuleCB> option = new UpdateOption<BoostDocumentRuleCB>();
+     * option.self(new SpecifyQuery<BoostDocumentRuleCB>() {
+     *     public void specify(BoostDocumentRuleCB cb) {
+     *         cb.specify().columnFooCount();
+     *     }
+     * }).plus(1); // FOO_COUNT = FOO_COUNT + 1
+     * boostDocumentRuleBhv.varyingQueryUpdate(boostDocumentRule, cb, option);
+     * 
+ * @param boostDocumentRule The entity that contains update values. (NotNull) {PrimaryKeyNotRequired} + * @param cb The condition-bean of BoostDocumentRule. (NotNull) + * @param option The option of update for varying requests. (NotNull) + * @return The updated count. + * @exception NonQueryUpdateNotAllowedException When the query has no condition (if not allowed). + */ + public int varyingQueryUpdate(final BoostDocumentRule boostDocumentRule, + final BoostDocumentRuleCB cb, + final UpdateOption option) { + assertUpdateOptionNotNull(option); + return doQueryUpdate(boostDocumentRule, cb, option); + } + + /** + * Delete the several entities by query with varying requests non-strictly.
+ * For example, allowNonQueryDelete().
+ * Other specifications are same as batchUpdateNonstrict(entityList). + * @param cb The condition-bean of BoostDocumentRule. (NotNull) + * @param option The option of delete for varying requests. (NotNull) + * @return The deleted count. + * @exception NonQueryDeleteNotAllowedException When the query has no condition (if not allowed). + */ + public int varyingQueryDelete(final BoostDocumentRuleCB cb, + final DeleteOption option) { + assertDeleteOptionNotNull(option); + return doQueryDelete(cb, option); + } + + // =================================================================================== + // OutsideSql + // ========== + /** + * Prepare the basic executor of outside-SQL to execute it.
+ * The invoker of behavior command should be not null when you call this method. + *
+     * You can use the methods for outside-SQL are as follows:
+     * {Basic}
+     *   o selectList()
+     *   o execute()
+     *   o call()
+     *
+     * {Entity}
+     *   o entityHandling().selectEntity()
+     *   o entityHandling().selectEntityWithDeletedCheck()
+     *
+     * {Paging}
+     *   o autoPaging().selectList()
+     *   o autoPaging().selectPage()
+     *   o manualPaging().selectList()
+     *   o manualPaging().selectPage()
+     *
+     * {Cursor}
+     *   o cursorHandling().selectCursor()
+     *
+     * {Option}
+     *   o dynamicBinding().selectList()
+     *   o removeBlockComment().selectList()
+     *   o removeLineComment().selectList()
+     *   o formatSql().selectList()
+     * 
+ * @return The basic executor of outside-SQL. (NotNull) + */ + public OutsideSqlBasicExecutor outsideSql() { + return doOutsideSql(); + } + + // =================================================================================== + // Optimistic Lock Info + // ==================== + @Override + protected boolean hasVersionNoValue(final Entity et) { + return downcast(et).getVersionNo() != null; + } + + // =================================================================================== + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { + return BoostDocumentRule.class; + } + + @Override + protected Class typeOfHandlingEntity() { + return BoostDocumentRule.class; + } + + @Override + protected Class typeOfHandlingConditionBean() { + return BoostDocumentRuleCB.class; + } +} diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsClickLogBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsClickLogBhv.java index 2c1089ff5..826c36370 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsClickLogBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsClickLogBhv.java @@ -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; * * @author DBFlute(AutoGenerator) */ -public abstract class BsClickLogBhv extends AbstractBehaviorWritable { +public abstract class BsClickLogBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final ClickLogCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final ClickLogCB cb, final Class tp) { + final ClickLogCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final ClickLogCB cb, final Class 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 doSelectByPK(final Long id, - final Class tp) { + final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -326,20 +270,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList(final ClickLogCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final ClickLogCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage(final ClickLogCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final ClickLogCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final ClickLogCB cb, final EntityRowHandler handler, - final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("clickLog", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption(final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) *
@@ -650,49 +507,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
         doUpdate(clickLog, null);
     }
 
-    protected void doUpdate(final ClickLog et, final UpdateOption op) {
-        assertObjectNotNull("clickLog", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doModify(et, op);
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -706,27 +520,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable { doInsertOrUpdate(clickLog, null, null); } - protected void doInsertOrUpdate(final ClickLog et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("clickLog", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doCreateOrModify(et, iop, uop); - } - /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) *
@@ -748,30 +541,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
         doDelete(clickLog, null);
     }
 
-    protected void doDelete(final ClickLog et, final DeleteOption op) {
-        assertObjectNotNull("clickLog", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("clickLogList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -857,31 +600,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable { return doBatchUpdate(clickLogList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("clickLogList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (NonExclusiveControl)
* 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 ls, - final UpdateOption op) { - return doLumpModify(ls, op); - } - /** * Batch-delete the entity list. (NonExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("clickLogList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * clickLogBhv.queryInsert(new QueryInsertSetupper<ClickLog, ClickLogCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1065,20 +720,6 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final ClickLogCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return ClickLog.class; } - protected ClickLog downcast(final Entity et) { - return helpEntityDowncastInternally(et, ClickLog.class); + @Override + protected Class typeOfHandlingEntity() { + return ClickLog.class; } - protected ClickLogCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, ClickLogCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return ClickLogCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsCrawlingSessionBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsCrawlingSessionBhv.java index 3066e6c11..8e7b5950e 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsCrawlingSessionBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsCrawlingSessionBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable { +public abstract class BsCrawlingSessionBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final CrawlingSessionCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final CrawlingSessionCB cb, final Class tp) { + final CrawlingSessionCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final CrawlingSessionCB cb, final Class 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 doSelectByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -330,21 +273,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final CrawlingSessionCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final CrawlingSessionCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage( - final CrawlingSessionCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final CrawlingSessionCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final CrawlingSessionCB cb, final EntityRowHandler handler, - final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("crawlingSession", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption(final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) *
@@ -763,50 +616,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
         doUpdate(crawlingSession, null);
     }
 
-    protected void doUpdate(final CrawlingSession et,
-            final UpdateOption op) {
-        assertObjectNotNull("crawlingSession", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doModify(et, op);
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -820,27 +629,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable { doInsertOrUpdate(crawlingSession, null, null); } - protected void doInsertOrUpdate(final CrawlingSession et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("crawlingSession", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doCreateOrModify(et, iop, uop); - } - /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) *
@@ -862,31 +650,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
         doDelete(crawlingSession, null);
     }
 
-    protected void doDelete(final CrawlingSession et,
-            final DeleteOption op) {
-        assertObjectNotNull("crawlingSession", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("crawlingSessionList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -972,31 +709,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable { return doBatchUpdate(crawlingSessionList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("crawlingSessionList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (NonExclusiveControl)
* 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 ls, - final UpdateOption op) { - return doLumpModify(ls, op); - } - /** * Batch-delete the entity list. (NonExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("crawlingSessionList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * crawlingSessionBhv.queryInsert(new QueryInsertSetupper<CrawlingSession, CrawlingSessionCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1181,20 +830,6 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final CrawlingSessionCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return CrawlingSession.class; } - protected CrawlingSession downcast(final Entity et) { - return helpEntityDowncastInternally(et, CrawlingSession.class); + @Override + protected Class typeOfHandlingEntity() { + return CrawlingSession.class; } - protected CrawlingSessionCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, CrawlingSessionCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return CrawlingSessionCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsCrawlingSessionInfoBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsCrawlingSessionInfoBhv.java index d330b8037..febf3034e 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsCrawlingSessionInfoBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsCrawlingSessionInfoBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable { +public abstract class BsCrawlingSessionInfoBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final CrawlingSessionInfoCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final CrawlingSessionInfoCB cb, final Class tp) { + final CrawlingSessionInfoCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final CrawlingSessionInfoCB cb, final Class 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 doSelectByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -328,21 +271,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final CrawlingSessionInfoCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final CrawlingSessionInfoCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage( - final CrawlingSessionInfoCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final CrawlingSessionInfoCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final CrawlingSessionInfoCB cb, - final EntityRowHandler handler, final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("crawlingSessionInfo", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption( - final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) *
@@ -659,51 +511,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
         doUpdate(crawlingSessionInfo, null);
     }
 
-    protected void doUpdate(final CrawlingSessionInfo et,
-            final UpdateOption op) {
-        assertObjectNotNull("crawlingSessionInfo", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(
-            final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doModify(et, op);
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -717,27 +524,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable doInsertOrUpdate(crawlingSessionInfo, null, null); } - protected void doInsertOrUpdate(final CrawlingSessionInfo et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("crawlingSessionInfo", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doCreateOrModify(et, iop, uop); - } - /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) *
@@ -759,32 +545,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
         doDelete(crawlingSessionInfo, null);
     }
 
-    protected void doDelete(final CrawlingSessionInfo et,
-            final DeleteOption op) {
-        assertObjectNotNull("crawlingSessionInfo", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(
-            final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("crawlingSessionInfoList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -872,31 +606,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable return doBatchUpdate(crawlingSessionInfoList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("crawlingSessionInfoList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (NonExclusiveControl)
* 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 ls, - final UpdateOption op) { - return doLumpModify(ls, op); - } - /** * Batch-delete the entity list. (NonExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("crawlingSessionInfoList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * crawlingSessionInfoBhv.queryInsert(new QueryInsertSetupper<CrawlingSessionInfo, CrawlingSessionInfoCB>() {
-     *     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
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1084,20 +729,6 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final CrawlingSessionInfoCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return CrawlingSessionInfo.class; } - protected CrawlingSessionInfo downcast(final Entity et) { - return helpEntityDowncastInternally(et, CrawlingSessionInfo.class); + @Override + protected Class typeOfHandlingEntity() { + return CrawlingSessionInfo.class; } - protected CrawlingSessionInfoCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, - CrawlingSessionInfoCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return CrawlingSessionInfoCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToLabelTypeMappingBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToLabelTypeMappingBhv.java index 659810c63..45f7625a7 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToLabelTypeMappingBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToLabelTypeMappingBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsDataConfigToLabelTypeMappingBhv extends - AbstractBehaviorWritable { +public abstract class BsDataConfigToLabelTypeMappingBhv + extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final DataConfigToLabelTypeMappingCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final DataConfigToLabelTypeMappingCB cb, final Class tp) { + final DataConfigToLabelTypeMappingCB cb, + final Class 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 doSelectEntityWithDeletedCheck( - final DataConfigToLabelTypeMappingCB cb, final Class 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 doSelectByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -332,21 +276,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final DataConfigToLabelTypeMappingCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final DataConfigToLabelTypeMappingCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean doReadList(final ConditionBean cb) { - return facadeSelectList(downcast(cb)); - } - // =================================================================================== // Page Select // =========== @@ -377,22 +306,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends return facadeSelectPage(cb); } - protected PagingResultBean facadeSelectPage( - final DataConfigToLabelTypeMappingCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final DataConfigToLabelTypeMappingCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final DataConfigToLabelTypeMappingCB cb, - final EntityRowHandler handler, final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("dataConfigToLabelTypeMapping", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption( - final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) *
@@ -681,51 +533,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
         doUpdate(dataConfigToLabelTypeMapping, null);
     }
 
-    protected void doUpdate(final DataConfigToLabelTypeMapping et,
-            final UpdateOption op) {
-        assertObjectNotNull("dataConfigToLabelTypeMapping", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(
-            final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doModify(et, op);
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -740,27 +547,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends doInsertOrUpdate(dataConfigToLabelTypeMapping, null, null); } - protected void doInsertOrUpdate(final DataConfigToLabelTypeMapping et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("dataConfigToLabelTypeMapping", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doCreateOrModify(et, iop, uop); - } - /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) *
@@ -783,32 +569,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
         doDelete(dataConfigToLabelTypeMapping, null);
     }
 
-    protected void doDelete(final DataConfigToLabelTypeMapping et,
-            final DeleteOption op) {
-        assertObjectNotNull("dataConfigToLabelTypeMapping", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(
-            final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption op) {
-        doRemove(et, op);
-    }
-
     // ===================================================================================
     //                                                                        Batch Update
     //                                                                        ============
@@ -841,33 +601,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
         return doBatchInsert(dataConfigToLabelTypeMappingList, null);
     }
 
-    protected int[] doBatchInsert(final List ls,
-            final InsertOption op) {
-        assertObjectNotNull("dataConfigToLabelTypeMappingList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(
-            final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -897,32 +630,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends return doBatchUpdate(dataConfigToLabelTypeMappingList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("dataConfigToLabelTypeMappingList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption( - final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (NonExclusiveControl)
* 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 ls, - final UpdateOption op) { - return doLumpModify(ls, op); - } - /** * Batch-delete the entity list. (NonExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("dataConfigToLabelTypeMappingList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * dataConfigToLabelTypeMappingBhv.queryInsert(new QueryInsertSetupper<DataConfigToLabelTypeMapping, DataConfigToLabelTypeMappingCB>() {
-     *     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
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1111,20 +754,6 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final DataConfigToLabelTypeMappingCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return DataConfigToLabelTypeMapping.class; } - protected DataConfigToLabelTypeMapping downcast(final Entity et) { - return helpEntityDowncastInternally(et, - DataConfigToLabelTypeMapping.class); + @Override + protected Class typeOfHandlingEntity() { + return DataConfigToLabelTypeMapping.class; } - protected DataConfigToLabelTypeMappingCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, - DataConfigToLabelTypeMappingCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast( - final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return DataConfigToLabelTypeMappingCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToRoleTypeMappingBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToRoleTypeMappingBhv.java index e77d57987..67254e581 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToRoleTypeMappingBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToRoleTypeMappingBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsDataConfigToRoleTypeMappingBhv extends - AbstractBehaviorWritable { +public abstract class BsDataConfigToRoleTypeMappingBhv + extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final DataConfigToRoleTypeMappingCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final DataConfigToRoleTypeMappingCB cb, final Class tp) { + final DataConfigToRoleTypeMappingCB cb, + final Class 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 doSelectEntityWithDeletedCheck( - final DataConfigToRoleTypeMappingCB cb, final Class 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 doSelectByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -332,21 +276,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final DataConfigToRoleTypeMappingCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final DataConfigToRoleTypeMappingCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean doReadList(final ConditionBean cb) { - return facadeSelectList(downcast(cb)); - } - // =================================================================================== // Page Select // =========== @@ -377,22 +306,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends return facadeSelectPage(cb); } - protected PagingResultBean facadeSelectPage( - final DataConfigToRoleTypeMappingCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final DataConfigToRoleTypeMappingCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final DataConfigToRoleTypeMappingCB cb, - final EntityRowHandler handler, final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("dataConfigToRoleTypeMapping", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption( - final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) *
@@ -679,51 +532,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
         doUpdate(dataConfigToRoleTypeMapping, null);
     }
 
-    protected void doUpdate(final DataConfigToRoleTypeMapping et,
-            final UpdateOption op) {
-        assertObjectNotNull("dataConfigToRoleTypeMapping", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(
-            final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doModify(et, op);
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -738,27 +546,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends doInsertOrUpdate(dataConfigToRoleTypeMapping, null, null); } - protected void doInsertOrUpdate(final DataConfigToRoleTypeMapping et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("dataConfigToRoleTypeMapping", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doCreateOrModify(et, iop, uop); - } - /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) *
@@ -781,32 +568,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
         doDelete(dataConfigToRoleTypeMapping, null);
     }
 
-    protected void doDelete(final DataConfigToRoleTypeMapping et,
-            final DeleteOption op) {
-        assertObjectNotNull("dataConfigToRoleTypeMapping", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(
-            final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption op) {
-        doRemove(et, op);
-    }
-
     // ===================================================================================
     //                                                                        Batch Update
     //                                                                        ============
@@ -839,33 +600,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
         return doBatchInsert(dataConfigToRoleTypeMappingList, null);
     }
 
-    protected int[] doBatchInsert(final List ls,
-            final InsertOption op) {
-        assertObjectNotNull("dataConfigToRoleTypeMappingList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(
-            final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -895,32 +629,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends return doBatchUpdate(dataConfigToRoleTypeMappingList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("dataConfigToRoleTypeMappingList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption( - final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (NonExclusiveControl)
* 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 ls, - final UpdateOption op) { - return doLumpModify(ls, op); - } - /** * Batch-delete the entity list. (NonExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("dataConfigToRoleTypeMappingList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * dataConfigToRoleTypeMappingBhv.queryInsert(new QueryInsertSetupper<DataConfigToRoleTypeMapping, DataConfigToRoleTypeMappingCB>() {
-     *     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
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1109,20 +753,6 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final DataConfigToRoleTypeMappingCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return DataConfigToRoleTypeMapping.class; } - protected DataConfigToRoleTypeMapping downcast(final Entity et) { - return helpEntityDowncastInternally(et, - DataConfigToRoleTypeMapping.class); + @Override + protected Class typeOfHandlingEntity() { + return DataConfigToRoleTypeMapping.class; } - protected DataConfigToRoleTypeMappingCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, - DataConfigToRoleTypeMappingCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast( - final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return DataConfigToRoleTypeMappingCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsDataCrawlingConfigBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsDataCrawlingConfigBhv.java index 00354ece6..d303705a1 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsDataCrawlingConfigBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsDataCrawlingConfigBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable { +public abstract class BsDataCrawlingConfigBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final DataCrawlingConfigCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final DataCrawlingConfigCB cb, final Class tp) { + final DataCrawlingConfigCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final DataCrawlingConfigCB cb, final Class 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 doSelectByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -336,21 +279,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final DataCrawlingConfigCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final DataCrawlingConfigCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage( - final DataCrawlingConfigCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final DataCrawlingConfigCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final DataCrawlingConfigCB cb, - final EntityRowHandler handler, final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("dataCrawlingConfig", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption( - final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl) *
@@ -883,45 +735,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
         doUpdate(dataCrawlingConfig, null);
     }
 
-    protected void doUpdate(final DataCrawlingConfig et,
-            final UpdateOption op) {
-        assertObjectNotNull("dataCrawlingConfig", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(
-            final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
     /**
      * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
      * 
@@ -945,19 +758,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
         doUpdateNonstrict(dataCrawlingConfig, null);
     }
 
-    protected void doUpdateNonstrict(final DataCrawlingConfig et,
-            final UpdateOption op) {
-        assertObjectNotNull("dataCrawlingConfig", et);
-        prepareUpdateOption(op);
-        helpUpdateNonstrictInternally(et, op);
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doUpdateNonstrict(downcast(et), downcast(op));
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -971,20 +771,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable { doInsertOrUpdate(dataCrawlingConfig, null, null); } - protected void doInsertOrUpdate(final DataCrawlingConfig et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("dataCrawlingConfig", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - /** * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
* 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 iop, - final UpdateOption uop) { - assertObjectNotNull("dataCrawlingConfig", et); - helpInsertOrUpdateNonstrictInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop)); - } - /** * Delete the entity. (ZeroUpdateException, ExclusiveControl) *
@@ -1034,26 +806,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
         doDelete(dataCrawlingConfig, null);
     }
 
-    protected void doDelete(final DataCrawlingConfig et,
-            final DeleteOption op) {
-        assertObjectNotNull("dataCrawlingConfig", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(
-            final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
     /**
      * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -1072,13 +824,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
         doDeleteNonstrict(dataCrawlingConfig, null);
     }
 
-    protected void doDeleteNonstrict(final DataCrawlingConfig et,
-            final DeleteOption op) {
-        assertObjectNotNull("dataCrawlingConfig", et);
-        prepareDeleteOption(op);
-        helpDeleteNonstrictInternally(et, op);
-    }
-
     /**
      * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -1105,12 +850,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
         helpDeleteNonstrictIgnoreDeletedInternally(et, op);
     }
 
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("dataCrawlingConfigList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -1198,31 +911,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable { return doBatchUpdate(dataCrawlingConfigList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("dataCrawlingConfigList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (ExclusiveControl)
* 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 ls, - final UpdateOption op) { - assertObjectNotNull("dataCrawlingConfigList", ls); - UpdateOption 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)
* 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 ls, - final UpdateOption op) { - return doBatchUpdateNonstrict(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list. (ExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("dataCrawlingConfigList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list non-strictly. {NonExclusiveControl}
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("dataCrawlingConfigList", ls); - prepareDeleteOption(op); - return delegateBatchDeleteNonstrict(ls, op); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * dataCrawlingConfigBhv.queryInsert(new QueryInsertSetupper<DataCrawlingConfig, DataCrawlingConfigCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1505,20 +1109,6 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final DataCrawlingConfigCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return DataCrawlingConfig.class; } - protected DataCrawlingConfig downcast(final Entity et) { - return helpEntityDowncastInternally(et, DataCrawlingConfig.class); + @Override + protected Class typeOfHandlingEntity() { + return DataCrawlingConfig.class; } - protected DataCrawlingConfigCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, - DataCrawlingConfigCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return DataCrawlingConfigCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsFailureUrlBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsFailureUrlBhv.java index 154dea23d..ac10fd0ac 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsFailureUrlBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsFailureUrlBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable { +public abstract class BsFailureUrlBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final FailureUrlCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final FailureUrlCB cb, final Class tp) { + final FailureUrlCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final FailureUrlCB cb, final Class 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 doSelectByPK(final Long id, - final Class tp) { + final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -324,20 +267,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList(final FailureUrlCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final FailureUrlCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage( - final FailureUrlCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final FailureUrlCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final FailureUrlCB cb, final EntityRowHandler handler, - final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("failureUrl", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption(final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) *
@@ -641,50 +495,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
         doUpdate(failureUrl, null);
     }
 
-    protected void doUpdate(final FailureUrl et,
-            final UpdateOption op) {
-        assertObjectNotNull("failureUrl", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doModify(et, op);
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -698,27 +508,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable { doInsertOrUpdate(failureUrl, null, null); } - protected void doInsertOrUpdate(final FailureUrl et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("failureUrl", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doCreateOrModify(et, iop, uop); - } - /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) *
@@ -740,31 +529,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
         doDelete(failureUrl, null);
     }
 
-    protected void doDelete(final FailureUrl et,
-            final DeleteOption op) {
-        assertObjectNotNull("failureUrl", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("failureUrlList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -850,31 +588,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable { return doBatchUpdate(failureUrlList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("failureUrlList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (NonExclusiveControl)
* 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 ls, - final UpdateOption op) { - return doLumpModify(ls, op); - } - /** * Batch-delete the entity list. (NonExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("failureUrlList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * failureUrlBhv.queryInsert(new QueryInsertSetupper<FailureUrl, FailureUrlCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1058,20 +708,6 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final FailureUrlCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return FailureUrl.class; } - protected FailureUrl downcast(final Entity et) { - return helpEntityDowncastInternally(et, FailureUrl.class); + @Override + protected Class typeOfHandlingEntity() { + return FailureUrl.class; } - protected FailureUrlCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, FailureUrlCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return FailureUrlCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsFavoriteLogBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsFavoriteLogBhv.java index 7e9686935..fa3514eca 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsFavoriteLogBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsFavoriteLogBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable { +public abstract class BsFavoriteLogBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final FavoriteLogCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final FavoriteLogCB cb, final Class tp) { + final FavoriteLogCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final FavoriteLogCB cb, final Class 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 doSelectByPK(final Long id, - final Class tp) { + final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -327,7 +270,8 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable { } protected OptionalEntity doSelectByUniqueOf( - final Long userId, final String url, final Class tp) { + final Long userId, final String url, + final Class 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 facadeSelectList( - final FavoriteLogCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final FavoriteLogCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage( - final FavoriteLogCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final FavoriteLogCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final FavoriteLogCB cb, final EntityRowHandler handler, - final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("favoriteLog", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption(final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) *
@@ -690,50 +544,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
         doUpdate(favoriteLog, null);
     }
 
-    protected void doUpdate(final FavoriteLog et,
-            final UpdateOption op) {
-        assertObjectNotNull("favoriteLog", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doModify(et, op);
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -747,27 +557,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable { doInsertOrUpdate(favoriteLog, null, null); } - protected void doInsertOrUpdate(final FavoriteLog et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("favoriteLog", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doCreateOrModify(et, iop, uop); - } - /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) *
@@ -789,31 +578,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
         doDelete(favoriteLog, null);
     }
 
-    protected void doDelete(final FavoriteLog et,
-            final DeleteOption op) {
-        assertObjectNotNull("favoriteLog", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("favoriteLogList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -899,31 +637,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable { return doBatchUpdate(favoriteLogList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("favoriteLogList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (NonExclusiveControl)
* 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 ls, - final UpdateOption op) { - return doLumpModify(ls, op); - } - /** * Batch-delete the entity list. (NonExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("favoriteLogList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * favoriteLogBhv.queryInsert(new QueryInsertSetupper<FavoriteLog, FavoriteLogCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1107,20 +757,6 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final FavoriteLogCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return FavoriteLog.class; } - protected FavoriteLog downcast(final Entity et) { - return helpEntityDowncastInternally(et, FavoriteLog.class); + @Override + protected Class typeOfHandlingEntity() { + return FavoriteLog.class; } - protected FavoriteLogCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, FavoriteLogCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return FavoriteLogCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsFileAuthenticationBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsFileAuthenticationBhv.java index 0a4c5fad7..81ee1224f 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsFileAuthenticationBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsFileAuthenticationBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable { +public abstract class BsFileAuthenticationBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final FileAuthenticationCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final FileAuthenticationCB cb, final Class tp) { + final FileAuthenticationCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final FileAuthenticationCB cb, final Class 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 doSelectByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -330,21 +273,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final FileAuthenticationCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final FileAuthenticationCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage( - final FileAuthenticationCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final FileAuthenticationCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final FileAuthenticationCB cb, - final EntityRowHandler handler, final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("fileAuthentication", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption( - final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl) *
@@ -662,45 +514,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
         doUpdate(fileAuthentication, null);
     }
 
-    protected void doUpdate(final FileAuthentication et,
-            final UpdateOption op) {
-        assertObjectNotNull("fileAuthentication", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(
-            final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
     /**
      * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
      * 
@@ -724,19 +537,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
         doUpdateNonstrict(fileAuthentication, null);
     }
 
-    protected void doUpdateNonstrict(final FileAuthentication et,
-            final UpdateOption op) {
-        assertObjectNotNull("fileAuthentication", et);
-        prepareUpdateOption(op);
-        helpUpdateNonstrictInternally(et, op);
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doUpdateNonstrict(downcast(et), downcast(op));
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -750,20 +550,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable { doInsertOrUpdate(fileAuthentication, null, null); } - protected void doInsertOrUpdate(final FileAuthentication et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("fileAuthentication", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - /** * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
* 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 iop, - final UpdateOption uop) { - assertObjectNotNull("fileAuthentication", et); - helpInsertOrUpdateNonstrictInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop)); - } - /** * Delete the entity. (ZeroUpdateException, ExclusiveControl) *
@@ -813,26 +585,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
         doDelete(fileAuthentication, null);
     }
 
-    protected void doDelete(final FileAuthentication et,
-            final DeleteOption op) {
-        assertObjectNotNull("fileAuthentication", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(
-            final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
     /**
      * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -851,13 +603,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
         doDeleteNonstrict(fileAuthentication, null);
     }
 
-    protected void doDeleteNonstrict(final FileAuthentication et,
-            final DeleteOption op) {
-        assertObjectNotNull("fileAuthentication", et);
-        prepareDeleteOption(op);
-        helpDeleteNonstrictInternally(et, op);
-    }
-
     /**
      * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -884,12 +629,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
         helpDeleteNonstrictIgnoreDeletedInternally(et, op);
     }
 
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("fileAuthenticationList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -977,31 +690,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable { return doBatchUpdate(fileAuthenticationList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("fileAuthenticationList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (ExclusiveControl)
* 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 ls, - final UpdateOption op) { - assertObjectNotNull("fileAuthenticationList", ls); - UpdateOption 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)
* 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 ls, - final UpdateOption op) { - return doBatchUpdateNonstrict(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list. (ExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("fileAuthenticationList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list non-strictly. {NonExclusiveControl}
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("fileAuthenticationList", ls); - prepareDeleteOption(op); - return delegateBatchDeleteNonstrict(ls, op); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * fileAuthenticationBhv.queryInsert(new QueryInsertSetupper<FileAuthentication, FileAuthenticationCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1284,20 +888,6 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final FileAuthenticationCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return FileAuthentication.class; } - protected FileAuthentication downcast(final Entity et) { - return helpEntityDowncastInternally(et, FileAuthentication.class); + @Override + protected Class typeOfHandlingEntity() { + return FileAuthentication.class; } - protected FileAuthenticationCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, - FileAuthenticationCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return FileAuthenticationCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToLabelTypeMappingBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToLabelTypeMappingBhv.java index 79c9581b4..9c19a4303 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToLabelTypeMappingBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToLabelTypeMappingBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsFileConfigToLabelTypeMappingBhv extends - AbstractBehaviorWritable { +public abstract class BsFileConfigToLabelTypeMappingBhv + extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final FileConfigToLabelTypeMappingCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final FileConfigToLabelTypeMappingCB cb, final Class tp) { + final FileConfigToLabelTypeMappingCB cb, + final Class 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 doSelectEntityWithDeletedCheck( - final FileConfigToLabelTypeMappingCB cb, final Class 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 doSelectByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -332,21 +276,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final FileConfigToLabelTypeMappingCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final FileConfigToLabelTypeMappingCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean doReadList(final ConditionBean cb) { - return facadeSelectList(downcast(cb)); - } - // =================================================================================== // Page Select // =========== @@ -377,22 +306,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends return facadeSelectPage(cb); } - protected PagingResultBean facadeSelectPage( - final FileConfigToLabelTypeMappingCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final FileConfigToLabelTypeMappingCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final FileConfigToLabelTypeMappingCB cb, - final EntityRowHandler handler, final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("fileConfigToLabelTypeMapping", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption( - final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) *
@@ -681,51 +533,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
         doUpdate(fileConfigToLabelTypeMapping, null);
     }
 
-    protected void doUpdate(final FileConfigToLabelTypeMapping et,
-            final UpdateOption op) {
-        assertObjectNotNull("fileConfigToLabelTypeMapping", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(
-            final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doModify(et, op);
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -740,27 +547,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends doInsertOrUpdate(fileConfigToLabelTypeMapping, null, null); } - protected void doInsertOrUpdate(final FileConfigToLabelTypeMapping et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("fileConfigToLabelTypeMapping", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doCreateOrModify(et, iop, uop); - } - /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) *
@@ -783,32 +569,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
         doDelete(fileConfigToLabelTypeMapping, null);
     }
 
-    protected void doDelete(final FileConfigToLabelTypeMapping et,
-            final DeleteOption op) {
-        assertObjectNotNull("fileConfigToLabelTypeMapping", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(
-            final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption op) {
-        doRemove(et, op);
-    }
-
     // ===================================================================================
     //                                                                        Batch Update
     //                                                                        ============
@@ -841,33 +601,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
         return doBatchInsert(fileConfigToLabelTypeMappingList, null);
     }
 
-    protected int[] doBatchInsert(final List ls,
-            final InsertOption op) {
-        assertObjectNotNull("fileConfigToLabelTypeMappingList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(
-            final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -897,32 +630,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends return doBatchUpdate(fileConfigToLabelTypeMappingList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("fileConfigToLabelTypeMappingList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption( - final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (NonExclusiveControl)
* 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 ls, - final UpdateOption op) { - return doLumpModify(ls, op); - } - /** * Batch-delete the entity list. (NonExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("fileConfigToLabelTypeMappingList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * fileConfigToLabelTypeMappingBhv.queryInsert(new QueryInsertSetupper<FileConfigToLabelTypeMapping, FileConfigToLabelTypeMappingCB>() {
-     *     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
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1111,20 +754,6 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final FileConfigToLabelTypeMappingCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return FileConfigToLabelTypeMapping.class; } - protected FileConfigToLabelTypeMapping downcast(final Entity et) { - return helpEntityDowncastInternally(et, - FileConfigToLabelTypeMapping.class); + @Override + protected Class typeOfHandlingEntity() { + return FileConfigToLabelTypeMapping.class; } - protected FileConfigToLabelTypeMappingCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, - FileConfigToLabelTypeMappingCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast( - final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return FileConfigToLabelTypeMappingCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToRoleTypeMappingBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToRoleTypeMappingBhv.java index a036e4d86..1a47a217a 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToRoleTypeMappingBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToRoleTypeMappingBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsFileConfigToRoleTypeMappingBhv extends - AbstractBehaviorWritable { +public abstract class BsFileConfigToRoleTypeMappingBhv + extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final FileConfigToRoleTypeMappingCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final FileConfigToRoleTypeMappingCB cb, final Class tp) { + final FileConfigToRoleTypeMappingCB cb, + final Class 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 doSelectEntityWithDeletedCheck( - final FileConfigToRoleTypeMappingCB cb, final Class 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 doSelectByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -332,21 +276,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final FileConfigToRoleTypeMappingCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final FileConfigToRoleTypeMappingCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean doReadList(final ConditionBean cb) { - return facadeSelectList(downcast(cb)); - } - // =================================================================================== // Page Select // =========== @@ -377,22 +306,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends return facadeSelectPage(cb); } - protected PagingResultBean facadeSelectPage( - final FileConfigToRoleTypeMappingCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final FileConfigToRoleTypeMappingCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final FileConfigToRoleTypeMappingCB cb, - final EntityRowHandler handler, final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("fileConfigToRoleTypeMapping", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption( - final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) *
@@ -679,51 +532,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
         doUpdate(fileConfigToRoleTypeMapping, null);
     }
 
-    protected void doUpdate(final FileConfigToRoleTypeMapping et,
-            final UpdateOption op) {
-        assertObjectNotNull("fileConfigToRoleTypeMapping", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(
-            final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doModify(et, op);
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -738,27 +546,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends doInsertOrUpdate(fileConfigToRoleTypeMapping, null, null); } - protected void doInsertOrUpdate(final FileConfigToRoleTypeMapping et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("fileConfigToRoleTypeMapping", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doCreateOrModify(et, iop, uop); - } - /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) *
@@ -781,32 +568,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
         doDelete(fileConfigToRoleTypeMapping, null);
     }
 
-    protected void doDelete(final FileConfigToRoleTypeMapping et,
-            final DeleteOption op) {
-        assertObjectNotNull("fileConfigToRoleTypeMapping", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(
-            final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption op) {
-        doRemove(et, op);
-    }
-
     // ===================================================================================
     //                                                                        Batch Update
     //                                                                        ============
@@ -839,33 +600,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
         return doBatchInsert(fileConfigToRoleTypeMappingList, null);
     }
 
-    protected int[] doBatchInsert(final List ls,
-            final InsertOption op) {
-        assertObjectNotNull("fileConfigToRoleTypeMappingList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(
-            final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -895,32 +629,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends return doBatchUpdate(fileConfigToRoleTypeMappingList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("fileConfigToRoleTypeMappingList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption( - final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (NonExclusiveControl)
* 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 ls, - final UpdateOption op) { - return doLumpModify(ls, op); - } - /** * Batch-delete the entity list. (NonExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("fileConfigToRoleTypeMappingList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * fileConfigToRoleTypeMappingBhv.queryInsert(new QueryInsertSetupper<FileConfigToRoleTypeMapping, FileConfigToRoleTypeMappingCB>() {
-     *     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
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1109,20 +753,6 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final FileConfigToRoleTypeMappingCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return FileConfigToRoleTypeMapping.class; } - protected FileConfigToRoleTypeMapping downcast(final Entity et) { - return helpEntityDowncastInternally(et, - FileConfigToRoleTypeMapping.class); + @Override + protected Class typeOfHandlingEntity() { + return FileConfigToRoleTypeMapping.class; } - protected FileConfigToRoleTypeMappingCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, - FileConfigToRoleTypeMappingCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast( - final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return FileConfigToRoleTypeMappingCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsFileCrawlingConfigBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsFileCrawlingConfigBhv.java index 9d5e323de..e95d02371 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsFileCrawlingConfigBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsFileCrawlingConfigBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable { +public abstract class BsFileCrawlingConfigBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final FileCrawlingConfigCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final FileCrawlingConfigCB cb, final Class tp) { + final FileCrawlingConfigCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final FileCrawlingConfigCB cb, final Class 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 doSelectByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -338,21 +281,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final FileCrawlingConfigCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final FileCrawlingConfigCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage( - final FileCrawlingConfigCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final FileCrawlingConfigCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final FileCrawlingConfigCB cb, - final EntityRowHandler handler, final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("fileCrawlingConfig", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption( - final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl) *
@@ -998,45 +850,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
         doUpdate(fileCrawlingConfig, null);
     }
 
-    protected void doUpdate(final FileCrawlingConfig et,
-            final UpdateOption op) {
-        assertObjectNotNull("fileCrawlingConfig", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(
-            final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
     /**
      * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
      * 
@@ -1060,19 +873,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
         doUpdateNonstrict(fileCrawlingConfig, null);
     }
 
-    protected void doUpdateNonstrict(final FileCrawlingConfig et,
-            final UpdateOption op) {
-        assertObjectNotNull("fileCrawlingConfig", et);
-        prepareUpdateOption(op);
-        helpUpdateNonstrictInternally(et, op);
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doUpdateNonstrict(downcast(et), downcast(op));
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -1086,20 +886,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable { doInsertOrUpdate(fileCrawlingConfig, null, null); } - protected void doInsertOrUpdate(final FileCrawlingConfig et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("fileCrawlingConfig", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - /** * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
* 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 iop, - final UpdateOption uop) { - assertObjectNotNull("fileCrawlingConfig", et); - helpInsertOrUpdateNonstrictInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop)); - } - /** * Delete the entity. (ZeroUpdateException, ExclusiveControl) *
@@ -1149,26 +921,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
         doDelete(fileCrawlingConfig, null);
     }
 
-    protected void doDelete(final FileCrawlingConfig et,
-            final DeleteOption op) {
-        assertObjectNotNull("fileCrawlingConfig", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(
-            final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
     /**
      * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -1187,13 +939,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
         doDeleteNonstrict(fileCrawlingConfig, null);
     }
 
-    protected void doDeleteNonstrict(final FileCrawlingConfig et,
-            final DeleteOption op) {
-        assertObjectNotNull("fileCrawlingConfig", et);
-        prepareDeleteOption(op);
-        helpDeleteNonstrictInternally(et, op);
-    }
-
     /**
      * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -1220,12 +965,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
         helpDeleteNonstrictIgnoreDeletedInternally(et, op);
     }
 
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("fileCrawlingConfigList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -1313,31 +1026,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable { return doBatchUpdate(fileCrawlingConfigList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("fileCrawlingConfigList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (ExclusiveControl)
* 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 ls, - final UpdateOption op) { - assertObjectNotNull("fileCrawlingConfigList", ls); - UpdateOption 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)
* 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 ls, - final UpdateOption op) { - return doBatchUpdateNonstrict(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list. (ExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("fileCrawlingConfigList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list non-strictly. {NonExclusiveControl}
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("fileCrawlingConfigList", ls); - prepareDeleteOption(op); - return delegateBatchDeleteNonstrict(ls, op); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * fileCrawlingConfigBhv.queryInsert(new QueryInsertSetupper<FileCrawlingConfig, FileCrawlingConfigCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1620,20 +1224,6 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final FileCrawlingConfigCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return FileCrawlingConfig.class; } - protected FileCrawlingConfig downcast(final Entity et) { - return helpEntityDowncastInternally(et, FileCrawlingConfig.class); + @Override + protected Class typeOfHandlingEntity() { + return FileCrawlingConfig.class; } - protected FileCrawlingConfigCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, - FileCrawlingConfigCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return FileCrawlingConfigCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsJobLogBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsJobLogBhv.java index ea514aa5c..72e940fc0 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsJobLogBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsJobLogBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsJobLogBhv extends AbstractBehaviorWritable { +public abstract class BsJobLogBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity(final JobLogCB cb, - final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final JobLogCB cb, final Class tp) { + final JobLogCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final JobLogCB cb, final Class 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 doSelectByPK(final Long id, - final Class tp) { + final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -323,20 +267,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList(final JobLogCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final JobLogCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage(final JobLogCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final JobLogCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor(final JobLogCB cb, - final EntityRowHandler handler, final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("jobLog", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption(final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) *
@@ -637,49 +495,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
         doUpdate(jobLog, null);
     }
 
-    protected void doUpdate(final JobLog et, final UpdateOption op) {
-        assertObjectNotNull("jobLog", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doModify(et, op);
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -693,26 +508,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable { doInsertOrUpdate(jobLog, null, null); } - protected void doInsertOrUpdate(final JobLog et, - final InsertOption iop, final UpdateOption uop) { - assertObjectNotNull("jobLog", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doCreateOrModify(et, iop, uop); - } - /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) *
@@ -734,30 +529,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
         doDelete(jobLog, null);
     }
 
-    protected void doDelete(final JobLog et, final DeleteOption op) {
-        assertObjectNotNull("jobLog", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("jobLogList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -843,31 +588,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable { return doBatchUpdate(jobLogList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("jobLogList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (NonExclusiveControl)
* 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 ls, - final UpdateOption op) { - return doLumpModify(ls, op); - } - /** * Batch-delete the entity list. (NonExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("jobLogList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * jobLogBhv.queryInsert(new QueryInsertSetupper<JobLog, JobLogCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 setupper) { return doQueryInsert(setupper, null); } - protected int doQueryInsert(final QueryInsertSetupper sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1049,20 +707,6 @@ public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final JobLogCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return JobLog.class; } - protected JobLog downcast(final Entity et) { - return helpEntityDowncastInternally(et, JobLog.class); + @Override + protected Class typeOfHandlingEntity() { + return JobLog.class; } - protected JobLogCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, JobLogCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return JobLogCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsKeyMatchBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsKeyMatchBhv.java index d37c783a4..7092791e9 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsKeyMatchBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsKeyMatchBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable { +public abstract class BsKeyMatchBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final KeyMatchCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final KeyMatchCB cb, final Class tp) { + final KeyMatchCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final KeyMatchCB cb, final Class 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 doSelectByPK(final Long id, - final Class tp) { + final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -325,20 +269,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList(final KeyMatchCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final KeyMatchCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage(final KeyMatchCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final KeyMatchCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final KeyMatchCB cb, final EntityRowHandler handler, - final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("keyMatch", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption(final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl) *
@@ -640,43 +497,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
         doUpdate(keyMatch, null);
     }
 
-    protected void doUpdate(final KeyMatch et, final UpdateOption op) {
-        assertObjectNotNull("keyMatch", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
     /**
      * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
      * 
@@ -700,19 +520,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
         doUpdateNonstrict(keyMatch, null);
     }
 
-    protected void doUpdateNonstrict(final KeyMatch et,
-            final UpdateOption op) {
-        assertObjectNotNull("keyMatch", et);
-        prepareUpdateOption(op);
-        helpUpdateNonstrictInternally(et, op);
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doUpdateNonstrict(downcast(et), downcast(op));
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -726,20 +533,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable { doInsertOrUpdate(keyMatch, null, null); } - protected void doInsertOrUpdate(final KeyMatch et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("keyMatch", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - /** * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
* 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 iop, - final UpdateOption uop) { - assertObjectNotNull("keyMatch", et); - helpInsertOrUpdateNonstrictInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop)); - } - /** * Delete the entity. (ZeroUpdateException, ExclusiveControl) *
@@ -788,24 +567,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
         doDelete(keyMatch, null);
     }
 
-    protected void doDelete(final KeyMatch et, final DeleteOption op) {
-        assertObjectNotNull("keyMatch", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
     /**
      * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -824,13 +585,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
         doDeleteNonstrict(keyMatch, null);
     }
 
-    protected void doDeleteNonstrict(final KeyMatch et,
-            final DeleteOption op) {
-        assertObjectNotNull("keyMatch", et);
-        prepareDeleteOption(op);
-        helpDeleteNonstrictInternally(et, op);
-    }
-
     /**
      * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -856,12 +610,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
         helpDeleteNonstrictIgnoreDeletedInternally(et, op);
     }
 
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("keyMatchList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -947,31 +669,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable { return doBatchUpdate(keyMatchList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("keyMatchList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (ExclusiveControl)
* 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 ls, - final UpdateOption op) { - assertObjectNotNull("keyMatchList", ls); - UpdateOption 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)
* 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 ls, - final UpdateOption op) { - return doBatchUpdateNonstrict(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list. (ExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("keyMatchList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list non-strictly. {NonExclusiveControl}
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("keyMatchList", ls); - prepareDeleteOption(op); - return delegateBatchDeleteNonstrict(ls, op); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * keyMatchBhv.queryInsert(new QueryInsertSetupper<KeyMatch, KeyMatchCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1247,20 +861,6 @@ public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final KeyMatchCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return KeyMatch.class; } - protected KeyMatch downcast(final Entity et) { - return helpEntityDowncastInternally(et, KeyMatch.class); + @Override + protected Class typeOfHandlingEntity() { + return KeyMatch.class; } - protected KeyMatchCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, KeyMatchCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return KeyMatchCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsLabelTypeBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsLabelTypeBhv.java index f75b5d45e..2c2ff3c2e 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsLabelTypeBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsLabelTypeBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable { +public abstract class BsLabelTypeBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final LabelTypeCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final LabelTypeCB cb, final Class tp) { + final LabelTypeCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final LabelTypeCB cb, final Class 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 doSelectByPK(final Long id, - final Class tp) { + final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -336,20 +280,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList(final LabelTypeCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final LabelTypeCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage(final LabelTypeCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final LabelTypeCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final LabelTypeCB cb, final EntityRowHandler handler, - final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("labelType", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption(final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl) *
@@ -1104,44 +960,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
         doUpdate(labelType, null);
     }
 
-    protected void doUpdate(final LabelType et,
-            final UpdateOption op) {
-        assertObjectNotNull("labelType", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
     /**
      * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
      * 
@@ -1165,19 +983,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
         doUpdateNonstrict(labelType, null);
     }
 
-    protected void doUpdateNonstrict(final LabelType et,
-            final UpdateOption op) {
-        assertObjectNotNull("labelType", et);
-        prepareUpdateOption(op);
-        helpUpdateNonstrictInternally(et, op);
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doUpdateNonstrict(downcast(et), downcast(op));
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -1191,20 +996,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable { doInsertOrUpdate(labelType, null, null); } - protected void doInsertOrUpdate(final LabelType et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("labelType", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - /** * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
* 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 iop, - final UpdateOption uop) { - assertObjectNotNull("labelType", et); - helpInsertOrUpdateNonstrictInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop)); - } - /** * Delete the entity. (ZeroUpdateException, ExclusiveControl) *
@@ -1253,25 +1030,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
         doDelete(labelType, null);
     }
 
-    protected void doDelete(final LabelType et,
-            final DeleteOption op) {
-        assertObjectNotNull("labelType", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
     /**
      * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -1290,13 +1048,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
         doDeleteNonstrict(labelType, null);
     }
 
-    protected void doDeleteNonstrict(final LabelType et,
-            final DeleteOption op) {
-        assertObjectNotNull("labelType", et);
-        prepareDeleteOption(op);
-        helpDeleteNonstrictInternally(et, op);
-    }
-
     /**
      * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -1322,12 +1073,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
         helpDeleteNonstrictIgnoreDeletedInternally(et, op);
     }
 
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("labelTypeList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -1413,31 +1132,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable { return doBatchUpdate(labelTypeList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("labelTypeList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (ExclusiveControl)
* 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 ls, - final UpdateOption op) { - assertObjectNotNull("labelTypeList", ls); - UpdateOption 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)
* 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 ls, - final UpdateOption op) { - return doBatchUpdateNonstrict(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list. (ExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("labelTypeList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list non-strictly. {NonExclusiveControl}
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("labelTypeList", ls); - prepareDeleteOption(op); - return delegateBatchDeleteNonstrict(ls, op); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * labelTypeBhv.queryInsert(new QueryInsertSetupper<LabelType, LabelTypeCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1713,20 +1324,6 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final LabelTypeCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return LabelType.class; } - protected LabelType downcast(final Entity et) { - return helpEntityDowncastInternally(et, LabelType.class); + @Override + protected Class typeOfHandlingEntity() { + return LabelType.class; } - protected LabelTypeCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, LabelTypeCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return LabelTypeCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsLabelTypeToRoleTypeMappingBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsLabelTypeToRoleTypeMappingBhv.java index 2fafe4d58..88458c653 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsLabelTypeToRoleTypeMappingBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsLabelTypeToRoleTypeMappingBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsLabelTypeToRoleTypeMappingBhv extends - AbstractBehaviorWritable { +public abstract class BsLabelTypeToRoleTypeMappingBhv + extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final LabelTypeToRoleTypeMappingCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final LabelTypeToRoleTypeMappingCB cb, final Class tp) { + final LabelTypeToRoleTypeMappingCB cb, + final Class 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 doSelectEntityWithDeletedCheck( - final LabelTypeToRoleTypeMappingCB cb, final Class 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 doSelectByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -332,21 +276,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final LabelTypeToRoleTypeMappingCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final LabelTypeToRoleTypeMappingCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean doReadList(final ConditionBean cb) { - return facadeSelectList(downcast(cb)); - } - // =================================================================================== // Page Select // =========== @@ -377,22 +306,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends return facadeSelectPage(cb); } - protected PagingResultBean facadeSelectPage( - final LabelTypeToRoleTypeMappingCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final LabelTypeToRoleTypeMappingCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final LabelTypeToRoleTypeMappingCB cb, - final EntityRowHandler handler, final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("labelTypeToRoleTypeMapping", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption( - final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) *
@@ -678,51 +531,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
         doUpdate(labelTypeToRoleTypeMapping, null);
     }
 
-    protected void doUpdate(final LabelTypeToRoleTypeMapping et,
-            final UpdateOption op) {
-        assertObjectNotNull("labelTypeToRoleTypeMapping", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(
-            final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doModify(et, op);
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -737,27 +545,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends doInsertOrUpdate(labelTypeToRoleTypeMapping, null, null); } - protected void doInsertOrUpdate(final LabelTypeToRoleTypeMapping et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("labelTypeToRoleTypeMapping", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doCreateOrModify(et, iop, uop); - } - /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) *
@@ -780,32 +567,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
         doDelete(labelTypeToRoleTypeMapping, null);
     }
 
-    protected void doDelete(final LabelTypeToRoleTypeMapping et,
-            final DeleteOption op) {
-        assertObjectNotNull("labelTypeToRoleTypeMapping", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(
-            final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption op) {
-        doRemove(et, op);
-    }
-
     // ===================================================================================
     //                                                                        Batch Update
     //                                                                        ============
@@ -838,33 +599,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
         return doBatchInsert(labelTypeToRoleTypeMappingList, null);
     }
 
-    protected int[] doBatchInsert(final List ls,
-            final InsertOption op) {
-        assertObjectNotNull("labelTypeToRoleTypeMappingList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(
-            final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -894,32 +628,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends return doBatchUpdate(labelTypeToRoleTypeMappingList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("labelTypeToRoleTypeMappingList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption( - final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (NonExclusiveControl)
* 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 ls, - final UpdateOption op) { - return doLumpModify(ls, op); - } - /** * Batch-delete the entity list. (NonExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("labelTypeToRoleTypeMappingList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * labelTypeToRoleTypeMappingBhv.queryInsert(new QueryInsertSetupper<LabelTypeToRoleTypeMapping, LabelTypeToRoleTypeMappingCB>() {
-     *     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
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1108,20 +752,6 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final LabelTypeToRoleTypeMappingCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return LabelTypeToRoleTypeMapping.class; } - protected LabelTypeToRoleTypeMapping downcast(final Entity et) { - return helpEntityDowncastInternally(et, - LabelTypeToRoleTypeMapping.class); + @Override + protected Class typeOfHandlingEntity() { + return LabelTypeToRoleTypeMapping.class; } - protected LabelTypeToRoleTypeMappingCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, - LabelTypeToRoleTypeMappingCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast( - final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return LabelTypeToRoleTypeMappingCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsOverlappingHostBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsOverlappingHostBhv.java index 045edb20e..3bfe8ba50 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsOverlappingHostBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsOverlappingHostBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable { +public abstract class BsOverlappingHostBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final OverlappingHostCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final OverlappingHostCB cb, final Class tp) { + final OverlappingHostCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final OverlappingHostCB cb, final Class 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 doSelectByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -327,21 +270,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final OverlappingHostCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final OverlappingHostCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage( - final OverlappingHostCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final OverlappingHostCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final OverlappingHostCB cb, final EntityRowHandler handler, - final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("overlappingHost", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption(final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl) *
@@ -647,44 +500,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
         doUpdate(overlappingHost, null);
     }
 
-    protected void doUpdate(final OverlappingHost et,
-            final UpdateOption op) {
-        assertObjectNotNull("overlappingHost", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
     /**
      * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
      * 
@@ -708,19 +523,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
         doUpdateNonstrict(overlappingHost, null);
     }
 
-    protected void doUpdateNonstrict(final OverlappingHost et,
-            final UpdateOption op) {
-        assertObjectNotNull("overlappingHost", et);
-        prepareUpdateOption(op);
-        helpUpdateNonstrictInternally(et, op);
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doUpdateNonstrict(downcast(et), downcast(op));
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -734,20 +536,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable { doInsertOrUpdate(overlappingHost, null, null); } - protected void doInsertOrUpdate(final OverlappingHost et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("overlappingHost", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - /** * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
* 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 iop, - final UpdateOption uop) { - assertObjectNotNull("overlappingHost", et); - helpInsertOrUpdateNonstrictInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop)); - } - /** * Delete the entity. (ZeroUpdateException, ExclusiveControl) *
@@ -796,25 +570,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
         doDelete(overlappingHost, null);
     }
 
-    protected void doDelete(final OverlappingHost et,
-            final DeleteOption op) {
-        assertObjectNotNull("overlappingHost", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
     /**
      * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -833,13 +588,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
         doDeleteNonstrict(overlappingHost, null);
     }
 
-    protected void doDeleteNonstrict(final OverlappingHost et,
-            final DeleteOption op) {
-        assertObjectNotNull("overlappingHost", et);
-        prepareDeleteOption(op);
-        helpDeleteNonstrictInternally(et, op);
-    }
-
     /**
      * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -866,12 +614,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
         helpDeleteNonstrictIgnoreDeletedInternally(et, op);
     }
 
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("overlappingHostList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -957,31 +673,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable { return doBatchUpdate(overlappingHostList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("overlappingHostList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (ExclusiveControl)
* 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 ls, - final UpdateOption op) { - assertObjectNotNull("overlappingHostList", ls); - UpdateOption 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)
* 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 ls, - final UpdateOption op) { - return doBatchUpdateNonstrict(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list. (ExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("overlappingHostList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list non-strictly. {NonExclusiveControl}
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("overlappingHostList", ls); - prepareDeleteOption(op); - return delegateBatchDeleteNonstrict(ls, op); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * overlappingHostBhv.queryInsert(new QueryInsertSetupper<OverlappingHost, OverlappingHostCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1261,20 +869,6 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final OverlappingHostCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return OverlappingHost.class; } - protected OverlappingHost downcast(final Entity et) { - return helpEntityDowncastInternally(et, OverlappingHost.class); + @Override + protected Class typeOfHandlingEntity() { + return OverlappingHost.class; } - protected OverlappingHostCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, OverlappingHostCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return OverlappingHostCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsPathMappingBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsPathMappingBhv.java index 26907c709..11356307c 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsPathMappingBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsPathMappingBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsPathMappingBhv extends AbstractBehaviorWritable { +public abstract class BsPathMappingBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final PathMappingCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final PathMappingCB cb, final Class tp) { + final PathMappingCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final PathMappingCB cb, final Class 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 doSelectByPK(final Long id, - final Class tp) { + final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -326,21 +269,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final PathMappingCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final PathMappingCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage( - final PathMappingCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final PathMappingCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final PathMappingCB cb, final EntityRowHandler handler, - final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("pathMapping", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption(final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl) *
@@ -644,44 +497,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
         doUpdate(pathMapping, null);
     }
 
-    protected void doUpdate(final PathMapping et,
-            final UpdateOption op) {
-        assertObjectNotNull("pathMapping", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
     /**
      * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
      * 
@@ -705,19 +520,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
         doUpdateNonstrict(pathMapping, null);
     }
 
-    protected void doUpdateNonstrict(final PathMapping et,
-            final UpdateOption op) {
-        assertObjectNotNull("pathMapping", et);
-        prepareUpdateOption(op);
-        helpUpdateNonstrictInternally(et, op);
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doUpdateNonstrict(downcast(et), downcast(op));
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -731,20 +533,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable { doInsertOrUpdate(pathMapping, null, null); } - protected void doInsertOrUpdate(final PathMapping et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("pathMapping", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - /** * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
* 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 iop, - final UpdateOption uop) { - assertObjectNotNull("pathMapping", et); - helpInsertOrUpdateNonstrictInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop)); - } - /** * Delete the entity. (ZeroUpdateException, ExclusiveControl) *
@@ -793,25 +567,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
         doDelete(pathMapping, null);
     }
 
-    protected void doDelete(final PathMapping et,
-            final DeleteOption op) {
-        assertObjectNotNull("pathMapping", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
     /**
      * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -830,13 +585,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
         doDeleteNonstrict(pathMapping, null);
     }
 
-    protected void doDeleteNonstrict(final PathMapping et,
-            final DeleteOption op) {
-        assertObjectNotNull("pathMapping", et);
-        prepareDeleteOption(op);
-        helpDeleteNonstrictInternally(et, op);
-    }
-
     /**
      * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -862,12 +610,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
         helpDeleteNonstrictIgnoreDeletedInternally(et, op);
     }
 
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("pathMappingList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -953,31 +669,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable { return doBatchUpdate(pathMappingList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("pathMappingList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (ExclusiveControl)
* 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 ls, - final UpdateOption op) { - assertObjectNotNull("pathMappingList", ls); - UpdateOption 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)
* 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 ls, - final UpdateOption op) { - return doBatchUpdateNonstrict(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list. (ExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("pathMappingList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list non-strictly. {NonExclusiveControl}
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("pathMappingList", ls); - prepareDeleteOption(op); - return delegateBatchDeleteNonstrict(ls, op); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * pathMappingBhv.queryInsert(new QueryInsertSetupper<PathMapping, PathMappingCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1253,20 +861,6 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final PathMappingCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return PathMapping.class; } - protected PathMapping downcast(final Entity et) { - return helpEntityDowncastInternally(et, PathMapping.class); + @Override + protected Class typeOfHandlingEntity() { + return PathMapping.class; } - protected PathMappingCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, PathMappingCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return PathMappingCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsRequestHeaderBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsRequestHeaderBhv.java index 88a66be7d..853917598 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsRequestHeaderBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsRequestHeaderBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable { +public abstract class BsRequestHeaderBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final RequestHeaderCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final RequestHeaderCB cb, final Class tp) { + final RequestHeaderCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final RequestHeaderCB cb, final Class 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 doSelectByPK(final Long id, - final Class tp) { + final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -327,21 +270,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final RequestHeaderCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final RequestHeaderCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage( - final RequestHeaderCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final RequestHeaderCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final RequestHeaderCB cb, final EntityRowHandler handler, - final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("requestHeader", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption(final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl) *
@@ -655,44 +508,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
         doUpdate(requestHeader, null);
     }
 
-    protected void doUpdate(final RequestHeader et,
-            final UpdateOption op) {
-        assertObjectNotNull("requestHeader", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
     /**
      * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
      * 
@@ -716,19 +531,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
         doUpdateNonstrict(requestHeader, null);
     }
 
-    protected void doUpdateNonstrict(final RequestHeader et,
-            final UpdateOption op) {
-        assertObjectNotNull("requestHeader", et);
-        prepareUpdateOption(op);
-        helpUpdateNonstrictInternally(et, op);
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doUpdateNonstrict(downcast(et), downcast(op));
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -742,20 +544,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable { doInsertOrUpdate(requestHeader, null, null); } - protected void doInsertOrUpdate(final RequestHeader et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("requestHeader", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - /** * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
* 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 iop, - final UpdateOption uop) { - assertObjectNotNull("requestHeader", et); - helpInsertOrUpdateNonstrictInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop)); - } - /** * Delete the entity. (ZeroUpdateException, ExclusiveControl) *
@@ -804,25 +578,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
         doDelete(requestHeader, null);
     }
 
-    protected void doDelete(final RequestHeader et,
-            final DeleteOption op) {
-        assertObjectNotNull("requestHeader", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
     /**
      * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -841,13 +596,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
         doDeleteNonstrict(requestHeader, null);
     }
 
-    protected void doDeleteNonstrict(final RequestHeader et,
-            final DeleteOption op) {
-        assertObjectNotNull("requestHeader", et);
-        prepareDeleteOption(op);
-        helpDeleteNonstrictInternally(et, op);
-    }
-
     /**
      * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -873,12 +621,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
         helpDeleteNonstrictIgnoreDeletedInternally(et, op);
     }
 
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("requestHeaderList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -964,31 +680,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable { return doBatchUpdate(requestHeaderList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("requestHeaderList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (ExclusiveControl)
* 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 ls, - final UpdateOption op) { - assertObjectNotNull("requestHeaderList", ls); - UpdateOption 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)
* 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 ls, - final UpdateOption op) { - return doBatchUpdateNonstrict(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list. (ExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("requestHeaderList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list non-strictly. {NonExclusiveControl}
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("requestHeaderList", ls); - prepareDeleteOption(op); - return delegateBatchDeleteNonstrict(ls, op); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * requestHeaderBhv.queryInsert(new QueryInsertSetupper<RequestHeader, RequestHeaderCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1268,20 +876,6 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final RequestHeaderCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return RequestHeader.class; } - protected RequestHeader downcast(final Entity et) { - return helpEntityDowncastInternally(et, RequestHeader.class); + @Override + protected Class typeOfHandlingEntity() { + return RequestHeader.class; } - protected RequestHeaderCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, RequestHeaderCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return RequestHeaderCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsRoleTypeBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsRoleTypeBhv.java index 4b7dbb220..b24bf232e 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsRoleTypeBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsRoleTypeBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable { +public abstract class BsRoleTypeBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final RoleTypeCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final RoleTypeCB cb, final Class tp) { + final RoleTypeCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final RoleTypeCB cb, final Class 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 doSelectByPK(final Long id, - final Class tp) { + final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -336,20 +280,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList(final RoleTypeCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final RoleTypeCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage(final RoleTypeCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final RoleTypeCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final RoleTypeCB cb, final EntityRowHandler handler, - final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("roleType", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption(final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl) *
@@ -1103,43 +960,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
         doUpdate(roleType, null);
     }
 
-    protected void doUpdate(final RoleType et, final UpdateOption op) {
-        assertObjectNotNull("roleType", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
     /**
      * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
      * 
@@ -1163,19 +983,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
         doUpdateNonstrict(roleType, null);
     }
 
-    protected void doUpdateNonstrict(final RoleType et,
-            final UpdateOption op) {
-        assertObjectNotNull("roleType", et);
-        prepareUpdateOption(op);
-        helpUpdateNonstrictInternally(et, op);
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doUpdateNonstrict(downcast(et), downcast(op));
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -1189,20 +996,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable { doInsertOrUpdate(roleType, null, null); } - protected void doInsertOrUpdate(final RoleType et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("roleType", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - /** * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
* 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 iop, - final UpdateOption uop) { - assertObjectNotNull("roleType", et); - helpInsertOrUpdateNonstrictInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop)); - } - /** * Delete the entity. (ZeroUpdateException, ExclusiveControl) *
@@ -1251,24 +1030,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
         doDelete(roleType, null);
     }
 
-    protected void doDelete(final RoleType et, final DeleteOption op) {
-        assertObjectNotNull("roleType", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
     /**
      * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -1287,13 +1048,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
         doDeleteNonstrict(roleType, null);
     }
 
-    protected void doDeleteNonstrict(final RoleType et,
-            final DeleteOption op) {
-        assertObjectNotNull("roleType", et);
-        prepareDeleteOption(op);
-        helpDeleteNonstrictInternally(et, op);
-    }
-
     /**
      * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -1319,12 +1073,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
         helpDeleteNonstrictIgnoreDeletedInternally(et, op);
     }
 
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("roleTypeList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -1410,31 +1132,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable { return doBatchUpdate(roleTypeList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("roleTypeList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (ExclusiveControl)
* 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 ls, - final UpdateOption op) { - assertObjectNotNull("roleTypeList", ls); - UpdateOption 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)
* 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 ls, - final UpdateOption op) { - return doBatchUpdateNonstrict(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list. (ExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("roleTypeList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list non-strictly. {NonExclusiveControl}
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("roleTypeList", ls); - prepareDeleteOption(op); - return delegateBatchDeleteNonstrict(ls, op); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * roleTypeBhv.queryInsert(new QueryInsertSetupper<RoleType, RoleTypeCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1710,20 +1324,6 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final RoleTypeCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return RoleType.class; } - protected RoleType downcast(final Entity et) { - return helpEntityDowncastInternally(et, RoleType.class); + @Override + protected Class typeOfHandlingEntity() { + return RoleType.class; } - protected RoleTypeCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, RoleTypeCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return RoleTypeCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsScheduledJobBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsScheduledJobBhv.java index 605c03c4c..c5e3817a9 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsScheduledJobBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsScheduledJobBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable { +public abstract class BsScheduledJobBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final ScheduledJobCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final ScheduledJobCB cb, final Class tp) { + final ScheduledJobCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final ScheduledJobCB cb, final Class 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 doSelectByPK(final Long id, - final Class tp) { + final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -326,21 +269,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final ScheduledJobCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final ScheduledJobCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage( - final ScheduledJobCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final ScheduledJobCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final ScheduledJobCB cb, final EntityRowHandler handler, - final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("scheduledJob", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption(final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl) *
@@ -644,44 +497,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
         doUpdate(scheduledJob, null);
     }
 
-    protected void doUpdate(final ScheduledJob et,
-            final UpdateOption op) {
-        assertObjectNotNull("scheduledJob", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
     /**
      * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
      * 
@@ -705,19 +520,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
         doUpdateNonstrict(scheduledJob, null);
     }
 
-    protected void doUpdateNonstrict(final ScheduledJob et,
-            final UpdateOption op) {
-        assertObjectNotNull("scheduledJob", et);
-        prepareUpdateOption(op);
-        helpUpdateNonstrictInternally(et, op);
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doUpdateNonstrict(downcast(et), downcast(op));
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -731,20 +533,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable { doInsertOrUpdate(scheduledJob, null, null); } - protected void doInsertOrUpdate(final ScheduledJob et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("scheduledJob", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - /** * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
* 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 iop, - final UpdateOption uop) { - assertObjectNotNull("scheduledJob", et); - helpInsertOrUpdateNonstrictInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop)); - } - /** * Delete the entity. (ZeroUpdateException, ExclusiveControl) *
@@ -793,25 +567,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
         doDelete(scheduledJob, null);
     }
 
-    protected void doDelete(final ScheduledJob et,
-            final DeleteOption op) {
-        assertObjectNotNull("scheduledJob", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
     /**
      * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -830,13 +585,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
         doDeleteNonstrict(scheduledJob, null);
     }
 
-    protected void doDeleteNonstrict(final ScheduledJob et,
-            final DeleteOption op) {
-        assertObjectNotNull("scheduledJob", et);
-        prepareDeleteOption(op);
-        helpDeleteNonstrictInternally(et, op);
-    }
-
     /**
      * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -862,12 +610,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
         helpDeleteNonstrictIgnoreDeletedInternally(et, op);
     }
 
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("scheduledJobList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -953,31 +669,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable { return doBatchUpdate(scheduledJobList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("scheduledJobList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (ExclusiveControl)
* 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 ls, - final UpdateOption op) { - assertObjectNotNull("scheduledJobList", ls); - UpdateOption 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)
* 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 ls, - final UpdateOption op) { - return doBatchUpdateNonstrict(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list. (ExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("scheduledJobList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list non-strictly. {NonExclusiveControl}
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("scheduledJobList", ls); - prepareDeleteOption(op); - return delegateBatchDeleteNonstrict(ls, op); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * scheduledJobBhv.queryInsert(new QueryInsertSetupper<ScheduledJob, ScheduledJobCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1255,20 +863,6 @@ public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final ScheduledJobCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return ScheduledJob.class; } - protected ScheduledJob downcast(final Entity et) { - return helpEntityDowncastInternally(et, ScheduledJob.class); + @Override + protected Class typeOfHandlingEntity() { + return ScheduledJob.class; } - protected ScheduledJobCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, ScheduledJobCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return ScheduledJobCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsSearchFieldLogBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsSearchFieldLogBhv.java index fd50102bc..fe4e3a338 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsSearchFieldLogBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsSearchFieldLogBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable { +public abstract class BsSearchFieldLogBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final SearchFieldLogCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final SearchFieldLogCB cb, final Class tp) { + final SearchFieldLogCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final SearchFieldLogCB cb, final Class 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 doSelectByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -327,21 +270,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final SearchFieldLogCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final SearchFieldLogCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage( - final SearchFieldLogCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final SearchFieldLogCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final SearchFieldLogCB cb, final EntityRowHandler handler, - final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("searchFieldLog", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption(final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) *
@@ -656,50 +509,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
         doUpdate(searchFieldLog, null);
     }
 
-    protected void doUpdate(final SearchFieldLog et,
-            final UpdateOption op) {
-        assertObjectNotNull("searchFieldLog", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doModify(et, op);
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -713,27 +522,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable { doInsertOrUpdate(searchFieldLog, null, null); } - protected void doInsertOrUpdate(final SearchFieldLog et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("searchFieldLog", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doCreateOrModify(et, iop, uop); - } - /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) *
@@ -755,31 +543,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
         doDelete(searchFieldLog, null);
     }
 
-    protected void doDelete(final SearchFieldLog et,
-            final DeleteOption op) {
-        assertObjectNotNull("searchFieldLog", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("searchFieldLogList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -865,31 +602,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable { return doBatchUpdate(searchFieldLogList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("searchFieldLogList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (NonExclusiveControl)
* 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 ls, - final UpdateOption op) { - return doLumpModify(ls, op); - } - /** * Batch-delete the entity list. (NonExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("searchFieldLogList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * searchFieldLogBhv.queryInsert(new QueryInsertSetupper<SearchFieldLog, SearchFieldLogCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1074,20 +723,6 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final SearchFieldLogCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return SearchFieldLog.class; } - protected SearchFieldLog downcast(final Entity et) { - return helpEntityDowncastInternally(et, SearchFieldLog.class); + @Override + protected Class typeOfHandlingEntity() { + return SearchFieldLog.class; } - protected SearchFieldLogCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, SearchFieldLogCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return SearchFieldLogCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsSearchLogBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsSearchLogBhv.java index 42bf7c1e2..b01764c79 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsSearchLogBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsSearchLogBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsSearchLogBhv extends AbstractBehaviorWritable { +public abstract class BsSearchLogBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final SearchLogCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final SearchLogCB cb, final Class tp) { + final SearchLogCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final SearchLogCB cb, final Class 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 doSelectByPK(final Long id, - final Class tp) { + final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -347,20 +291,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList(final SearchLogCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final SearchLogCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage(final SearchLogCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final SearchLogCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final SearchLogCB cb, final EntityRowHandler handler, - final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("searchLog", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption(final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) *
@@ -887,50 +743,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
         doUpdate(searchLog, null);
     }
 
-    protected void doUpdate(final SearchLog et,
-            final UpdateOption op) {
-        assertObjectNotNull("searchLog", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doModify(et, op);
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -944,27 +756,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable { doInsertOrUpdate(searchLog, null, null); } - protected void doInsertOrUpdate(final SearchLog et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("searchLog", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doCreateOrModify(et, iop, uop); - } - /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) *
@@ -986,31 +777,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
         doDelete(searchLog, null);
     }
 
-    protected void doDelete(final SearchLog et,
-            final DeleteOption op) {
-        assertObjectNotNull("searchLog", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("searchLogList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -1096,31 +836,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable { return doBatchUpdate(searchLogList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("searchLogList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (NonExclusiveControl)
* 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 ls, - final UpdateOption op) { - return doLumpModify(ls, op); - } - /** * Batch-delete the entity list. (NonExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("searchLogList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * searchLogBhv.queryInsert(new QueryInsertSetupper<SearchLog, SearchLogCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1304,20 +956,6 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final SearchLogCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return SearchLog.class; } - protected SearchLog downcast(final Entity et) { - return helpEntityDowncastInternally(et, SearchLog.class); + @Override + protected Class typeOfHandlingEntity() { + return SearchLog.class; } - protected SearchLogCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, SearchLogCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return SearchLogCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsSuggestBadWordBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsSuggestBadWordBhv.java new file mode 100644 index 000000000..4c74fc090 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsSuggestBadWordBhv.java @@ -0,0 +1,1248 @@ +/* + * 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; + +import java.util.List; + +import jp.sf.fess.db.bsbhv.loader.LoaderOfSuggestBadWord; +import jp.sf.fess.db.bsentity.dbmeta.SuggestBadWordDbm; +import jp.sf.fess.db.cbean.SuggestBadWordCB; +import jp.sf.fess.db.exbhv.SuggestBadWordBhv; +import jp.sf.fess.db.exentity.SuggestBadWord; + +import org.seasar.dbflute.Entity; +import org.seasar.dbflute.bhv.AbstractBehaviorWritable; +import org.seasar.dbflute.bhv.DeleteOption; +import org.seasar.dbflute.bhv.InsertOption; +import org.seasar.dbflute.bhv.QueryInsertSetupper; +import org.seasar.dbflute.bhv.ReferrerLoaderHandler; +import org.seasar.dbflute.bhv.UpdateOption; +import org.seasar.dbflute.cbean.ConditionBean; +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.HpSLSFunction; +import org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException; +import org.seasar.dbflute.exception.DangerousResultSizeException; +import org.seasar.dbflute.exception.EntityAlreadyDeletedException; +import org.seasar.dbflute.exception.EntityAlreadyExistsException; +import org.seasar.dbflute.exception.EntityAlreadyUpdatedException; +import org.seasar.dbflute.exception.EntityDuplicatedException; +import org.seasar.dbflute.exception.NonQueryDeleteNotAllowedException; +import org.seasar.dbflute.exception.NonQueryUpdateNotAllowedException; +import org.seasar.dbflute.exception.SelectEntityConditionNotFoundException; +import org.seasar.dbflute.optional.OptionalEntity; +import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor; + +/** + * The behavior of SUGGEST_BAD_WORD as TABLE.
+ *
+ * [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]
+ *
+ * 
+ * @author DBFlute(AutoGenerator) + */ +public abstract class BsSuggestBadWordBhv extends + AbstractBehaviorWritable { + + // =================================================================================== + // Definition + // ========== + /*df:beginQueryPath*/ + /*df:endQueryPath*/ + + // =================================================================================== + // DBMeta + // ====== + /** {@inheritDoc} */ + @Override + public SuggestBadWordDbm getDBMeta() { + return SuggestBadWordDbm.getInstance(); + } + + /** @return The instance of DBMeta as my table type. (NotNull) */ + public SuggestBadWordDbm getMyDBMeta() { + return SuggestBadWordDbm.getInstance(); + } + + // =================================================================================== + // New Instance + // ============ + /** {@inheritDoc} */ + @Override + public SuggestBadWordCB newConditionBean() { + return new SuggestBadWordCB(); + } + + /** @return The instance of new entity as my table type. (NotNull) */ + public SuggestBadWord newMyEntity() { + return new SuggestBadWord(); + } + + /** @return The instance of new condition-bean as my table type. (NotNull) */ + public SuggestBadWordCB newMyConditionBean() { + return new SuggestBadWordCB(); + } + + // =================================================================================== + // Count Select + // ============ + /** + * Select the count of uniquely-selected records by the condition-bean. {IgnorePagingCondition, IgnoreSpecifyColumn}
+ * SpecifyColumn is ignored but you can use it only to remove text type column for union's distinct. + *
+     * SuggestBadWordCB cb = new SuggestBadWordCB();
+     * cb.query().setFoo...(value);
+     * int count = suggestBadWordBhv.selectCount(cb);
+     * 
+ * @param cb The condition-bean of SuggestBadWord. (NotNull) + * @return The count for the condition. (NotMinus) + */ + public int selectCount(final SuggestBadWordCB cb) { + return facadeSelectCount(cb); + } + + // =================================================================================== + // Entity Select + // ============= + /** + * Select the entity by the condition-bean. #beforejava8
+ * The return might be null if no data, so you should have null check.
+ * If the data always exists as your business rule, use selectEntityWithDeletedCheck(). + *
+     * SuggestBadWordCB cb = new SuggestBadWordCB();
+     * cb.query().setFoo...(value);
+     * SuggestBadWord suggestBadWord = suggestBadWordBhv.selectEntity(cb);
+     * if (suggestBadWord != null) { // null check
+     *     ... = suggestBadWord.get...();
+     * } else {
+     *     ...
+     * }
+     * 
+ * @param cb The condition-bean of SuggestBadWord. (NotNull) + * @return The entity selected by the condition. (NullAllowed: if no data, it returns null) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception SelectEntityConditionNotFoundException When the condition for selecting an entity is not found. + */ + public SuggestBadWord selectEntity(final SuggestBadWordCB cb) { + return facadeSelectEntity(cb); + } + + protected SuggestBadWord facadeSelectEntity(final SuggestBadWordCB cb) { + return doSelectEntity(cb, typeOfSelectedEntity()); + } + + protected OptionalEntity doSelectOptionalEntity( + final SuggestBadWordCB cb, final Class tp) { + return createOptionalEntity(doSelectEntity(cb, tp), cb); + } + + @Override + protected Entity doReadEntity(final ConditionBean cb) { + return facadeSelectEntity(downcast(cb)); + } + + /** + * Select the entity by the condition-bean with deleted check.
+ * If the data always exists as your business rule, this method is good. + *
+     * SuggestBadWordCB cb = new SuggestBadWordCB();
+     * cb.query().setFoo...(value);
+     * SuggestBadWord suggestBadWord = suggestBadWordBhv.selectEntityWithDeletedCheck(cb);
+     * ... = suggestBadWord.get...(); // the entity always be not null
+     * 
+ * @param cb The condition-bean of SuggestBadWord. (NotNull) + * @return The entity selected by the condition. (NotNull: if no data, throws exception) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception SelectEntityConditionNotFoundException When the condition for selecting an entity is not found. + */ + public SuggestBadWord selectEntityWithDeletedCheck(final SuggestBadWordCB cb) { + return facadeSelectEntityWithDeletedCheck(cb); + } + + /** + * Select the entity by the primary-key value. + * @param id : PK, ID, NotNull, BIGINT(19). (NotNull) + * @return The entity selected by the PK. (NullAllowed: if no data, it returns null) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception SelectEntityConditionNotFoundException When the condition for selecting an entity is not found. + */ + public SuggestBadWord selectByPKValue(final Long id) { + return facadeSelectByPKValue(id); + } + + protected SuggestBadWord facadeSelectByPKValue(final Long id) { + return doSelectByPK(id, typeOfSelectedEntity()); + } + + protected ENTITY doSelectByPK( + final Long id, final Class tp) { + return doSelectEntity(xprepareCBAsPK(id), tp); + } + + protected OptionalEntity doSelectOptionalByPK( + final Long id, final Class tp) { + return createOptionalEntity(doSelectByPK(id, tp), id); + } + + /** + * Select the entity by the primary-key value with deleted check. + * @param id : PK, ID, NotNull, BIGINT(19). (NotNull) + * @return The entity selected by the PK. (NotNull: if no data, throws exception) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception SelectEntityConditionNotFoundException When the condition for selecting an entity is not found. + */ + public SuggestBadWord selectByPKValueWithDeletedCheck(final Long id) { + return doSelectByPKWithDeletedCheck(id, typeOfSelectedEntity()); + } + + protected ENTITY doSelectByPKWithDeletedCheck( + final Long id, final Class tp) { + return doSelectEntityWithDeletedCheck(xprepareCBAsPK(id), tp); + } + + protected SuggestBadWordCB xprepareCBAsPK(final Long id) { + assertObjectNotNull("id", id); + return newConditionBean().acceptPK(id); + } + + // =================================================================================== + // List Select + // =========== + /** + * Select the list as result bean. + *
+     * SuggestBadWordCB cb = new SuggestBadWordCB();
+     * cb.query().setFoo...(value);
+     * cb.query().addOrderBy_Bar...();
+     * ListResultBean<SuggestBadWord> suggestBadWordList = suggestBadWordBhv.selectList(cb);
+     * for (SuggestBadWord suggestBadWord : suggestBadWordList) {
+     *     ... = suggestBadWord.get...();
+     * }
+     * 
+ * @param cb The condition-bean of SuggestBadWord. (NotNull) + * @return The result bean of selected list. (NotNull: if no data, returns empty list) + * @exception DangerousResultSizeException When the result size is over the specified safety size. + */ + public ListResultBean selectList(final SuggestBadWordCB cb) { + return facadeSelectList(cb); + } + + // =================================================================================== + // Page Select + // =========== + /** + * Select the page as result bean.
+ * (both count-select and paging-select are executed) + *
+     * SuggestBadWordCB cb = new SuggestBadWordCB();
+     * cb.query().setFoo...(value);
+     * cb.query().addOrderBy_Bar...();
+     * cb.paging(20, 3); // 20 records per a page and current page number is 3
+     * PagingResultBean<SuggestBadWord> page = suggestBadWordBhv.selectPage(cb);
+     * int allRecordCount = page.getAllRecordCount();
+     * int allPageCount = page.getAllPageCount();
+     * boolean isExistPrePage = page.isExistPrePage();
+     * boolean isExistNextPage = page.isExistNextPage();
+     * ...
+     * for (SuggestBadWord suggestBadWord : page) {
+     *     ... = suggestBadWord.get...();
+     * }
+     * 
+ * @param cb The condition-bean of SuggestBadWord. (NotNull) + * @return The result bean of selected page. (NotNull: if no data, returns bean as empty list) + * @exception DangerousResultSizeException When the result size is over the specified safety size. + */ + public PagingResultBean selectPage(final SuggestBadWordCB cb) { + return facadeSelectPage(cb); + } + + // =================================================================================== + // Cursor Select + // ============= + /** + * Select the cursor by the condition-bean. + *
+     * SuggestBadWordCB cb = new SuggestBadWordCB();
+     * cb.query().setFoo...(value);
+     * suggestBadWordBhv.selectCursor(cb, new EntityRowHandler<SuggestBadWord>() {
+     *     public void handle(SuggestBadWord entity) {
+     *         ... = entity.getFoo...();
+     *     }
+     * });
+     * 
+ * @param cb The condition-bean of SuggestBadWord. (NotNull) + * @param entityRowHandler The handler of entity row of SuggestBadWord. (NotNull) + */ + public void selectCursor(final SuggestBadWordCB cb, + final EntityRowHandler entityRowHandler) { + facadeSelectCursor(cb, entityRowHandler); + } + + // =================================================================================== + // Scalar Select + // ============= + /** + * Select the scalar value derived by a function from uniquely-selected records.
+ * You should call a function method after this method called like as follows: + *
+     * suggestBadWordBhv.scalarSelect(Date.class).max(new ScalarQuery() {
+     *     public void query(SuggestBadWordCB cb) {
+     *         cb.specify().columnFooDatetime(); // required for a function
+     *         cb.query().setBarName_PrefixSearch("S");
+     *     }
+     * });
+     * 
+ * @param The type of result. + * @param resultType The type of result. (NotNull) + * @return The scalar function object to specify function for scalar value. (NotNull) + */ + public HpSLSFunction scalarSelect( + final Class resultType) { + return facadeScalarSelect(resultType); + } + + // =================================================================================== + // Sequence + // ======== + @Override + protected Number doReadNextVal() { + final String msg = "This table is NOT related to sequence: " + + getTableDbName(); + throw new UnsupportedOperationException(msg); + } + + // =================================================================================== + // Load Referrer + // ============= + /** + * Load referrer by the the referrer loader.
+ *
+     * MemberCB cb = new MemberCB();
+     * cb.query().set...
+     * List<Member> memberList = memberBhv.selectList(cb);
+     * memberBhv.load(memberList, loader -> {
+     *     loader.loadPurchaseList(purchaseCB -> {
+     *         purchaseCB.query().set...
+     *         purchaseCB.query().addOrderBy_PurchasePrice_Desc();
+     *     }); // you can also load nested referrer from here
+     *     //}).withNestedList(purchaseLoader -> {
+     *     //    purchaseLoader.loadPurchasePaymentList(...);
+     *     //});
+     *
+     *     // you can also pull out foreign table and load its referrer
+     *     // (setupSelect of the foreign table should be called)
+     *     //loader.pulloutMemberStatus().loadMemberLoginList(...)
+     * }
+     * for (Member member : memberList) {
+     *     List<Purchase> purchaseList = member.getPurchaseList();
+     *     for (Purchase purchase : purchaseList) {
+     *         ...
+     *     }
+     * }
+     * 
+ * About internal policy, the value of primary key (and others too) is treated as case-insensitive.
+ * The condition-bean, which the set-upper provides, has order by FK before callback. + * @param suggestBadWordList The entity list of suggestBadWord. (NotNull) + * @param handler The callback to handle the referrer loader for actually loading referrer. (NotNull) + */ + public void load(final List suggestBadWordList, + final ReferrerLoaderHandler handler) { + xassLRArg(suggestBadWordList, handler); + handler.handle(new LoaderOfSuggestBadWord().ready(suggestBadWordList, + _behaviorSelector)); + } + + /** + * Load referrer of ${referrer.referrerJavaBeansRulePropertyName} by the referrer loader.
+ *
+     * MemberCB cb = new MemberCB();
+     * cb.query().set...
+     * Member member = memberBhv.selectEntityWithDeletedCheck(cb);
+     * memberBhv.load(member, loader -> {
+     *     loader.loadPurchaseList(purchaseCB -> {
+     *         purchaseCB.query().set...
+     *         purchaseCB.query().addOrderBy_PurchasePrice_Desc();
+     *     }); // you can also load nested referrer from here
+     *     //}).withNestedList(purchaseLoader -> {
+     *     //    purchaseLoader.loadPurchasePaymentList(...);
+     *     //});
+     *
+     *     // you can also pull out foreign table and load its referrer
+     *     // (setupSelect of the foreign table should be called)
+     *     //loader.pulloutMemberStatus().loadMemberLoginList(...)
+     * }
+     * for (Member member : memberList) {
+     *     List<Purchase> purchaseList = member.getPurchaseList();
+     *     for (Purchase purchase : purchaseList) {
+     *         ...
+     *     }
+     * }
+     * 
+ * About internal policy, the value of primary key (and others too) is treated as case-insensitive.
+ * The condition-bean, which the set-upper provides, has order by FK before callback. + * @param suggestBadWord The entity of suggestBadWord. (NotNull) + * @param handler The callback to handle the referrer loader for actually loading referrer. (NotNull) + */ + public void load(final SuggestBadWord suggestBadWord, + final ReferrerLoaderHandler handler) { + xassLRArg(suggestBadWord, handler); + handler.handle(new LoaderOfSuggestBadWord().ready( + xnewLRAryLs(suggestBadWord), _behaviorSelector)); + } + + // =================================================================================== + // Pull out Relation + // ================= + // =================================================================================== + // Extract Column + // ============== + /** + * Extract the value list of (single) primary key id. + * @param suggestBadWordList The list of suggestBadWord. (NotNull, EmptyAllowed) + * @return The list of the column value. (NotNull, EmptyAllowed, NotNullElement) + */ + public List extractIdList( + final List suggestBadWordList) { + return helpExtractListInternally(suggestBadWordList, "id"); + } + + // =================================================================================== + // Entity Update + // ============= + /** + * Insert the entity modified-only. (DefaultConstraintsEnabled) + *
+     * SuggestBadWord suggestBadWord = new SuggestBadWord();
+     * // if auto-increment, you don't need to set the PK value
+     * suggestBadWord.setFoo...(value);
+     * suggestBadWord.setBar...(value);
+     * // you don't need to set values of common columns
+     * //suggestBadWord.setRegisterUser(value);
+     * //suggestBadWord.set...;
+     * suggestBadWordBhv.insert(suggestBadWord);
+     * ... = suggestBadWord.getPK...(); // if auto-increment, you can get the value after
+     * 
+ *

While, when the entity is created by select, all columns are registered.

+ * @param suggestBadWord The entity of insert. (NotNull, PrimaryKeyNullAllowed: when auto-increment) + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void insert(final SuggestBadWord suggestBadWord) { + doInsert(suggestBadWord, null); + } + + /** + * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl) + *
+     * SuggestBadWord suggestBadWord = new SuggestBadWord();
+     * suggestBadWord.setPK...(value); // required
+     * suggestBadWord.setFoo...(value); // you should set only modified columns
+     * // you don't need to set values of common columns
+     * //suggestBadWord.setRegisterUser(value);
+     * //suggestBadWord.set...;
+     * // if exclusive control, the value of concurrency column is required
+     * suggestBadWord.setVersionNo(value);
+     * try {
+     *     suggestBadWordBhv.update(suggestBadWord);
+     * } catch (EntityAlreadyUpdatedException e) { // if concurrent update
+     *     ...
+     * }
+     * 
+ * @param suggestBadWord The entity of update. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void update(final SuggestBadWord suggestBadWord) { + doUpdate(suggestBadWord, null); + } + + /** + * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl) + *
+     * SuggestBadWord suggestBadWord = new SuggestBadWord();
+     * suggestBadWord.setPK...(value); // required
+     * suggestBadWord.setFoo...(value); // you should set only modified columns
+     * // you don't need to set values of common columns
+     * //suggestBadWord.setRegisterUser(value);
+     * //suggestBadWord.set...;
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //suggestBadWord.setVersionNo(value);
+     * suggestBadWordBhv.updateNonstrict(suggestBadWord);
+     * 
+ * @param suggestBadWord The entity of update. (NotNull, PrimaryKeyNotNull) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void updateNonstrict(final SuggestBadWord suggestBadWord) { + doUpdateNonstrict(suggestBadWord, null); + } + + /** + * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl)
+ * if (the entity has no PK) { insert() } else { update(), but no data, insert() }
+ *

Attention, you cannot update by unique keys instead of PK.

+ * @param suggestBadWord The entity of insert or update. (NotNull, ...depends on insert or update) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void insertOrUpdate(final SuggestBadWord suggestBadWord) { + doInsertOrUpdate(suggestBadWord, null, null); + } + + /** + * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+ * if (the entity has no PK) { insert() } else { update(), but no data, insert() } + *

Attention, you cannot update by unique keys instead of PK.

+ * @param suggestBadWord The entity of insert or update. (NotNull, ...depends on insert or update) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void insertOrUpdateNonstrict(final SuggestBadWord suggestBadWord) { + doInsertOrUpdateNonstrict(suggestBadWord, null, null); + } + + /** + * Delete the entity. (ZeroUpdateException, ExclusiveControl) + *
+     * SuggestBadWord suggestBadWord = new SuggestBadWord();
+     * suggestBadWord.setPK...(value); // required
+     * // if exclusive control, the value of concurrency column is required
+     * suggestBadWord.setVersionNo(value);
+     * try {
+     *     suggestBadWordBhv.delete(suggestBadWord);
+     * } catch (EntityAlreadyUpdatedException e) { // if concurrent update
+     *     ...
+     * }
+     * 
+ * @param suggestBadWord The entity of delete. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + */ + public void delete(final SuggestBadWord suggestBadWord) { + doDelete(suggestBadWord, null); + } + + /** + * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl} + *
+     * SuggestBadWord suggestBadWord = new SuggestBadWord();
+     * suggestBadWord.setPK...(value); // required
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //suggestBadWord.setVersionNo(value);
+     * suggestBadWordBhv.deleteNonstrict(suggestBadWord);
+     * 
+ * @param suggestBadWord The entity of delete. (NotNull, PrimaryKeyNotNull) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + */ + public void deleteNonstrict(final SuggestBadWord suggestBadWord) { + doDeleteNonstrict(suggestBadWord, null); + } + + /** + * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl} + *
+     * SuggestBadWord suggestBadWord = new SuggestBadWord();
+     * suggestBadWord.setPK...(value); // required
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //suggestBadWord.setVersionNo(value);
+     * suggestBadWordBhv.deleteNonstrictIgnoreDeleted(suggestBadWord);
+     * // if the target entity doesn't exist, no exception
+     * 
+ * @param suggestBadWord The entity of delete. (NotNull, PrimaryKeyNotNull) + * @exception EntityDuplicatedException When the entity has been duplicated. + */ + public void deleteNonstrictIgnoreDeleted(final SuggestBadWord suggestBadWord) { + doDeleteNonstrictIgnoreDeleted(suggestBadWord, null); + } + + protected void doDeleteNonstrictIgnoreDeleted(final SuggestBadWord et, + final DeleteOption op) { + assertObjectNotNull("suggestBadWord", et); + prepareDeleteOption(op); + helpDeleteNonstrictIgnoreDeletedInternally(et, op); + } + + // =================================================================================== + // Batch Update + // ============ + /** + * Batch-insert the entity list modified-only of same-set columns. (DefaultConstraintsEnabled)
+ * This method uses executeBatch() of java.sql.PreparedStatement.
+ *

The columns of least common multiple are registered like this:

+ *
+     * for (... : ...) {
+     *     SuggestBadWord suggestBadWord = new SuggestBadWord();
+     *     suggestBadWord.setFooName("foo");
+     *     if (...) {
+     *         suggestBadWord.setFooPrice(123);
+     *     }
+     *     // FOO_NAME and FOO_PRICE (and record meta columns) are registered
+     *     // FOO_PRICE not-called in any entities are registered as null without default value
+     *     // columns not-called in all entities are registered as null or default value
+     *     suggestBadWordList.add(suggestBadWord);
+     * }
+     * suggestBadWordBhv.batchInsert(suggestBadWordList);
+     * 
+ *

While, when the entities are created by select, all columns are registered.

+ *

And if the table has an identity, entities after the process don't have incremented values. + * (When you use the (normal) insert(), you can get the incremented value from your entity)

+ * @param suggestBadWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment) + * @return The array of inserted count. (NotNull, EmptyAllowed) + */ + public int[] batchInsert(final List suggestBadWordList) { + return doBatchInsert(suggestBadWordList, null); + } + + /** + * Batch-update the entity list modified-only of same-set columns. (ExclusiveControl)
+ * This method uses executeBatch() of java.sql.PreparedStatement.
+ * You should specify same-set columns to all entities like this: + *
+     * for (... : ...) {
+     *     SuggestBadWord suggestBadWord = new SuggestBadWord();
+     *     suggestBadWord.setFooName("foo");
+     *     if (...) {
+     *         suggestBadWord.setFooPrice(123);
+     *     } else {
+     *         suggestBadWord.setFooPrice(null); // updated as null
+     *         //suggestBadWord.setFooDate(...); // *not allowed, fragmented
+     *     }
+     *     // FOO_NAME and FOO_PRICE (and record meta columns) are updated
+     *     // (others are not updated: their values are kept)
+     *     suggestBadWordList.add(suggestBadWord);
+     * }
+     * suggestBadWordBhv.batchUpdate(suggestBadWordList);
+     * 
+ * @param suggestBadWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + * @exception BatchEntityAlreadyUpdatedException When the entity has already been updated. This exception extends EntityAlreadyUpdatedException. + */ + public int[] batchUpdate(final List suggestBadWordList) { + return doBatchUpdate(suggestBadWordList, null); + } + + /** + * Batch-update the entity list specified-only. (ExclusiveControl)
+ * This method uses executeBatch() of java.sql.PreparedStatement. + *
+     * // e.g. update two columns only
+     * suggestBadWordBhv.batchUpdate(suggestBadWordList, new SpecifyQuery() {
+     *     public void specify(SuggestBadWordCB cb) { // the two only updated
+     *         cb.specify().columnFooStatusCode(); // should be modified in any entities
+     *         cb.specify().columnBarDate(); // should be modified in any entities
+     *     }
+     * });
+     * // e.g. update every column in the table
+     * suggestBadWordBhv.batchUpdate(suggestBadWordList, new SpecifyQuery() {
+     *     public void specify(SuggestBadWordCB cb) { // all columns are updated
+     *         cb.specify().columnEveryColumn(); // no check of modified properties
+     *     }
+     * });
+     * 
+ *

You can specify update columns used on set clause of update statement. + * However you do not need to specify common columns for update + * and an optimistic lock column because they are specified implicitly.

+ *

And you should specify columns that are modified in any entities (at least one entity). + * But if you specify every column, it has no check.

+ * @param suggestBadWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @param updateColumnSpec The specification of update columns. (NotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + * @exception BatchEntityAlreadyUpdatedException When the entity has already been updated. This exception extends EntityAlreadyUpdatedException. + */ + public int[] batchUpdate(final List suggestBadWordList, + final SpecifyQuery updateColumnSpec) { + return doBatchUpdate(suggestBadWordList, + createSpecifiedUpdateOption(updateColumnSpec)); + } + + /** + * Batch-update the entity list non-strictly modified-only of same-set columns. (NonExclusiveControl)
+ * This method uses executeBatch() of java.sql.PreparedStatement.
+ * You should specify same-set columns to all entities like this: + *
+     * for (... : ...) {
+     *     SuggestBadWord suggestBadWord = new SuggestBadWord();
+     *     suggestBadWord.setFooName("foo");
+     *     if (...) {
+     *         suggestBadWord.setFooPrice(123);
+     *     } else {
+     *         suggestBadWord.setFooPrice(null); // updated as null
+     *         //suggestBadWord.setFooDate(...); // *not allowed, fragmented
+     *     }
+     *     // FOO_NAME and FOO_PRICE (and record meta columns) are updated
+     *     // (others are not updated: their values are kept)
+     *     suggestBadWordList.add(suggestBadWord);
+     * }
+     * suggestBadWordBhv.batchUpdate(suggestBadWordList);
+     * 
+ * @param suggestBadWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + */ + public int[] batchUpdateNonstrict( + final List suggestBadWordList) { + return doBatchUpdateNonstrict(suggestBadWordList, null); + } + + /** + * Batch-update the entity list non-strictly specified-only. (NonExclusiveControl)
+ * This method uses executeBatch() of java.sql.PreparedStatement. + *
+     * // e.g. update two columns only
+     * suggestBadWordBhv.batchUpdateNonstrict(suggestBadWordList, new SpecifyQuery() {
+     *     public void specify(SuggestBadWordCB cb) { // the two only updated
+     *         cb.specify().columnFooStatusCode(); // should be modified in any entities
+     *         cb.specify().columnBarDate(); // should be modified in any entities
+     *     }
+     * });
+     * // e.g. update every column in the table
+     * suggestBadWordBhv.batchUpdateNonstrict(suggestBadWordList, new SpecifyQuery() {
+     *     public void specify(SuggestBadWordCB cb) { // all columns are updated
+     *         cb.specify().columnEveryColumn(); // no check of modified properties
+     *     }
+     * });
+     * 
+ *

You can specify update columns used on set clause of update statement. + * However you do not need to specify common columns for update + * and an optimistic lock column because they are specified implicitly.

+ *

And you should specify columns that are modified in any entities (at least one entity).

+ * @param suggestBadWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param updateColumnSpec The specification of update columns. (NotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + */ + public int[] batchUpdateNonstrict( + final List suggestBadWordList, + final SpecifyQuery updateColumnSpec) { + return doBatchUpdateNonstrict(suggestBadWordList, + createSpecifiedUpdateOption(updateColumnSpec)); + } + + /** + * Batch-delete the entity list. (ExclusiveControl)
+ * This method uses executeBatch() of java.sql.PreparedStatement. + * @param suggestBadWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @return The array of deleted count. (NotNull, EmptyAllowed) + * @exception BatchEntityAlreadyUpdatedException When the entity has already been updated. This exception extends EntityAlreadyUpdatedException. + */ + public int[] batchDelete(final List suggestBadWordList) { + return doBatchDelete(suggestBadWordList, null); + } + + /** + * Batch-delete the entity list non-strictly. {NonExclusiveControl}
+ * This method uses executeBatch() of java.sql.PreparedStatement. + * @param suggestBadWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @return The array of deleted count. (NotNull, EmptyAllowed) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + */ + public int[] batchDeleteNonstrict( + final List suggestBadWordList) { + return doBatchDeleteNonstrict(suggestBadWordList, null); + } + + // =================================================================================== + // Query Update + // ============ + /** + * Insert the several entities by query (modified-only for fixed value). + *
+     * suggestBadWordBhv.queryInsert(new QueryInsertSetupper<SuggestBadWord, SuggestBadWordCB>() {
+     *     public ConditionBean setup(SuggestBadWord entity, SuggestBadWordCB intoCB) {
+     *         FooCB cb = FooCB();
+     *         cb.setupSelect_Bar();
+     *
+     *         // mapping
+     *         intoCB.specify().columnMyName().mappedFrom(cb.specify().columnFooName());
+     *         intoCB.specify().columnMyCount().mappedFrom(cb.specify().columnFooCount());
+     *         intoCB.specify().columnMyDate().mappedFrom(cb.specify().specifyBar().columnBarDate());
+     *         entity.setMyFixedValue("foo"); // fixed value
+     *         // you don't need to set values of common columns
+     *         //entity.setRegisterUser(value);
+     *         //entity.set...;
+     *         // you don't need to set a value of concurrency column
+     *         //entity.setVersionNo(value);
+     *
+     *         return cb;
+     *     }
+     * });
+     * 
+ * @param setupper The set-upper of query-insert. (NotNull) + * @return The inserted count. + */ + public int queryInsert( + final QueryInsertSetupper setupper) { + return doQueryInsert(setupper, null); + } + + /** + * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) + *
+     * SuggestBadWord suggestBadWord = new SuggestBadWord();
+     * // you don't need to set PK value
+     * //suggestBadWord.setPK...(value);
+     * suggestBadWord.setFoo...(value); // you should set only modified columns
+     * // you don't need to set values of common columns
+     * //suggestBadWord.setRegisterUser(value);
+     * //suggestBadWord.set...;
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //suggestBadWord.setVersionNo(value);
+     * SuggestBadWordCB cb = new SuggestBadWordCB();
+     * cb.query().setFoo...(value);
+     * suggestBadWordBhv.queryUpdate(suggestBadWord, cb);
+     * 
+ * @param suggestBadWord The entity that contains update values. (NotNull, PrimaryKeyNullAllowed) + * @param cb The condition-bean of SuggestBadWord. (NotNull) + * @return The updated count. + * @exception NonQueryUpdateNotAllowedException When the query has no condition. + */ + public int queryUpdate(final SuggestBadWord suggestBadWord, + final SuggestBadWordCB cb) { + return doQueryUpdate(suggestBadWord, cb, null); + } + + /** + * Delete the several entities by query. (NonExclusiveControl) + *
+     * SuggestBadWordCB cb = new SuggestBadWordCB();
+     * cb.query().setFoo...(value);
+     * suggestBadWordBhv.queryDelete(suggestBadWord, cb);
+     * 
+ * @param cb The condition-bean of SuggestBadWord. (NotNull) + * @return The deleted count. + * @exception NonQueryDeleteNotAllowedException When the query has no condition. + */ + public int queryDelete(final SuggestBadWordCB cb) { + return doQueryDelete(cb, null); + } + + // =================================================================================== + // Varying Update + // ============== + // ----------------------------------------------------- + // Entity Update + // ------------- + /** + * Insert the entity with varying requests.
+ * For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
+ * Other specifications are same as insert(entity). + *
+     * SuggestBadWord suggestBadWord = new SuggestBadWord();
+     * // if auto-increment, you don't need to set the PK value
+     * suggestBadWord.setFoo...(value);
+     * suggestBadWord.setBar...(value);
+     * InsertOption option = new InsertOption();
+     * // you can insert by your values for common columns
+     * option.disableCommonColumnAutoSetup();
+     * suggestBadWordBhv.varyingInsert(suggestBadWord, option);
+     * ... = suggestBadWord.getPK...(); // if auto-increment, you can get the value after
+     * 
+ * @param suggestBadWord The entity of insert. (NotNull, PrimaryKeyNullAllowed: when auto-increment) + * @param option The option of insert for varying requests. (NotNull) + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void varyingInsert(final SuggestBadWord suggestBadWord, + final InsertOption option) { + assertInsertOptionNotNull(option); + doInsert(suggestBadWord, option); + } + + /** + * Update the entity with varying requests modified-only. (ZeroUpdateException, ExclusiveControl)
+ * For example, self(selfCalculationSpecification), specify(updateColumnSpecification), disableCommonColumnAutoSetup().
+ * Other specifications are same as update(entity). + *
+     * SuggestBadWord suggestBadWord = new SuggestBadWord();
+     * suggestBadWord.setPK...(value); // required
+     * suggestBadWord.setOther...(value); // you should set only modified columns
+     * // if exclusive control, the value of concurrency column is required
+     * suggestBadWord.setVersionNo(value);
+     * try {
+     *     // you can update by self calculation values
+     *     UpdateOption<SuggestBadWordCB> option = new UpdateOption<SuggestBadWordCB>();
+     *     option.self(new SpecifyQuery<SuggestBadWordCB>() {
+     *         public void specify(SuggestBadWordCB cb) {
+     *             cb.specify().columnXxxCount();
+     *         }
+     *     }).plus(1); // XXX_COUNT = XXX_COUNT + 1
+     *     suggestBadWordBhv.varyingUpdate(suggestBadWord, option);
+     * } catch (EntityAlreadyUpdatedException e) { // if concurrent update
+     *     ...
+     * }
+     * 
+ * @param suggestBadWord The entity of update. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @param option The option of update for varying requests. (NotNull) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void varyingUpdate(final SuggestBadWord suggestBadWord, + final UpdateOption option) { + assertUpdateOptionNotNull(option); + doUpdate(suggestBadWord, option); + } + + /** + * Update the entity with varying requests non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
+ * For example, self(selfCalculationSpecification), specify(updateColumnSpecification), disableCommonColumnAutoSetup().
+ * Other specifications are same as updateNonstrict(entity). + *
+     * // ex) you can update by self calculation values
+     * SuggestBadWord suggestBadWord = new SuggestBadWord();
+     * suggestBadWord.setPK...(value); // required
+     * suggestBadWord.setOther...(value); // you should set only modified columns
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //suggestBadWord.setVersionNo(value);
+     * UpdateOption<SuggestBadWordCB> option = new UpdateOption<SuggestBadWordCB>();
+     * option.self(new SpecifyQuery<SuggestBadWordCB>() {
+     *     public void specify(SuggestBadWordCB cb) {
+     *         cb.specify().columnFooCount();
+     *     }
+     * }).plus(1); // FOO_COUNT = FOO_COUNT + 1
+     * suggestBadWordBhv.varyingUpdateNonstrict(suggestBadWord, option);
+     * 
+ * @param suggestBadWord The entity of update. (NotNull, PrimaryKeyNotNull) + * @param option The option of update for varying requests. (NotNull) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void varyingUpdateNonstrict(final SuggestBadWord suggestBadWord, + final UpdateOption option) { + assertUpdateOptionNotNull(option); + doUpdateNonstrict(suggestBadWord, option); + } + + /** + * Insert or update the entity with varying requests. (ExclusiveControl: when update)
+ * Other specifications are same as insertOrUpdate(entity). + * @param suggestBadWord The entity of insert or update. (NotNull) + * @param insertOption The option of insert for varying requests. (NotNull) + * @param updateOption The option of update for varying requests. (NotNull) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void varyingInsertOrUpdate(final SuggestBadWord suggestBadWord, + final InsertOption insertOption, + final UpdateOption updateOption) { + assertInsertOptionNotNull(insertOption); + assertUpdateOptionNotNull(updateOption); + doInsertOrUpdate(suggestBadWord, insertOption, updateOption); + } + + /** + * Insert or update the entity with varying requests non-strictly. (NonExclusiveControl: when update)
+ * Other specifications are same as insertOrUpdateNonstrict(entity). + * @param suggestBadWord The entity of insert or update. (NotNull) + * @param insertOption The option of insert for varying requests. (NotNull) + * @param updateOption The option of update for varying requests. (NotNull) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void varyingInsertOrUpdateNonstrict( + final SuggestBadWord suggestBadWord, + final InsertOption insertOption, + final UpdateOption updateOption) { + assertInsertOptionNotNull(insertOption); + assertUpdateOptionNotNull(updateOption); + doInsertOrUpdateNonstrict(suggestBadWord, insertOption, updateOption); + } + + /** + * Delete the entity with varying requests. (ZeroUpdateException, ExclusiveControl)
+ * Now a valid option does not exist.
+ * Other specifications are same as delete(entity). + * @param suggestBadWord The entity of delete. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @param option The option of update for varying requests. (NotNull) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + */ + public void varyingDelete(final SuggestBadWord suggestBadWord, + final DeleteOption option) { + assertDeleteOptionNotNull(option); + doDelete(suggestBadWord, option); + } + + /** + * Delete the entity with varying requests non-strictly. (ZeroUpdateException, NonExclusiveControl)
+ * Now a valid option does not exist.
+ * Other specifications are same as deleteNonstrict(entity). + * @param suggestBadWord The entity of delete. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @param option The option of update for varying requests. (NotNull) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + */ + public void varyingDeleteNonstrict(final SuggestBadWord suggestBadWord, + final DeleteOption option) { + assertDeleteOptionNotNull(option); + doDeleteNonstrict(suggestBadWord, option); + } + + // ----------------------------------------------------- + // Batch Update + // ------------ + /** + * Batch-insert the list with varying requests.
+ * For example, disableCommonColumnAutoSetup() + * , disablePrimaryKeyIdentity(), limitBatchInsertLogging().
+ * Other specifications are same as batchInsert(entityList). + * @param suggestBadWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param option The option of insert for varying requests. (NotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + */ + public int[] varyingBatchInsert( + final List suggestBadWordList, + final InsertOption option) { + assertInsertOptionNotNull(option); + return doBatchInsert(suggestBadWordList, option); + } + + /** + * Batch-update the list with varying requests.
+ * For example, self(selfCalculationSpecification), specify(updateColumnSpecification) + * , disableCommonColumnAutoSetup(), limitBatchUpdateLogging().
+ * Other specifications are same as batchUpdate(entityList). + * @param suggestBadWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param option The option of update for varying requests. (NotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + */ + public int[] varyingBatchUpdate( + final List suggestBadWordList, + final UpdateOption option) { + assertUpdateOptionNotNull(option); + return doBatchUpdate(suggestBadWordList, option); + } + + /** + * Batch-update the list with varying requests non-strictly.
+ * For example, self(selfCalculationSpecification), specify(updateColumnSpecification) + * , disableCommonColumnAutoSetup(), limitBatchUpdateLogging().
+ * Other specifications are same as batchUpdateNonstrict(entityList). + * @param suggestBadWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param option The option of update for varying requests. (NotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + */ + public int[] varyingBatchUpdateNonstrict( + final List suggestBadWordList, + final UpdateOption option) { + assertUpdateOptionNotNull(option); + return doBatchUpdateNonstrict(suggestBadWordList, option); + } + + /** + * Batch-delete the list with varying requests.
+ * For example, limitBatchDeleteLogging().
+ * Other specifications are same as batchDelete(entityList). + * @param suggestBadWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param option The option of delete for varying requests. (NotNull) + * @return The array of deleted count. (NotNull, EmptyAllowed) + */ + public int[] varyingBatchDelete( + final List suggestBadWordList, + final DeleteOption option) { + assertDeleteOptionNotNull(option); + return doBatchDelete(suggestBadWordList, option); + } + + /** + * Batch-delete the list with varying requests non-strictly.
+ * For example, limitBatchDeleteLogging().
+ * Other specifications are same as batchDeleteNonstrict(entityList). + * @param suggestBadWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param option The option of delete for varying requests. (NotNull) + * @return The array of deleted count. (NotNull, EmptyAllowed) + */ + public int[] varyingBatchDeleteNonstrict( + final List suggestBadWordList, + final DeleteOption option) { + assertDeleteOptionNotNull(option); + return doBatchDeleteNonstrict(suggestBadWordList, option); + } + + // ----------------------------------------------------- + // Query Update + // ------------ + /** + * Insert the several entities by query with varying requests (modified-only for fixed value).
+ * For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
+ * Other specifications are same as queryInsert(entity, setupper). + * @param setupper The set-upper of query-insert. (NotNull) + * @param option The option of insert for varying requests. (NotNull) + * @return The inserted count. + */ + public int varyingQueryInsert( + final QueryInsertSetupper setupper, + final InsertOption option) { + assertInsertOptionNotNull(option); + return doQueryInsert(setupper, option); + } + + /** + * Update the several entities by query with varying requests non-strictly modified-only. {NonExclusiveControl}
+ * For example, self(selfCalculationSpecification), specify(updateColumnSpecification) + * , disableCommonColumnAutoSetup(), allowNonQueryUpdate().
+ * Other specifications are same as queryUpdate(entity, cb). + *
+     * // ex) you can update by self calculation values
+     * SuggestBadWord suggestBadWord = new SuggestBadWord();
+     * // you don't need to set PK value
+     * //suggestBadWord.setPK...(value);
+     * suggestBadWord.setOther...(value); // you should set only modified columns
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //suggestBadWord.setVersionNo(value);
+     * SuggestBadWordCB cb = new SuggestBadWordCB();
+     * cb.query().setFoo...(value);
+     * UpdateOption<SuggestBadWordCB> option = new UpdateOption<SuggestBadWordCB>();
+     * option.self(new SpecifyQuery<SuggestBadWordCB>() {
+     *     public void specify(SuggestBadWordCB cb) {
+     *         cb.specify().columnFooCount();
+     *     }
+     * }).plus(1); // FOO_COUNT = FOO_COUNT + 1
+     * suggestBadWordBhv.varyingQueryUpdate(suggestBadWord, cb, option);
+     * 
+ * @param suggestBadWord The entity that contains update values. (NotNull) {PrimaryKeyNotRequired} + * @param cb The condition-bean of SuggestBadWord. (NotNull) + * @param option The option of update for varying requests. (NotNull) + * @return The updated count. + * @exception NonQueryUpdateNotAllowedException When the query has no condition (if not allowed). + */ + public int varyingQueryUpdate(final SuggestBadWord suggestBadWord, + final SuggestBadWordCB cb, + final UpdateOption option) { + assertUpdateOptionNotNull(option); + return doQueryUpdate(suggestBadWord, cb, option); + } + + /** + * Delete the several entities by query with varying requests non-strictly.
+ * For example, allowNonQueryDelete().
+ * Other specifications are same as batchUpdateNonstrict(entityList). + * @param cb The condition-bean of SuggestBadWord. (NotNull) + * @param option The option of delete for varying requests. (NotNull) + * @return The deleted count. + * @exception NonQueryDeleteNotAllowedException When the query has no condition (if not allowed). + */ + public int varyingQueryDelete(final SuggestBadWordCB cb, + final DeleteOption option) { + assertDeleteOptionNotNull(option); + return doQueryDelete(cb, option); + } + + // =================================================================================== + // OutsideSql + // ========== + /** + * Prepare the basic executor of outside-SQL to execute it.
+ * The invoker of behavior command should be not null when you call this method. + *
+     * You can use the methods for outside-SQL are as follows:
+     * {Basic}
+     *   o selectList()
+     *   o execute()
+     *   o call()
+     *
+     * {Entity}
+     *   o entityHandling().selectEntity()
+     *   o entityHandling().selectEntityWithDeletedCheck()
+     *
+     * {Paging}
+     *   o autoPaging().selectList()
+     *   o autoPaging().selectPage()
+     *   o manualPaging().selectList()
+     *   o manualPaging().selectPage()
+     *
+     * {Cursor}
+     *   o cursorHandling().selectCursor()
+     *
+     * {Option}
+     *   o dynamicBinding().selectList()
+     *   o removeBlockComment().selectList()
+     *   o removeLineComment().selectList()
+     *   o formatSql().selectList()
+     * 
+ * @return The basic executor of outside-SQL. (NotNull) + */ + public OutsideSqlBasicExecutor outsideSql() { + return doOutsideSql(); + } + + // =================================================================================== + // Optimistic Lock Info + // ==================== + @Override + protected boolean hasVersionNoValue(final Entity et) { + return downcast(et).getVersionNo() != null; + } + + // =================================================================================== + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { + return SuggestBadWord.class; + } + + @Override + protected Class typeOfHandlingEntity() { + return SuggestBadWord.class; + } + + @Override + protected Class typeOfHandlingConditionBean() { + return SuggestBadWordCB.class; + } +} diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsSuggestElevateWordBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsSuggestElevateWordBhv.java new file mode 100644 index 000000000..dabee1c5d --- /dev/null +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsSuggestElevateWordBhv.java @@ -0,0 +1,1262 @@ +/* + * 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; + +import java.util.List; + +import jp.sf.fess.db.bsbhv.loader.LoaderOfSuggestElevateWord; +import jp.sf.fess.db.bsentity.dbmeta.SuggestElevateWordDbm; +import jp.sf.fess.db.cbean.SuggestElevateWordCB; +import jp.sf.fess.db.exbhv.SuggestElevateWordBhv; +import jp.sf.fess.db.exentity.SuggestElevateWord; + +import org.seasar.dbflute.Entity; +import org.seasar.dbflute.bhv.AbstractBehaviorWritable; +import org.seasar.dbflute.bhv.DeleteOption; +import org.seasar.dbflute.bhv.InsertOption; +import org.seasar.dbflute.bhv.QueryInsertSetupper; +import org.seasar.dbflute.bhv.ReferrerLoaderHandler; +import org.seasar.dbflute.bhv.UpdateOption; +import org.seasar.dbflute.cbean.ConditionBean; +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.HpSLSFunction; +import org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException; +import org.seasar.dbflute.exception.DangerousResultSizeException; +import org.seasar.dbflute.exception.EntityAlreadyDeletedException; +import org.seasar.dbflute.exception.EntityAlreadyExistsException; +import org.seasar.dbflute.exception.EntityAlreadyUpdatedException; +import org.seasar.dbflute.exception.EntityDuplicatedException; +import org.seasar.dbflute.exception.NonQueryDeleteNotAllowedException; +import org.seasar.dbflute.exception.NonQueryUpdateNotAllowedException; +import org.seasar.dbflute.exception.SelectEntityConditionNotFoundException; +import org.seasar.dbflute.optional.OptionalEntity; +import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor; + +/** + * The behavior of SUGGEST_ELEVATE_WORD as TABLE.
+ *
+ * [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]
+ *
+ * 
+ * @author DBFlute(AutoGenerator) + */ +public abstract class BsSuggestElevateWordBhv extends + AbstractBehaviorWritable { + + // =================================================================================== + // Definition + // ========== + /*df:beginQueryPath*/ + /*df:endQueryPath*/ + + // =================================================================================== + // DBMeta + // ====== + /** {@inheritDoc} */ + @Override + public SuggestElevateWordDbm getDBMeta() { + return SuggestElevateWordDbm.getInstance(); + } + + /** @return The instance of DBMeta as my table type. (NotNull) */ + public SuggestElevateWordDbm getMyDBMeta() { + return SuggestElevateWordDbm.getInstance(); + } + + // =================================================================================== + // New Instance + // ============ + /** {@inheritDoc} */ + @Override + public SuggestElevateWordCB newConditionBean() { + return new SuggestElevateWordCB(); + } + + /** @return The instance of new entity as my table type. (NotNull) */ + public SuggestElevateWord newMyEntity() { + return new SuggestElevateWord(); + } + + /** @return The instance of new condition-bean as my table type. (NotNull) */ + public SuggestElevateWordCB newMyConditionBean() { + return new SuggestElevateWordCB(); + } + + // =================================================================================== + // Count Select + // ============ + /** + * Select the count of uniquely-selected records by the condition-bean. {IgnorePagingCondition, IgnoreSpecifyColumn}
+ * SpecifyColumn is ignored but you can use it only to remove text type column for union's distinct. + *
+     * SuggestElevateWordCB cb = new SuggestElevateWordCB();
+     * cb.query().setFoo...(value);
+     * int count = suggestElevateWordBhv.selectCount(cb);
+     * 
+ * @param cb The condition-bean of SuggestElevateWord. (NotNull) + * @return The count for the condition. (NotMinus) + */ + public int selectCount(final SuggestElevateWordCB cb) { + return facadeSelectCount(cb); + } + + // =================================================================================== + // Entity Select + // ============= + /** + * Select the entity by the condition-bean. #beforejava8
+ * The return might be null if no data, so you should have null check.
+ * If the data always exists as your business rule, use selectEntityWithDeletedCheck(). + *
+     * SuggestElevateWordCB cb = new SuggestElevateWordCB();
+     * cb.query().setFoo...(value);
+     * SuggestElevateWord suggestElevateWord = suggestElevateWordBhv.selectEntity(cb);
+     * if (suggestElevateWord != null) { // null check
+     *     ... = suggestElevateWord.get...();
+     * } else {
+     *     ...
+     * }
+     * 
+ * @param cb The condition-bean of SuggestElevateWord. (NotNull) + * @return The entity selected by the condition. (NullAllowed: if no data, it returns null) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception SelectEntityConditionNotFoundException When the condition for selecting an entity is not found. + */ + public SuggestElevateWord selectEntity(final SuggestElevateWordCB cb) { + return facadeSelectEntity(cb); + } + + protected SuggestElevateWord facadeSelectEntity( + final SuggestElevateWordCB cb) { + return doSelectEntity(cb, typeOfSelectedEntity()); + } + + protected OptionalEntity doSelectOptionalEntity( + final SuggestElevateWordCB cb, final Class tp) { + return createOptionalEntity(doSelectEntity(cb, tp), cb); + } + + @Override + protected Entity doReadEntity(final ConditionBean cb) { + return facadeSelectEntity(downcast(cb)); + } + + /** + * Select the entity by the condition-bean with deleted check.
+ * If the data always exists as your business rule, this method is good. + *
+     * SuggestElevateWordCB cb = new SuggestElevateWordCB();
+     * cb.query().setFoo...(value);
+     * SuggestElevateWord suggestElevateWord = suggestElevateWordBhv.selectEntityWithDeletedCheck(cb);
+     * ... = suggestElevateWord.get...(); // the entity always be not null
+     * 
+ * @param cb The condition-bean of SuggestElevateWord. (NotNull) + * @return The entity selected by the condition. (NotNull: if no data, throws exception) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception SelectEntityConditionNotFoundException When the condition for selecting an entity is not found. + */ + public SuggestElevateWord selectEntityWithDeletedCheck( + final SuggestElevateWordCB cb) { + return facadeSelectEntityWithDeletedCheck(cb); + } + + /** + * Select the entity by the primary-key value. + * @param id : PK, ID, NotNull, BIGINT(19). (NotNull) + * @return The entity selected by the PK. (NullAllowed: if no data, it returns null) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception SelectEntityConditionNotFoundException When the condition for selecting an entity is not found. + */ + public SuggestElevateWord selectByPKValue(final Long id) { + return facadeSelectByPKValue(id); + } + + protected SuggestElevateWord facadeSelectByPKValue(final Long id) { + return doSelectByPK(id, typeOfSelectedEntity()); + } + + protected ENTITY doSelectByPK( + final Long id, final Class tp) { + return doSelectEntity(xprepareCBAsPK(id), tp); + } + + protected OptionalEntity doSelectOptionalByPK( + final Long id, final Class tp) { + return createOptionalEntity(doSelectByPK(id, tp), id); + } + + /** + * Select the entity by the primary-key value with deleted check. + * @param id : PK, ID, NotNull, BIGINT(19). (NotNull) + * @return The entity selected by the PK. (NotNull: if no data, throws exception) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception SelectEntityConditionNotFoundException When the condition for selecting an entity is not found. + */ + public SuggestElevateWord selectByPKValueWithDeletedCheck(final Long id) { + return doSelectByPKWithDeletedCheck(id, typeOfSelectedEntity()); + } + + protected ENTITY doSelectByPKWithDeletedCheck( + final Long id, final Class tp) { + return doSelectEntityWithDeletedCheck(xprepareCBAsPK(id), tp); + } + + protected SuggestElevateWordCB xprepareCBAsPK(final Long id) { + assertObjectNotNull("id", id); + return newConditionBean().acceptPK(id); + } + + // =================================================================================== + // List Select + // =========== + /** + * Select the list as result bean. + *
+     * SuggestElevateWordCB cb = new SuggestElevateWordCB();
+     * cb.query().setFoo...(value);
+     * cb.query().addOrderBy_Bar...();
+     * ListResultBean<SuggestElevateWord> suggestElevateWordList = suggestElevateWordBhv.selectList(cb);
+     * for (SuggestElevateWord suggestElevateWord : suggestElevateWordList) {
+     *     ... = suggestElevateWord.get...();
+     * }
+     * 
+ * @param cb The condition-bean of SuggestElevateWord. (NotNull) + * @return The result bean of selected list. (NotNull: if no data, returns empty list) + * @exception DangerousResultSizeException When the result size is over the specified safety size. + */ + public ListResultBean selectList( + final SuggestElevateWordCB cb) { + return facadeSelectList(cb); + } + + // =================================================================================== + // Page Select + // =========== + /** + * Select the page as result bean.
+ * (both count-select and paging-select are executed) + *
+     * SuggestElevateWordCB cb = new SuggestElevateWordCB();
+     * cb.query().setFoo...(value);
+     * cb.query().addOrderBy_Bar...();
+     * cb.paging(20, 3); // 20 records per a page and current page number is 3
+     * PagingResultBean<SuggestElevateWord> page = suggestElevateWordBhv.selectPage(cb);
+     * int allRecordCount = page.getAllRecordCount();
+     * int allPageCount = page.getAllPageCount();
+     * boolean isExistPrePage = page.isExistPrePage();
+     * boolean isExistNextPage = page.isExistNextPage();
+     * ...
+     * for (SuggestElevateWord suggestElevateWord : page) {
+     *     ... = suggestElevateWord.get...();
+     * }
+     * 
+ * @param cb The condition-bean of SuggestElevateWord. (NotNull) + * @return The result bean of selected page. (NotNull: if no data, returns bean as empty list) + * @exception DangerousResultSizeException When the result size is over the specified safety size. + */ + public PagingResultBean selectPage( + final SuggestElevateWordCB cb) { + return facadeSelectPage(cb); + } + + // =================================================================================== + // Cursor Select + // ============= + /** + * Select the cursor by the condition-bean. + *
+     * SuggestElevateWordCB cb = new SuggestElevateWordCB();
+     * cb.query().setFoo...(value);
+     * suggestElevateWordBhv.selectCursor(cb, new EntityRowHandler<SuggestElevateWord>() {
+     *     public void handle(SuggestElevateWord entity) {
+     *         ... = entity.getFoo...();
+     *     }
+     * });
+     * 
+ * @param cb The condition-bean of SuggestElevateWord. (NotNull) + * @param entityRowHandler The handler of entity row of SuggestElevateWord. (NotNull) + */ + public void selectCursor(final SuggestElevateWordCB cb, + final EntityRowHandler entityRowHandler) { + facadeSelectCursor(cb, entityRowHandler); + } + + // =================================================================================== + // Scalar Select + // ============= + /** + * Select the scalar value derived by a function from uniquely-selected records.
+ * You should call a function method after this method called like as follows: + *
+     * suggestElevateWordBhv.scalarSelect(Date.class).max(new ScalarQuery() {
+     *     public void query(SuggestElevateWordCB cb) {
+     *         cb.specify().columnFooDatetime(); // required for a function
+     *         cb.query().setBarName_PrefixSearch("S");
+     *     }
+     * });
+     * 
+ * @param The type of result. + * @param resultType The type of result. (NotNull) + * @return The scalar function object to specify function for scalar value. (NotNull) + */ + public HpSLSFunction scalarSelect( + final Class resultType) { + return facadeScalarSelect(resultType); + } + + // =================================================================================== + // Sequence + // ======== + @Override + protected Number doReadNextVal() { + final String msg = "This table is NOT related to sequence: " + + getTableDbName(); + throw new UnsupportedOperationException(msg); + } + + // =================================================================================== + // Load Referrer + // ============= + /** + * Load referrer by the the referrer loader.
+ *
+     * MemberCB cb = new MemberCB();
+     * cb.query().set...
+     * List<Member> memberList = memberBhv.selectList(cb);
+     * memberBhv.load(memberList, loader -> {
+     *     loader.loadPurchaseList(purchaseCB -> {
+     *         purchaseCB.query().set...
+     *         purchaseCB.query().addOrderBy_PurchasePrice_Desc();
+     *     }); // you can also load nested referrer from here
+     *     //}).withNestedList(purchaseLoader -> {
+     *     //    purchaseLoader.loadPurchasePaymentList(...);
+     *     //});
+     *
+     *     // you can also pull out foreign table and load its referrer
+     *     // (setupSelect of the foreign table should be called)
+     *     //loader.pulloutMemberStatus().loadMemberLoginList(...)
+     * }
+     * for (Member member : memberList) {
+     *     List<Purchase> purchaseList = member.getPurchaseList();
+     *     for (Purchase purchase : purchaseList) {
+     *         ...
+     *     }
+     * }
+     * 
+ * About internal policy, the value of primary key (and others too) is treated as case-insensitive.
+ * The condition-bean, which the set-upper provides, has order by FK before callback. + * @param suggestElevateWordList The entity list of suggestElevateWord. (NotNull) + * @param handler The callback to handle the referrer loader for actually loading referrer. (NotNull) + */ + public void load(final List suggestElevateWordList, + final ReferrerLoaderHandler handler) { + xassLRArg(suggestElevateWordList, handler); + handler.handle(new LoaderOfSuggestElevateWord().ready( + suggestElevateWordList, _behaviorSelector)); + } + + /** + * Load referrer of ${referrer.referrerJavaBeansRulePropertyName} by the referrer loader.
+ *
+     * MemberCB cb = new MemberCB();
+     * cb.query().set...
+     * Member member = memberBhv.selectEntityWithDeletedCheck(cb);
+     * memberBhv.load(member, loader -> {
+     *     loader.loadPurchaseList(purchaseCB -> {
+     *         purchaseCB.query().set...
+     *         purchaseCB.query().addOrderBy_PurchasePrice_Desc();
+     *     }); // you can also load nested referrer from here
+     *     //}).withNestedList(purchaseLoader -> {
+     *     //    purchaseLoader.loadPurchasePaymentList(...);
+     *     //});
+     *
+     *     // you can also pull out foreign table and load its referrer
+     *     // (setupSelect of the foreign table should be called)
+     *     //loader.pulloutMemberStatus().loadMemberLoginList(...)
+     * }
+     * for (Member member : memberList) {
+     *     List<Purchase> purchaseList = member.getPurchaseList();
+     *     for (Purchase purchase : purchaseList) {
+     *         ...
+     *     }
+     * }
+     * 
+ * About internal policy, the value of primary key (and others too) is treated as case-insensitive.
+ * The condition-bean, which the set-upper provides, has order by FK before callback. + * @param suggestElevateWord The entity of suggestElevateWord. (NotNull) + * @param handler The callback to handle the referrer loader for actually loading referrer. (NotNull) + */ + public void load(final SuggestElevateWord suggestElevateWord, + final ReferrerLoaderHandler handler) { + xassLRArg(suggestElevateWord, handler); + handler.handle(new LoaderOfSuggestElevateWord().ready( + xnewLRAryLs(suggestElevateWord), _behaviorSelector)); + } + + // =================================================================================== + // Pull out Relation + // ================= + // =================================================================================== + // Extract Column + // ============== + /** + * Extract the value list of (single) primary key id. + * @param suggestElevateWordList The list of suggestElevateWord. (NotNull, EmptyAllowed) + * @return The list of the column value. (NotNull, EmptyAllowed, NotNullElement) + */ + public List extractIdList( + final List suggestElevateWordList) { + return helpExtractListInternally(suggestElevateWordList, "id"); + } + + // =================================================================================== + // Entity Update + // ============= + /** + * Insert the entity modified-only. (DefaultConstraintsEnabled) + *
+     * SuggestElevateWord suggestElevateWord = new SuggestElevateWord();
+     * // if auto-increment, you don't need to set the PK value
+     * suggestElevateWord.setFoo...(value);
+     * suggestElevateWord.setBar...(value);
+     * // you don't need to set values of common columns
+     * //suggestElevateWord.setRegisterUser(value);
+     * //suggestElevateWord.set...;
+     * suggestElevateWordBhv.insert(suggestElevateWord);
+     * ... = suggestElevateWord.getPK...(); // if auto-increment, you can get the value after
+     * 
+ *

While, when the entity is created by select, all columns are registered.

+ * @param suggestElevateWord The entity of insert. (NotNull, PrimaryKeyNullAllowed: when auto-increment) + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void insert(final SuggestElevateWord suggestElevateWord) { + doInsert(suggestElevateWord, null); + } + + /** + * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl) + *
+     * SuggestElevateWord suggestElevateWord = new SuggestElevateWord();
+     * suggestElevateWord.setPK...(value); // required
+     * suggestElevateWord.setFoo...(value); // you should set only modified columns
+     * // you don't need to set values of common columns
+     * //suggestElevateWord.setRegisterUser(value);
+     * //suggestElevateWord.set...;
+     * // if exclusive control, the value of concurrency column is required
+     * suggestElevateWord.setVersionNo(value);
+     * try {
+     *     suggestElevateWordBhv.update(suggestElevateWord);
+     * } catch (EntityAlreadyUpdatedException e) { // if concurrent update
+     *     ...
+     * }
+     * 
+ * @param suggestElevateWord The entity of update. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void update(final SuggestElevateWord suggestElevateWord) { + doUpdate(suggestElevateWord, null); + } + + /** + * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl) + *
+     * SuggestElevateWord suggestElevateWord = new SuggestElevateWord();
+     * suggestElevateWord.setPK...(value); // required
+     * suggestElevateWord.setFoo...(value); // you should set only modified columns
+     * // you don't need to set values of common columns
+     * //suggestElevateWord.setRegisterUser(value);
+     * //suggestElevateWord.set...;
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //suggestElevateWord.setVersionNo(value);
+     * suggestElevateWordBhv.updateNonstrict(suggestElevateWord);
+     * 
+ * @param suggestElevateWord The entity of update. (NotNull, PrimaryKeyNotNull) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void updateNonstrict(final SuggestElevateWord suggestElevateWord) { + doUpdateNonstrict(suggestElevateWord, null); + } + + /** + * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl)
+ * if (the entity has no PK) { insert() } else { update(), but no data, insert() }
+ *

Attention, you cannot update by unique keys instead of PK.

+ * @param suggestElevateWord The entity of insert or update. (NotNull, ...depends on insert or update) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void insertOrUpdate(final SuggestElevateWord suggestElevateWord) { + doInsertOrUpdate(suggestElevateWord, null, null); + } + + /** + * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+ * if (the entity has no PK) { insert() } else { update(), but no data, insert() } + *

Attention, you cannot update by unique keys instead of PK.

+ * @param suggestElevateWord The entity of insert or update. (NotNull, ...depends on insert or update) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void insertOrUpdateNonstrict( + final SuggestElevateWord suggestElevateWord) { + doInsertOrUpdateNonstrict(suggestElevateWord, null, null); + } + + /** + * Delete the entity. (ZeroUpdateException, ExclusiveControl) + *
+     * SuggestElevateWord suggestElevateWord = new SuggestElevateWord();
+     * suggestElevateWord.setPK...(value); // required
+     * // if exclusive control, the value of concurrency column is required
+     * suggestElevateWord.setVersionNo(value);
+     * try {
+     *     suggestElevateWordBhv.delete(suggestElevateWord);
+     * } catch (EntityAlreadyUpdatedException e) { // if concurrent update
+     *     ...
+     * }
+     * 
+ * @param suggestElevateWord The entity of delete. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + */ + public void delete(final SuggestElevateWord suggestElevateWord) { + doDelete(suggestElevateWord, null); + } + + /** + * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl} + *
+     * SuggestElevateWord suggestElevateWord = new SuggestElevateWord();
+     * suggestElevateWord.setPK...(value); // required
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //suggestElevateWord.setVersionNo(value);
+     * suggestElevateWordBhv.deleteNonstrict(suggestElevateWord);
+     * 
+ * @param suggestElevateWord The entity of delete. (NotNull, PrimaryKeyNotNull) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + */ + public void deleteNonstrict(final SuggestElevateWord suggestElevateWord) { + doDeleteNonstrict(suggestElevateWord, null); + } + + /** + * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl} + *
+     * SuggestElevateWord suggestElevateWord = new SuggestElevateWord();
+     * suggestElevateWord.setPK...(value); // required
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //suggestElevateWord.setVersionNo(value);
+     * suggestElevateWordBhv.deleteNonstrictIgnoreDeleted(suggestElevateWord);
+     * // if the target entity doesn't exist, no exception
+     * 
+ * @param suggestElevateWord The entity of delete. (NotNull, PrimaryKeyNotNull) + * @exception EntityDuplicatedException When the entity has been duplicated. + */ + public void deleteNonstrictIgnoreDeleted( + final SuggestElevateWord suggestElevateWord) { + doDeleteNonstrictIgnoreDeleted(suggestElevateWord, null); + } + + protected void doDeleteNonstrictIgnoreDeleted(final SuggestElevateWord et, + final DeleteOption op) { + assertObjectNotNull("suggestElevateWord", et); + prepareDeleteOption(op); + helpDeleteNonstrictIgnoreDeletedInternally(et, op); + } + + // =================================================================================== + // Batch Update + // ============ + /** + * Batch-insert the entity list modified-only of same-set columns. (DefaultConstraintsEnabled)
+ * This method uses executeBatch() of java.sql.PreparedStatement.
+ *

The columns of least common multiple are registered like this:

+ *
+     * for (... : ...) {
+     *     SuggestElevateWord suggestElevateWord = new SuggestElevateWord();
+     *     suggestElevateWord.setFooName("foo");
+     *     if (...) {
+     *         suggestElevateWord.setFooPrice(123);
+     *     }
+     *     // FOO_NAME and FOO_PRICE (and record meta columns) are registered
+     *     // FOO_PRICE not-called in any entities are registered as null without default value
+     *     // columns not-called in all entities are registered as null or default value
+     *     suggestElevateWordList.add(suggestElevateWord);
+     * }
+     * suggestElevateWordBhv.batchInsert(suggestElevateWordList);
+     * 
+ *

While, when the entities are created by select, all columns are registered.

+ *

And if the table has an identity, entities after the process don't have incremented values. + * (When you use the (normal) insert(), you can get the incremented value from your entity)

+ * @param suggestElevateWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment) + * @return The array of inserted count. (NotNull, EmptyAllowed) + */ + public int[] batchInsert( + final List suggestElevateWordList) { + return doBatchInsert(suggestElevateWordList, null); + } + + /** + * Batch-update the entity list modified-only of same-set columns. (ExclusiveControl)
+ * This method uses executeBatch() of java.sql.PreparedStatement.
+ * You should specify same-set columns to all entities like this: + *
+     * for (... : ...) {
+     *     SuggestElevateWord suggestElevateWord = new SuggestElevateWord();
+     *     suggestElevateWord.setFooName("foo");
+     *     if (...) {
+     *         suggestElevateWord.setFooPrice(123);
+     *     } else {
+     *         suggestElevateWord.setFooPrice(null); // updated as null
+     *         //suggestElevateWord.setFooDate(...); // *not allowed, fragmented
+     *     }
+     *     // FOO_NAME and FOO_PRICE (and record meta columns) are updated
+     *     // (others are not updated: their values are kept)
+     *     suggestElevateWordList.add(suggestElevateWord);
+     * }
+     * suggestElevateWordBhv.batchUpdate(suggestElevateWordList);
+     * 
+ * @param suggestElevateWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + * @exception BatchEntityAlreadyUpdatedException When the entity has already been updated. This exception extends EntityAlreadyUpdatedException. + */ + public int[] batchUpdate( + final List suggestElevateWordList) { + return doBatchUpdate(suggestElevateWordList, null); + } + + /** + * Batch-update the entity list specified-only. (ExclusiveControl)
+ * This method uses executeBatch() of java.sql.PreparedStatement. + *
+     * // e.g. update two columns only
+     * suggestElevateWordBhv.batchUpdate(suggestElevateWordList, new SpecifyQuery() {
+     *     public void specify(SuggestElevateWordCB cb) { // the two only updated
+     *         cb.specify().columnFooStatusCode(); // should be modified in any entities
+     *         cb.specify().columnBarDate(); // should be modified in any entities
+     *     }
+     * });
+     * // e.g. update every column in the table
+     * suggestElevateWordBhv.batchUpdate(suggestElevateWordList, new SpecifyQuery() {
+     *     public void specify(SuggestElevateWordCB cb) { // all columns are updated
+     *         cb.specify().columnEveryColumn(); // no check of modified properties
+     *     }
+     * });
+     * 
+ *

You can specify update columns used on set clause of update statement. + * However you do not need to specify common columns for update + * and an optimistic lock column because they are specified implicitly.

+ *

And you should specify columns that are modified in any entities (at least one entity). + * But if you specify every column, it has no check.

+ * @param suggestElevateWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @param updateColumnSpec The specification of update columns. (NotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + * @exception BatchEntityAlreadyUpdatedException When the entity has already been updated. This exception extends EntityAlreadyUpdatedException. + */ + public int[] batchUpdate( + final List suggestElevateWordList, + final SpecifyQuery updateColumnSpec) { + return doBatchUpdate(suggestElevateWordList, + createSpecifiedUpdateOption(updateColumnSpec)); + } + + /** + * Batch-update the entity list non-strictly modified-only of same-set columns. (NonExclusiveControl)
+ * This method uses executeBatch() of java.sql.PreparedStatement.
+ * You should specify same-set columns to all entities like this: + *
+     * for (... : ...) {
+     *     SuggestElevateWord suggestElevateWord = new SuggestElevateWord();
+     *     suggestElevateWord.setFooName("foo");
+     *     if (...) {
+     *         suggestElevateWord.setFooPrice(123);
+     *     } else {
+     *         suggestElevateWord.setFooPrice(null); // updated as null
+     *         //suggestElevateWord.setFooDate(...); // *not allowed, fragmented
+     *     }
+     *     // FOO_NAME and FOO_PRICE (and record meta columns) are updated
+     *     // (others are not updated: their values are kept)
+     *     suggestElevateWordList.add(suggestElevateWord);
+     * }
+     * suggestElevateWordBhv.batchUpdate(suggestElevateWordList);
+     * 
+ * @param suggestElevateWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + */ + public int[] batchUpdateNonstrict( + final List suggestElevateWordList) { + return doBatchUpdateNonstrict(suggestElevateWordList, null); + } + + /** + * Batch-update the entity list non-strictly specified-only. (NonExclusiveControl)
+ * This method uses executeBatch() of java.sql.PreparedStatement. + *
+     * // e.g. update two columns only
+     * suggestElevateWordBhv.batchUpdateNonstrict(suggestElevateWordList, new SpecifyQuery() {
+     *     public void specify(SuggestElevateWordCB cb) { // the two only updated
+     *         cb.specify().columnFooStatusCode(); // should be modified in any entities
+     *         cb.specify().columnBarDate(); // should be modified in any entities
+     *     }
+     * });
+     * // e.g. update every column in the table
+     * suggestElevateWordBhv.batchUpdateNonstrict(suggestElevateWordList, new SpecifyQuery() {
+     *     public void specify(SuggestElevateWordCB cb) { // all columns are updated
+     *         cb.specify().columnEveryColumn(); // no check of modified properties
+     *     }
+     * });
+     * 
+ *

You can specify update columns used on set clause of update statement. + * However you do not need to specify common columns for update + * and an optimistic lock column because they are specified implicitly.

+ *

And you should specify columns that are modified in any entities (at least one entity).

+ * @param suggestElevateWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param updateColumnSpec The specification of update columns. (NotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + */ + public int[] batchUpdateNonstrict( + final List suggestElevateWordList, + final SpecifyQuery updateColumnSpec) { + return doBatchUpdateNonstrict(suggestElevateWordList, + createSpecifiedUpdateOption(updateColumnSpec)); + } + + /** + * Batch-delete the entity list. (ExclusiveControl)
+ * This method uses executeBatch() of java.sql.PreparedStatement. + * @param suggestElevateWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @return The array of deleted count. (NotNull, EmptyAllowed) + * @exception BatchEntityAlreadyUpdatedException When the entity has already been updated. This exception extends EntityAlreadyUpdatedException. + */ + public int[] batchDelete( + final List suggestElevateWordList) { + return doBatchDelete(suggestElevateWordList, null); + } + + /** + * Batch-delete the entity list non-strictly. {NonExclusiveControl}
+ * This method uses executeBatch() of java.sql.PreparedStatement. + * @param suggestElevateWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @return The array of deleted count. (NotNull, EmptyAllowed) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + */ + public int[] batchDeleteNonstrict( + final List suggestElevateWordList) { + return doBatchDeleteNonstrict(suggestElevateWordList, null); + } + + // =================================================================================== + // Query Update + // ============ + /** + * Insert the several entities by query (modified-only for fixed value). + *
+     * suggestElevateWordBhv.queryInsert(new QueryInsertSetupper<SuggestElevateWord, SuggestElevateWordCB>() {
+     *     public ConditionBean setup(SuggestElevateWord entity, SuggestElevateWordCB intoCB) {
+     *         FooCB cb = FooCB();
+     *         cb.setupSelect_Bar();
+     *
+     *         // mapping
+     *         intoCB.specify().columnMyName().mappedFrom(cb.specify().columnFooName());
+     *         intoCB.specify().columnMyCount().mappedFrom(cb.specify().columnFooCount());
+     *         intoCB.specify().columnMyDate().mappedFrom(cb.specify().specifyBar().columnBarDate());
+     *         entity.setMyFixedValue("foo"); // fixed value
+     *         // you don't need to set values of common columns
+     *         //entity.setRegisterUser(value);
+     *         //entity.set...;
+     *         // you don't need to set a value of concurrency column
+     *         //entity.setVersionNo(value);
+     *
+     *         return cb;
+     *     }
+     * });
+     * 
+ * @param setupper The set-upper of query-insert. (NotNull) + * @return The inserted count. + */ + public int queryInsert( + final QueryInsertSetupper setupper) { + return doQueryInsert(setupper, null); + } + + /** + * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) + *
+     * SuggestElevateWord suggestElevateWord = new SuggestElevateWord();
+     * // you don't need to set PK value
+     * //suggestElevateWord.setPK...(value);
+     * suggestElevateWord.setFoo...(value); // you should set only modified columns
+     * // you don't need to set values of common columns
+     * //suggestElevateWord.setRegisterUser(value);
+     * //suggestElevateWord.set...;
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //suggestElevateWord.setVersionNo(value);
+     * SuggestElevateWordCB cb = new SuggestElevateWordCB();
+     * cb.query().setFoo...(value);
+     * suggestElevateWordBhv.queryUpdate(suggestElevateWord, cb);
+     * 
+ * @param suggestElevateWord The entity that contains update values. (NotNull, PrimaryKeyNullAllowed) + * @param cb The condition-bean of SuggestElevateWord. (NotNull) + * @return The updated count. + * @exception NonQueryUpdateNotAllowedException When the query has no condition. + */ + public int queryUpdate(final SuggestElevateWord suggestElevateWord, + final SuggestElevateWordCB cb) { + return doQueryUpdate(suggestElevateWord, cb, null); + } + + /** + * Delete the several entities by query. (NonExclusiveControl) + *
+     * SuggestElevateWordCB cb = new SuggestElevateWordCB();
+     * cb.query().setFoo...(value);
+     * suggestElevateWordBhv.queryDelete(suggestElevateWord, cb);
+     * 
+ * @param cb The condition-bean of SuggestElevateWord. (NotNull) + * @return The deleted count. + * @exception NonQueryDeleteNotAllowedException When the query has no condition. + */ + public int queryDelete(final SuggestElevateWordCB cb) { + return doQueryDelete(cb, null); + } + + // =================================================================================== + // Varying Update + // ============== + // ----------------------------------------------------- + // Entity Update + // ------------- + /** + * Insert the entity with varying requests.
+ * For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
+ * Other specifications are same as insert(entity). + *
+     * SuggestElevateWord suggestElevateWord = new SuggestElevateWord();
+     * // if auto-increment, you don't need to set the PK value
+     * suggestElevateWord.setFoo...(value);
+     * suggestElevateWord.setBar...(value);
+     * InsertOption option = new InsertOption();
+     * // you can insert by your values for common columns
+     * option.disableCommonColumnAutoSetup();
+     * suggestElevateWordBhv.varyingInsert(suggestElevateWord, option);
+     * ... = suggestElevateWord.getPK...(); // if auto-increment, you can get the value after
+     * 
+ * @param suggestElevateWord The entity of insert. (NotNull, PrimaryKeyNullAllowed: when auto-increment) + * @param option The option of insert for varying requests. (NotNull) + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void varyingInsert(final SuggestElevateWord suggestElevateWord, + final InsertOption option) { + assertInsertOptionNotNull(option); + doInsert(suggestElevateWord, option); + } + + /** + * Update the entity with varying requests modified-only. (ZeroUpdateException, ExclusiveControl)
+ * For example, self(selfCalculationSpecification), specify(updateColumnSpecification), disableCommonColumnAutoSetup().
+ * Other specifications are same as update(entity). + *
+     * SuggestElevateWord suggestElevateWord = new SuggestElevateWord();
+     * suggestElevateWord.setPK...(value); // required
+     * suggestElevateWord.setOther...(value); // you should set only modified columns
+     * // if exclusive control, the value of concurrency column is required
+     * suggestElevateWord.setVersionNo(value);
+     * try {
+     *     // you can update by self calculation values
+     *     UpdateOption<SuggestElevateWordCB> option = new UpdateOption<SuggestElevateWordCB>();
+     *     option.self(new SpecifyQuery<SuggestElevateWordCB>() {
+     *         public void specify(SuggestElevateWordCB cb) {
+     *             cb.specify().columnXxxCount();
+     *         }
+     *     }).plus(1); // XXX_COUNT = XXX_COUNT + 1
+     *     suggestElevateWordBhv.varyingUpdate(suggestElevateWord, option);
+     * } catch (EntityAlreadyUpdatedException e) { // if concurrent update
+     *     ...
+     * }
+     * 
+ * @param suggestElevateWord The entity of update. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @param option The option of update for varying requests. (NotNull) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void varyingUpdate(final SuggestElevateWord suggestElevateWord, + final UpdateOption option) { + assertUpdateOptionNotNull(option); + doUpdate(suggestElevateWord, option); + } + + /** + * Update the entity with varying requests non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
+ * For example, self(selfCalculationSpecification), specify(updateColumnSpecification), disableCommonColumnAutoSetup().
+ * Other specifications are same as updateNonstrict(entity). + *
+     * // ex) you can update by self calculation values
+     * SuggestElevateWord suggestElevateWord = new SuggestElevateWord();
+     * suggestElevateWord.setPK...(value); // required
+     * suggestElevateWord.setOther...(value); // you should set only modified columns
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //suggestElevateWord.setVersionNo(value);
+     * UpdateOption<SuggestElevateWordCB> option = new UpdateOption<SuggestElevateWordCB>();
+     * option.self(new SpecifyQuery<SuggestElevateWordCB>() {
+     *     public void specify(SuggestElevateWordCB cb) {
+     *         cb.specify().columnFooCount();
+     *     }
+     * }).plus(1); // FOO_COUNT = FOO_COUNT + 1
+     * suggestElevateWordBhv.varyingUpdateNonstrict(suggestElevateWord, option);
+     * 
+ * @param suggestElevateWord The entity of update. (NotNull, PrimaryKeyNotNull) + * @param option The option of update for varying requests. (NotNull) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void varyingUpdateNonstrict( + final SuggestElevateWord suggestElevateWord, + final UpdateOption option) { + assertUpdateOptionNotNull(option); + doUpdateNonstrict(suggestElevateWord, option); + } + + /** + * Insert or update the entity with varying requests. (ExclusiveControl: when update)
+ * Other specifications are same as insertOrUpdate(entity). + * @param suggestElevateWord The entity of insert or update. (NotNull) + * @param insertOption The option of insert for varying requests. (NotNull) + * @param updateOption The option of update for varying requests. (NotNull) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void varyingInsertOrUpdate( + final SuggestElevateWord suggestElevateWord, + final InsertOption insertOption, + final UpdateOption updateOption) { + assertInsertOptionNotNull(insertOption); + assertUpdateOptionNotNull(updateOption); + doInsertOrUpdate(suggestElevateWord, insertOption, updateOption); + } + + /** + * Insert or update the entity with varying requests non-strictly. (NonExclusiveControl: when update)
+ * Other specifications are same as insertOrUpdateNonstrict(entity). + * @param suggestElevateWord The entity of insert or update. (NotNull) + * @param insertOption The option of insert for varying requests. (NotNull) + * @param updateOption The option of update for varying requests. (NotNull) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation) + */ + public void varyingInsertOrUpdateNonstrict( + final SuggestElevateWord suggestElevateWord, + final InsertOption insertOption, + final UpdateOption updateOption) { + assertInsertOptionNotNull(insertOption); + assertUpdateOptionNotNull(updateOption); + doInsertOrUpdateNonstrict(suggestElevateWord, insertOption, + updateOption); + } + + /** + * Delete the entity with varying requests. (ZeroUpdateException, ExclusiveControl)
+ * Now a valid option does not exist.
+ * Other specifications are same as delete(entity). + * @param suggestElevateWord The entity of delete. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @param option The option of update for varying requests. (NotNull) + * @exception EntityAlreadyUpdatedException When the entity has already been updated. + * @exception EntityDuplicatedException When the entity has been duplicated. + */ + public void varyingDelete(final SuggestElevateWord suggestElevateWord, + final DeleteOption option) { + assertDeleteOptionNotNull(option); + doDelete(suggestElevateWord, option); + } + + /** + * Delete the entity with varying requests non-strictly. (ZeroUpdateException, NonExclusiveControl)
+ * Now a valid option does not exist.
+ * Other specifications are same as deleteNonstrict(entity). + * @param suggestElevateWord The entity of delete. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull) + * @param option The option of update for varying requests. (NotNull) + * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found) + * @exception EntityDuplicatedException When the entity has been duplicated. + */ + public void varyingDeleteNonstrict( + final SuggestElevateWord suggestElevateWord, + final DeleteOption option) { + assertDeleteOptionNotNull(option); + doDeleteNonstrict(suggestElevateWord, option); + } + + // ----------------------------------------------------- + // Batch Update + // ------------ + /** + * Batch-insert the list with varying requests.
+ * For example, disableCommonColumnAutoSetup() + * , disablePrimaryKeyIdentity(), limitBatchInsertLogging().
+ * Other specifications are same as batchInsert(entityList). + * @param suggestElevateWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param option The option of insert for varying requests. (NotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + */ + public int[] varyingBatchInsert( + final List suggestElevateWordList, + final InsertOption option) { + assertInsertOptionNotNull(option); + return doBatchInsert(suggestElevateWordList, option); + } + + /** + * Batch-update the list with varying requests.
+ * For example, self(selfCalculationSpecification), specify(updateColumnSpecification) + * , disableCommonColumnAutoSetup(), limitBatchUpdateLogging().
+ * Other specifications are same as batchUpdate(entityList). + * @param suggestElevateWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param option The option of update for varying requests. (NotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + */ + public int[] varyingBatchUpdate( + final List suggestElevateWordList, + final UpdateOption option) { + assertUpdateOptionNotNull(option); + return doBatchUpdate(suggestElevateWordList, option); + } + + /** + * Batch-update the list with varying requests non-strictly.
+ * For example, self(selfCalculationSpecification), specify(updateColumnSpecification) + * , disableCommonColumnAutoSetup(), limitBatchUpdateLogging().
+ * Other specifications are same as batchUpdateNonstrict(entityList). + * @param suggestElevateWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param option The option of update for varying requests. (NotNull) + * @return The array of updated count. (NotNull, EmptyAllowed) + */ + public int[] varyingBatchUpdateNonstrict( + final List suggestElevateWordList, + final UpdateOption option) { + assertUpdateOptionNotNull(option); + return doBatchUpdateNonstrict(suggestElevateWordList, option); + } + + /** + * Batch-delete the list with varying requests.
+ * For example, limitBatchDeleteLogging().
+ * Other specifications are same as batchDelete(entityList). + * @param suggestElevateWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param option The option of delete for varying requests. (NotNull) + * @return The array of deleted count. (NotNull, EmptyAllowed) + */ + public int[] varyingBatchDelete( + final List suggestElevateWordList, + final DeleteOption option) { + assertDeleteOptionNotNull(option); + return doBatchDelete(suggestElevateWordList, option); + } + + /** + * Batch-delete the list with varying requests non-strictly.
+ * For example, limitBatchDeleteLogging().
+ * Other specifications are same as batchDeleteNonstrict(entityList). + * @param suggestElevateWordList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) + * @param option The option of delete for varying requests. (NotNull) + * @return The array of deleted count. (NotNull, EmptyAllowed) + */ + public int[] varyingBatchDeleteNonstrict( + final List suggestElevateWordList, + final DeleteOption option) { + assertDeleteOptionNotNull(option); + return doBatchDeleteNonstrict(suggestElevateWordList, option); + } + + // ----------------------------------------------------- + // Query Update + // ------------ + /** + * Insert the several entities by query with varying requests (modified-only for fixed value).
+ * For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
+ * Other specifications are same as queryInsert(entity, setupper). + * @param setupper The set-upper of query-insert. (NotNull) + * @param option The option of insert for varying requests. (NotNull) + * @return The inserted count. + */ + public int varyingQueryInsert( + final QueryInsertSetupper setupper, + final InsertOption option) { + assertInsertOptionNotNull(option); + return doQueryInsert(setupper, option); + } + + /** + * Update the several entities by query with varying requests non-strictly modified-only. {NonExclusiveControl}
+ * For example, self(selfCalculationSpecification), specify(updateColumnSpecification) + * , disableCommonColumnAutoSetup(), allowNonQueryUpdate().
+ * Other specifications are same as queryUpdate(entity, cb). + *
+     * // ex) you can update by self calculation values
+     * SuggestElevateWord suggestElevateWord = new SuggestElevateWord();
+     * // you don't need to set PK value
+     * //suggestElevateWord.setPK...(value);
+     * suggestElevateWord.setOther...(value); // you should set only modified columns
+     * // you don't need to set a value of concurrency column
+     * // (auto-increment for version number is valid though non-exclusive control)
+     * //suggestElevateWord.setVersionNo(value);
+     * SuggestElevateWordCB cb = new SuggestElevateWordCB();
+     * cb.query().setFoo...(value);
+     * UpdateOption<SuggestElevateWordCB> option = new UpdateOption<SuggestElevateWordCB>();
+     * option.self(new SpecifyQuery<SuggestElevateWordCB>() {
+     *     public void specify(SuggestElevateWordCB cb) {
+     *         cb.specify().columnFooCount();
+     *     }
+     * }).plus(1); // FOO_COUNT = FOO_COUNT + 1
+     * suggestElevateWordBhv.varyingQueryUpdate(suggestElevateWord, cb, option);
+     * 
+ * @param suggestElevateWord The entity that contains update values. (NotNull) {PrimaryKeyNotRequired} + * @param cb The condition-bean of SuggestElevateWord. (NotNull) + * @param option The option of update for varying requests. (NotNull) + * @return The updated count. + * @exception NonQueryUpdateNotAllowedException When the query has no condition (if not allowed). + */ + public int varyingQueryUpdate(final SuggestElevateWord suggestElevateWord, + final SuggestElevateWordCB cb, + final UpdateOption option) { + assertUpdateOptionNotNull(option); + return doQueryUpdate(suggestElevateWord, cb, option); + } + + /** + * Delete the several entities by query with varying requests non-strictly.
+ * For example, allowNonQueryDelete().
+ * Other specifications are same as batchUpdateNonstrict(entityList). + * @param cb The condition-bean of SuggestElevateWord. (NotNull) + * @param option The option of delete for varying requests. (NotNull) + * @return The deleted count. + * @exception NonQueryDeleteNotAllowedException When the query has no condition (if not allowed). + */ + public int varyingQueryDelete(final SuggestElevateWordCB cb, + final DeleteOption option) { + assertDeleteOptionNotNull(option); + return doQueryDelete(cb, option); + } + + // =================================================================================== + // OutsideSql + // ========== + /** + * Prepare the basic executor of outside-SQL to execute it.
+ * The invoker of behavior command should be not null when you call this method. + *
+     * You can use the methods for outside-SQL are as follows:
+     * {Basic}
+     *   o selectList()
+     *   o execute()
+     *   o call()
+     *
+     * {Entity}
+     *   o entityHandling().selectEntity()
+     *   o entityHandling().selectEntityWithDeletedCheck()
+     *
+     * {Paging}
+     *   o autoPaging().selectList()
+     *   o autoPaging().selectPage()
+     *   o manualPaging().selectList()
+     *   o manualPaging().selectPage()
+     *
+     * {Cursor}
+     *   o cursorHandling().selectCursor()
+     *
+     * {Option}
+     *   o dynamicBinding().selectList()
+     *   o removeBlockComment().selectList()
+     *   o removeLineComment().selectList()
+     *   o formatSql().selectList()
+     * 
+ * @return The basic executor of outside-SQL. (NotNull) + */ + public OutsideSqlBasicExecutor outsideSql() { + return doOutsideSql(); + } + + // =================================================================================== + // Optimistic Lock Info + // ==================== + @Override + protected boolean hasVersionNoValue(final Entity et) { + return downcast(et).getVersionNo() != null; + } + + // =================================================================================== + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { + return SuggestElevateWord.class; + } + + @Override + protected Class typeOfHandlingEntity() { + return SuggestElevateWord.class; + } + + @Override + protected Class typeOfHandlingConditionBean() { + return SuggestElevateWordCB.class; + } +} diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsUserInfoBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsUserInfoBhv.java index ac59a1a77..edd9a2299 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsUserInfoBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsUserInfoBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsUserInfoBhv extends AbstractBehaviorWritable { +public abstract class BsUserInfoBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final UserInfoCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final UserInfoCB cb, final Class tp) { + final UserInfoCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final UserInfoCB cb, final Class 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 doSelectByPK(final Long id, - final Class tp) { + final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -330,20 +274,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList(final UserInfoCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final UserInfoCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage(final UserInfoCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final UserInfoCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final UserInfoCB cb, final EntityRowHandler handler, - final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("userInfo", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption(final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) *
@@ -862,49 +719,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
         doUpdate(userInfo, null);
     }
 
-    protected void doUpdate(final UserInfo et, final UpdateOption op) {
-        assertObjectNotNull("userInfo", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doModify(et, op);
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -918,27 +732,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable { doInsertOrUpdate(userInfo, null, null); } - protected void doInsertOrUpdate(final UserInfo et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("userInfo", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doCreateOrModify(et, iop, uop); - } - /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) *
@@ -960,30 +753,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
         doDelete(userInfo, null);
     }
 
-    protected void doDelete(final UserInfo et, final DeleteOption op) {
-        assertObjectNotNull("userInfo", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("userInfoList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -1069,31 +812,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable { return doBatchUpdate(userInfoList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("userInfoList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (NonExclusiveControl)
* 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 ls, - final UpdateOption op) { - return doLumpModify(ls, op); - } - /** * Batch-delete the entity list. (NonExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("userInfoList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * userInfoBhv.queryInsert(new QueryInsertSetupper<UserInfo, UserInfoCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1277,20 +932,6 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final UserInfoCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return UserInfo.class; } - protected UserInfo downcast(final Entity et) { - return helpEntityDowncastInternally(et, UserInfo.class); + @Override + protected Class typeOfHandlingEntity() { + return UserInfo.class; } - protected UserInfoCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, UserInfoCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return UserInfoCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsWebAuthenticationBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsWebAuthenticationBhv.java index 9abf28f08..d3435059f 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsWebAuthenticationBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsWebAuthenticationBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable { +public abstract class BsWebAuthenticationBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final WebAuthenticationCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final WebAuthenticationCB cb, final Class tp) { + final WebAuthenticationCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final WebAuthenticationCB cb, final Class 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 doSelectByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -329,21 +272,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final WebAuthenticationCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final WebAuthenticationCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage( - final WebAuthenticationCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final WebAuthenticationCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final WebAuthenticationCB cb, - final EntityRowHandler handler, final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("webAuthentication", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption( - final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl) *
@@ -660,45 +512,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
         doUpdate(webAuthentication, null);
     }
 
-    protected void doUpdate(final WebAuthentication et,
-            final UpdateOption op) {
-        assertObjectNotNull("webAuthentication", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(
-            final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
     /**
      * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
      * 
@@ -722,19 +535,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
         doUpdateNonstrict(webAuthentication, null);
     }
 
-    protected void doUpdateNonstrict(final WebAuthentication et,
-            final UpdateOption op) {
-        assertObjectNotNull("webAuthentication", et);
-        prepareUpdateOption(op);
-        helpUpdateNonstrictInternally(et, op);
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doUpdateNonstrict(downcast(et), downcast(op));
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -748,20 +548,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable { doInsertOrUpdate(webAuthentication, null, null); } - protected void doInsertOrUpdate(final WebAuthentication et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("webAuthentication", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - /** * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
* 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 iop, - final UpdateOption uop) { - assertObjectNotNull("webAuthentication", et); - helpInsertOrUpdateNonstrictInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop)); - } - /** * Delete the entity. (ZeroUpdateException, ExclusiveControl) *
@@ -811,26 +583,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
         doDelete(webAuthentication, null);
     }
 
-    protected void doDelete(final WebAuthentication et,
-            final DeleteOption op) {
-        assertObjectNotNull("webAuthentication", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(
-            final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
     /**
      * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -849,13 +601,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
         doDeleteNonstrict(webAuthentication, null);
     }
 
-    protected void doDeleteNonstrict(final WebAuthentication et,
-            final DeleteOption op) {
-        assertObjectNotNull("webAuthentication", et);
-        prepareDeleteOption(op);
-        helpDeleteNonstrictInternally(et, op);
-    }
-
     /**
      * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -882,12 +627,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
         helpDeleteNonstrictIgnoreDeletedInternally(et, op);
     }
 
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("webAuthenticationList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -973,31 +686,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable { return doBatchUpdate(webAuthenticationList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("webAuthenticationList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (ExclusiveControl)
* 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 ls, - final UpdateOption op) { - assertObjectNotNull("webAuthenticationList", ls); - UpdateOption 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)
* 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 ls, - final UpdateOption op) { - return doBatchUpdateNonstrict(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list. (ExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("webAuthenticationList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list non-strictly. {NonExclusiveControl}
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("webAuthenticationList", ls); - prepareDeleteOption(op); - return delegateBatchDeleteNonstrict(ls, op); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * webAuthenticationBhv.queryInsert(new QueryInsertSetupper<WebAuthentication, WebAuthenticationCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1279,20 +883,6 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final WebAuthenticationCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return WebAuthentication.class; } - protected WebAuthentication downcast(final Entity et) { - return helpEntityDowncastInternally(et, WebAuthentication.class); + @Override + protected Class typeOfHandlingEntity() { + return WebAuthentication.class; } - protected WebAuthenticationCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, - WebAuthenticationCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return WebAuthenticationCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToLabelTypeMappingBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToLabelTypeMappingBhv.java index b669e62cc..3eb5b9cce 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToLabelTypeMappingBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToLabelTypeMappingBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsWebConfigToLabelTypeMappingBhv extends - AbstractBehaviorWritable { +public abstract class BsWebConfigToLabelTypeMappingBhv + extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final WebConfigToLabelTypeMappingCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final WebConfigToLabelTypeMappingCB cb, final Class tp) { + final WebConfigToLabelTypeMappingCB cb, + final Class 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 doSelectEntityWithDeletedCheck( - final WebConfigToLabelTypeMappingCB cb, final Class 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 doSelectByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -332,21 +276,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final WebConfigToLabelTypeMappingCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final WebConfigToLabelTypeMappingCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean doReadList(final ConditionBean cb) { - return facadeSelectList(downcast(cb)); - } - // =================================================================================== // Page Select // =========== @@ -377,22 +306,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends return facadeSelectPage(cb); } - protected PagingResultBean facadeSelectPage( - final WebConfigToLabelTypeMappingCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final WebConfigToLabelTypeMappingCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final WebConfigToLabelTypeMappingCB cb, - final EntityRowHandler handler, final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("webConfigToLabelTypeMapping", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption( - final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) *
@@ -679,51 +532,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
         doUpdate(webConfigToLabelTypeMapping, null);
     }
 
-    protected void doUpdate(final WebConfigToLabelTypeMapping et,
-            final UpdateOption op) {
-        assertObjectNotNull("webConfigToLabelTypeMapping", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(
-            final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doModify(et, op);
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -738,27 +546,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends doInsertOrUpdate(webConfigToLabelTypeMapping, null, null); } - protected void doInsertOrUpdate(final WebConfigToLabelTypeMapping et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("webConfigToLabelTypeMapping", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doCreateOrModify(et, iop, uop); - } - /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) *
@@ -781,32 +568,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
         doDelete(webConfigToLabelTypeMapping, null);
     }
 
-    protected void doDelete(final WebConfigToLabelTypeMapping et,
-            final DeleteOption op) {
-        assertObjectNotNull("webConfigToLabelTypeMapping", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(
-            final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption op) {
-        doRemove(et, op);
-    }
-
     // ===================================================================================
     //                                                                        Batch Update
     //                                                                        ============
@@ -839,33 +600,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
         return doBatchInsert(webConfigToLabelTypeMappingList, null);
     }
 
-    protected int[] doBatchInsert(final List ls,
-            final InsertOption op) {
-        assertObjectNotNull("webConfigToLabelTypeMappingList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(
-            final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -895,32 +629,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends return doBatchUpdate(webConfigToLabelTypeMappingList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("webConfigToLabelTypeMappingList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption( - final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (NonExclusiveControl)
* 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 ls, - final UpdateOption op) { - return doLumpModify(ls, op); - } - /** * Batch-delete the entity list. (NonExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("webConfigToLabelTypeMappingList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * webConfigToLabelTypeMappingBhv.queryInsert(new QueryInsertSetupper<WebConfigToLabelTypeMapping, WebConfigToLabelTypeMappingCB>() {
-     *     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
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1109,20 +753,6 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final WebConfigToLabelTypeMappingCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return WebConfigToLabelTypeMapping.class; } - protected WebConfigToLabelTypeMapping downcast(final Entity et) { - return helpEntityDowncastInternally(et, - WebConfigToLabelTypeMapping.class); + @Override + protected Class typeOfHandlingEntity() { + return WebConfigToLabelTypeMapping.class; } - protected WebConfigToLabelTypeMappingCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, - WebConfigToLabelTypeMappingCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast( - final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return WebConfigToLabelTypeMappingCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToRoleTypeMappingBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToRoleTypeMappingBhv.java index 9c17d1486..b84b48c39 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToRoleTypeMappingBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToRoleTypeMappingBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsWebConfigToRoleTypeMappingBhv extends - AbstractBehaviorWritable { +public abstract class BsWebConfigToRoleTypeMappingBhv + extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final WebConfigToRoleTypeMappingCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final WebConfigToRoleTypeMappingCB cb, final Class tp) { + final WebConfigToRoleTypeMappingCB cb, + final Class 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 doSelectEntityWithDeletedCheck( - final WebConfigToRoleTypeMappingCB cb, final Class 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 doSelectByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -332,21 +276,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final WebConfigToRoleTypeMappingCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final WebConfigToRoleTypeMappingCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean doReadList(final ConditionBean cb) { - return facadeSelectList(downcast(cb)); - } - // =================================================================================== // Page Select // =========== @@ -377,22 +306,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends return facadeSelectPage(cb); } - protected PagingResultBean facadeSelectPage( - final WebConfigToRoleTypeMappingCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final WebConfigToRoleTypeMappingCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final WebConfigToRoleTypeMappingCB cb, - final EntityRowHandler handler, final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("webConfigToRoleTypeMapping", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption( - final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) *
@@ -678,51 +531,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
         doUpdate(webConfigToRoleTypeMapping, null);
     }
 
-    protected void doUpdate(final WebConfigToRoleTypeMapping et,
-            final UpdateOption op) {
-        assertObjectNotNull("webConfigToRoleTypeMapping", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(
-            final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doModify(et, op);
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -737,27 +545,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends doInsertOrUpdate(webConfigToRoleTypeMapping, null, null); } - protected void doInsertOrUpdate(final WebConfigToRoleTypeMapping et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("webConfigToRoleTypeMapping", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doCreateOrModify(et, iop, uop); - } - /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) *
@@ -780,32 +567,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
         doDelete(webConfigToRoleTypeMapping, null);
     }
 
-    protected void doDelete(final WebConfigToRoleTypeMapping et,
-            final DeleteOption op) {
-        assertObjectNotNull("webConfigToRoleTypeMapping", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(
-            final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption op) {
-        doRemove(et, op);
-    }
-
     // ===================================================================================
     //                                                                        Batch Update
     //                                                                        ============
@@ -838,33 +599,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
         return doBatchInsert(webConfigToRoleTypeMappingList, null);
     }
 
-    protected int[] doBatchInsert(final List ls,
-            final InsertOption op) {
-        assertObjectNotNull("webConfigToRoleTypeMappingList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(
-            final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -894,32 +628,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends return doBatchUpdate(webConfigToRoleTypeMappingList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("webConfigToRoleTypeMappingList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption( - final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (NonExclusiveControl)
* 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 ls, - final UpdateOption op) { - return doLumpModify(ls, op); - } - /** * Batch-delete the entity list. (NonExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("webConfigToRoleTypeMappingList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * webConfigToRoleTypeMappingBhv.queryInsert(new QueryInsertSetupper<WebConfigToRoleTypeMapping, WebConfigToRoleTypeMappingCB>() {
-     *     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
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1108,20 +752,6 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final WebConfigToRoleTypeMappingCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return WebConfigToRoleTypeMapping.class; } - protected WebConfigToRoleTypeMapping downcast(final Entity et) { - return helpEntityDowncastInternally(et, - WebConfigToRoleTypeMapping.class); + @Override + protected Class typeOfHandlingEntity() { + return WebConfigToRoleTypeMapping.class; } - protected WebConfigToRoleTypeMappingCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, - WebConfigToRoleTypeMappingCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast( - final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return WebConfigToRoleTypeMappingCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/BsWebCrawlingConfigBhv.java b/src/main/java/jp/sf/fess/db/bsbhv/BsWebCrawlingConfigBhv.java index 636943e14..578aa1cf3 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/BsWebCrawlingConfigBhv.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/BsWebCrawlingConfigBhv.java @@ -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; *
* @author DBFlute(AutoGenerator) */ -public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable { +public abstract class BsWebCrawlingConfigBhv extends + AbstractBehaviorWritable { // =================================================================================== // 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 doSelectEntity( - final WebCrawlingConfigCB cb, final Class tp) { - return helpSelectEntityInternally(cb, tp); - } - protected OptionalEntity doSelectOptionalEntity( - final WebCrawlingConfigCB cb, final Class tp) { + final WebCrawlingConfigCB cb, final Class 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 doSelectEntityWithDeletedCheck( - final WebCrawlingConfigCB cb, final Class 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 doSelectByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return doSelectEntity(xprepareCBAsPK(id), tp); } protected OptionalEntity doSelectOptionalByPK( - final Long id, final Class tp) { + final Long id, final Class tp) { return createOptionalEntity(doSelectByPK(id, tp), id); } @@ -339,21 +282,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable { return facadeSelectList(cb); } - protected ListResultBean facadeSelectList( - final WebCrawlingConfigCB cb) { - return doSelectList(cb, typeOfSelectedEntity()); - } - - protected ListResultBean doSelectList( - final WebCrawlingConfigCB cb, final Class tp) { - return helpSelectListInternally(cb, tp); - } - - @Override - protected ListResultBean 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 facadeSelectPage( - final WebCrawlingConfigCB cb) { - return doSelectPage(cb, typeOfSelectedEntity()); - } - - protected PagingResultBean doSelectPage( - final WebCrawlingConfigCB cb, final Class tp) { - return helpSelectPageInternally(cb, tp); - } - - @Override - protected PagingResultBean 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 entityRowHandler) { - doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity()); - } - - protected void doSelectCursor( - final WebCrawlingConfigCB cb, - final EntityRowHandler handler, final Class 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 HpSLSFunction facadeScalarSelect( - final Class resultType) { - return doScalarSelect(resultType, newConditionBean()); - } - - protected HpSLSFunction doScalarSelect( - final Class tp, final CB cb) { - assertObjectNotNull("resultType", tp); - assertCBStateValid(cb); - cb.xsetupForScalarSelect(); - cb.getSqlClause().disableSelectIndex(); // for when you use union - final HpSLSExecutor executor = createHpSLSExecutor(); // variable to resolve generic - return createSLSFunction(cb, tp, executor); - } - - @Override - protected HpSLSFunction doReadScalar( - final Class 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 op) { - assertObjectNotNull("webCrawlingConfig", et); - prepareInsertOption(op); - delegateInsert(et, op); - } - - protected void prepareInsertOption( - final InsertOption op) { - if (op == null) { - return; - } - assertInsertOptionStatus(op); - if (op.hasSpecifiedInsertColumn()) { - op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate()); - } - } - - @Override - protected void doCreate(final Entity et, - final InsertOption op) { - doInsert(downcast(et), downcast(op)); - } - /** * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl) *
@@ -1110,45 +962,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
         doUpdate(webCrawlingConfig, null);
     }
 
-    protected void doUpdate(final WebCrawlingConfig et,
-            final UpdateOption op) {
-        assertObjectNotNull("webCrawlingConfig", et);
-        prepareUpdateOption(op);
-        helpUpdateInternally(et, op);
-    }
-
-    protected void prepareUpdateOption(
-            final UpdateOption 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 op) {
-        doUpdate(downcast(et), downcast(op));
-    }
-
     /**
      * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
      * 
@@ -1172,19 +985,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
         doUpdateNonstrict(webCrawlingConfig, null);
     }
 
-    protected void doUpdateNonstrict(final WebCrawlingConfig et,
-            final UpdateOption op) {
-        assertObjectNotNull("webCrawlingConfig", et);
-        prepareUpdateOption(op);
-        helpUpdateNonstrictInternally(et, op);
-    }
-
-    @Override
-    protected void doModifyNonstrict(final Entity et,
-            final UpdateOption op) {
-        doUpdateNonstrict(downcast(et), downcast(op));
-    }
-
     /**
      * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) 
* if (the entity has no PK) { insert() } else { update(), but no data, insert() }
@@ -1198,20 +998,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable { doInsertOrUpdate(webCrawlingConfig, null, null); } - protected void doInsertOrUpdate(final WebCrawlingConfig et, - final InsertOption iop, - final UpdateOption uop) { - assertObjectNotNull("webCrawlingConfig", et); - helpInsertOrUpdateInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModify(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop)); - } - /** * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
* 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 iop, - final UpdateOption uop) { - assertObjectNotNull("webCrawlingConfig", et); - helpInsertOrUpdateNonstrictInternally(et, iop, uop); - } - - @Override - protected void doCreateOrModifyNonstrict(final Entity et, - final InsertOption iop, - final UpdateOption uop) { - doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop)); - } - /** * Delete the entity. (ZeroUpdateException, ExclusiveControl) *
@@ -1261,26 +1033,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
         doDelete(webCrawlingConfig, null);
     }
 
-    protected void doDelete(final WebCrawlingConfig et,
-            final DeleteOption op) {
-        assertObjectNotNull("webCrawlingConfig", et);
-        prepareDeleteOption(op);
-        helpDeleteInternally(et, op);
-    }
-
-    protected void prepareDeleteOption(
-            final DeleteOption op) {
-        if (op != null) {
-            assertDeleteOptionStatus(op);
-        }
-    }
-
-    @Override
-    protected void doRemove(final Entity et,
-            final DeleteOption op) {
-        doDelete(downcast(et), downcast(op));
-    }
-
     /**
      * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -1299,13 +1051,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
         doDeleteNonstrict(webCrawlingConfig, null);
     }
 
-    protected void doDeleteNonstrict(final WebCrawlingConfig et,
-            final DeleteOption op) {
-        assertObjectNotNull("webCrawlingConfig", et);
-        prepareDeleteOption(op);
-        helpDeleteNonstrictInternally(et, op);
-    }
-
     /**
      * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
      * 
@@ -1332,12 +1077,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
         helpDeleteNonstrictIgnoreDeletedInternally(et, op);
     }
 
-    @Override
-    protected void doRemoveNonstrict(final Entity et,
-            final DeleteOption 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 ls,
-            final InsertOption op) {
-        assertObjectNotNull("webCrawlingConfigList", ls);
-        InsertOption rlop;
-        if (op != null) {
-            rlop = op;
-        } else {
-            rlop = createPlainInsertOption();
-        }
-        prepareBatchInsertOption(ls, rlop); // required
-        return delegateBatchInsert(ls, rlop);
-    }
-
-    protected void prepareBatchInsertOption(final List ls,
-            final InsertOption op) {
-        op.xallowInsertColumnModifiedPropertiesFragmented();
-        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
-        prepareInsertOption(op);
-    }
-
-    @Override
-    protected int[] doLumpCreate(final List ls,
-            final InsertOption op) {
-        return doBatchInsert(downcast(ls), downcast(op));
-    }
-
     /**
      * Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) 
* This method uses executeBatch() of java.sql.PreparedStatement.
@@ -1423,31 +1136,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable { return doBatchUpdate(webCrawlingConfigList, null); } - protected int[] doBatchUpdate(final List ls, - final UpdateOption op) { - assertObjectNotNull("webCrawlingConfigList", ls); - UpdateOption rlop; - if (op != null) { - rlop = op; - } else { - rlop = createPlainUpdateOption(); - } - prepareBatchUpdateOption(ls, rlop); // required - return delegateBatchUpdate(ls, rlop); - } - - protected void prepareBatchUpdateOption(final List ls, - final UpdateOption op) { - op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls); - prepareUpdateOption(op); - } - - @Override - protected int[] doLumpModify(final List ls, - final UpdateOption op) { - return doBatchUpdate(downcast(ls), downcast(op)); - } - /** * Batch-update the entity list specified-only. (ExclusiveControl)
* 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 ls, - final UpdateOption op) { - assertObjectNotNull("webCrawlingConfigList", ls); - UpdateOption 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)
* 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 ls, - final UpdateOption op) { - return doBatchUpdateNonstrict(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list. (ExclusiveControl)
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("webCrawlingConfigList", ls); - prepareDeleteOption(op); - return delegateBatchDelete(ls, op); - } - - @Override - protected int[] doLumpRemove(final List ls, - final DeleteOption op) { - return doBatchDelete(downcast(ls), downcast(op)); - } - /** * Batch-delete the entity list non-strictly. {NonExclusiveControl}
* 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 ls, - final DeleteOption op) { - assertObjectNotNull("webCrawlingConfigList", ls); - prepareDeleteOption(op); - return delegateBatchDeleteNonstrict(ls, op); - } - - @Override - protected int[] doLumpRemoveNonstrict(final List ls, - final DeleteOption 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). *
      * webCrawlingConfigBhv.queryInsert(new QueryInsertSetupper<WebCrawlingConfig, WebCrawlingConfigCB>() {
-     *     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 {
      *     }
      * });
      * 
- * @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 sp, - final InsertOption 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 setupper, - final InsertOption op) { - return doQueryInsert(downcast(setupper), downcast(op)); - } - /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) *
@@ -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 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 op) {
-        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
-    }
-
     /**
      * Delete the several entities by query. (NonExclusiveControl)
      * 
@@ -1729,20 +1333,6 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
         return doQueryDelete(cb, null);
     }
 
-    protected int doQueryDelete(final WebCrawlingConfigCB cb,
-            final DeleteOption op) {
-        assertCBStateValid(cb);
-        prepareDeleteOption(op);
-        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
-                op) : 0;
-    }
-
-    @Override
-    protected int doRangeRemove(final ConditionBean cb,
-            final DeleteOption 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). 
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity().
* 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 typeOfSelectedEntity() { + // Type Helper + // =========== + @Override + protected Class typeOfSelectedEntity() { return WebCrawlingConfig.class; } - protected WebCrawlingConfig downcast(final Entity et) { - return helpEntityDowncastInternally(et, WebCrawlingConfig.class); + @Override + protected Class typeOfHandlingEntity() { + return WebCrawlingConfig.class; } - protected WebCrawlingConfigCB downcast(final ConditionBean cb) { - return helpConditionBeanDowncastInternally(cb, - WebCrawlingConfigCB.class); - } - - @SuppressWarnings("unchecked") - protected List downcast(final List ls) { - return (List) ls; - } - - @SuppressWarnings("unchecked") - protected InsertOption downcast( - final InsertOption op) { - return (InsertOption) op; - } - - @SuppressWarnings("unchecked") - protected UpdateOption downcast( - final UpdateOption op) { - return (UpdateOption) op; - } - - @SuppressWarnings("unchecked") - protected DeleteOption downcast( - final DeleteOption op) { - return (DeleteOption) op; - } - - @SuppressWarnings("unchecked") - protected QueryInsertSetupper downcast( - final QueryInsertSetupper sp) { - return (QueryInsertSetupper) sp; + @Override + protected Class typeOfHandlingConditionBean() { + return WebCrawlingConfigCB.class; } } diff --git a/src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfBoostDocumentRule.java b/src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfBoostDocumentRule.java new file mode 100644 index 000000000..cb332ab71 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfBoostDocumentRule.java @@ -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.
+ *
+ * [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]
+ *
+ * 
+ * @author DBFlute(AutoGenerator) + */ +public class LoaderOfBoostDocumentRule { + + // =================================================================================== + // Attribute + // ========= + protected List _selectedList; + + protected BehaviorSelector _selector; + + protected BoostDocumentRuleBhv _myBhv; // lazy-loaded + + // =================================================================================== + // Ready for Loading + // ================= + public LoaderOfBoostDocumentRule ready( + final List 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 getSelectedList() { + return _selectedList; + } + + public BehaviorSelector getSelector() { + return _selector; + } +} diff --git a/src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfSuggestBadWord.java b/src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfSuggestBadWord.java new file mode 100644 index 000000000..630fb9ba1 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfSuggestBadWord.java @@ -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.
+ *
+ * [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]
+ *
+ * 
+ * @author DBFlute(AutoGenerator) + */ +public class LoaderOfSuggestBadWord { + + // =================================================================================== + // Attribute + // ========= + protected List _selectedList; + + protected BehaviorSelector _selector; + + protected SuggestBadWordBhv _myBhv; // lazy-loaded + + // =================================================================================== + // Ready for Loading + // ================= + public LoaderOfSuggestBadWord ready( + final List 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 getSelectedList() { + return _selectedList; + } + + public BehaviorSelector getSelector() { + return _selector; + } +} diff --git a/src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfSuggestElevateWord.java b/src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfSuggestElevateWord.java new file mode 100644 index 000000000..c4281e15f --- /dev/null +++ b/src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfSuggestElevateWord.java @@ -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.
+ *
+ * [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]
+ *
+ * 
+ * @author DBFlute(AutoGenerator) + */ +public class LoaderOfSuggestElevateWord { + + // =================================================================================== + // Attribute + // ========= + protected List _selectedList; + + protected BehaviorSelector _selector; + + protected SuggestElevateWordBhv _myBhv; // lazy-loaded + + // =================================================================================== + // Ready for Loading + // ================= + public LoaderOfSuggestElevateWord ready( + final List 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 getSelectedList() { + return _selectedList; + } + + public BehaviorSelector getSelector() { + return _selector; + } +} diff --git a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsClickUrlRankingPmb.java b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsClickUrlRankingPmb.java index 472ef4ca4..c4a0d870b 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsClickUrlRankingPmb.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsClickUrlRankingPmb.java @@ -175,7 +175,7 @@ public class BsClickUrlRankingPmb extends SimplePagingBean implements // ======== /** * [get] fromRequestedTime
- * @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
- * @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; diff --git a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsClientIpRankingPmb.java b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsClientIpRankingPmb.java index a25bcd19e..8c8a7abcb 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsClientIpRankingPmb.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsClientIpRankingPmb.java @@ -175,7 +175,7 @@ public class BsClientIpRankingPmb extends SimplePagingBean implements // ======== /** * [get] fromRequestedTime
- * @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
- * @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; diff --git a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsFavoriteUrlCountPmb.java b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsFavoriteUrlCountPmb.java index cd64e5c50..027ca0bb5 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsFavoriteUrlCountPmb.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsFavoriteUrlCountPmb.java @@ -171,7 +171,7 @@ public class BsFavoriteUrlCountPmb extends SimplePagingBean implements // ======== /** * [get] url
- * @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); diff --git a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsFavoriteUrlRankingPmb.java b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsFavoriteUrlRankingPmb.java index 8c1420af3..39e52965e 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsFavoriteUrlRankingPmb.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsFavoriteUrlRankingPmb.java @@ -175,7 +175,7 @@ public class BsFavoriteUrlRankingPmb extends SimplePagingBean implements // ======== /** * [get] fromCreatedTime
- * @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
- * @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; diff --git a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsHotSearchWordPmb.java b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsHotSearchWordPmb.java index c9743051f..746c61b99 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsHotSearchWordPmb.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsHotSearchWordPmb.java @@ -175,7 +175,7 @@ public class BsHotSearchWordPmb extends SimplePagingBean implements // ======== /** * [get] fromRequestedTime
- * @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
- * @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; diff --git a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsRefererRankingPmb.java b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsRefererRankingPmb.java index bab73c2ec..22cf8075e 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsRefererRankingPmb.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsRefererRankingPmb.java @@ -175,7 +175,7 @@ public class BsRefererRankingPmb extends SimplePagingBean implements // ======== /** * [get] fromRequestedTime
- * @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
- * @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; diff --git a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsSearchFieldRankingPmb.java b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsSearchFieldRankingPmb.java index ff273a06a..22c9a82ba 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsSearchFieldRankingPmb.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsSearchFieldRankingPmb.java @@ -179,7 +179,7 @@ public class BsSearchFieldRankingPmb extends SimplePagingBean implements // ======== /** * [get] searchFieldName
- * @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
- * @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
- * @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; diff --git a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsSearchQueryRankingPmb.java b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsSearchQueryRankingPmb.java index 3316ec67b..3a92366e0 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsSearchQueryRankingPmb.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsSearchQueryRankingPmb.java @@ -175,7 +175,7 @@ public class BsSearchQueryRankingPmb extends SimplePagingBean implements // ======== /** * [get] fromRequestedTime
- * @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
- * @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; diff --git a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsSearchWordRankingPmb.java b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsSearchWordRankingPmb.java index c183be38c..09a47b23f 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsSearchWordRankingPmb.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsSearchWordRankingPmb.java @@ -175,7 +175,7 @@ public class BsSearchWordRankingPmb extends SimplePagingBean implements // ======== /** * [get] fromRequestedTime
- * @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
- * @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; diff --git a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsSolrQueryRankingPmb.java b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsSolrQueryRankingPmb.java index 37275ff2d..80a88f4a2 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsSolrQueryRankingPmb.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsSolrQueryRankingPmb.java @@ -175,7 +175,7 @@ public class BsSolrQueryRankingPmb extends SimplePagingBean implements // ======== /** * [get] fromRequestedTime
- * @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
- * @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; diff --git a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsUserAgentRankingPmb.java b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsUserAgentRankingPmb.java index 011588236..55371bc44 100644 --- a/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsUserAgentRankingPmb.java +++ b/src/main/java/jp/sf/fess/db/bsbhv/pmbean/BsUserAgentRankingPmb.java @@ -175,7 +175,7 @@ public class BsUserAgentRankingPmb extends SimplePagingBean implements // ======== /** * [get] fromRequestedTime
- * @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
- * @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; diff --git a/src/main/java/jp/sf/fess/db/bsentity/BsBoostDocumentRule.java b/src/main/java/jp/sf/fess/db/bsentity/BsBoostDocumentRule.java new file mode 100644 index 000000000..2554011f8 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/bsentity/BsBoostDocumentRule.java @@ -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.
+ *
+ * [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);
+ * = = = = = = = = = =/
+ * 
+ * @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 myuniqueDrivenProperties() { + return __uniqueDrivenProperties.getPropertyNames(); + } + + protected EntityUniqueDrivenProperties newUniqueDrivenProperties() { + return new EntityUniqueDrivenProperties(); + } + + // =================================================================================== + // Foreign Property + // ================ + // =================================================================================== + // Referrer Property + // ================= + protected List newReferrerList() { + return new ArrayList(); + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * {@inheritDoc} + */ + @Override + public Set 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.
+ * 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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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; + } +} diff --git a/src/main/java/jp/sf/fess/db/bsentity/BsSuggestBadWord.java b/src/main/java/jp/sf/fess/db/bsentity/BsSuggestBadWord.java new file mode 100644 index 000000000..b90f8f2e1 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/bsentity/BsSuggestBadWord.java @@ -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.
+ *
+ * [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);
+ * = = = = = = = = = =/
+ * 
+ * @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 myuniqueDrivenProperties() { + return __uniqueDrivenProperties.getPropertyNames(); + } + + protected EntityUniqueDrivenProperties newUniqueDrivenProperties() { + return new EntityUniqueDrivenProperties(); + } + + // =================================================================================== + // Foreign Property + // ================ + // =================================================================================== + // Referrer Property + // ================= + protected List newReferrerList() { + return new ArrayList(); + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * {@inheritDoc} + */ + @Override + public Set 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.
+ * 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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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; + } +} diff --git a/src/main/java/jp/sf/fess/db/bsentity/BsSuggestElevateWord.java b/src/main/java/jp/sf/fess/db/bsentity/BsSuggestElevateWord.java new file mode 100644 index 000000000..7dafb90fa --- /dev/null +++ b/src/main/java/jp/sf/fess/db/bsentity/BsSuggestElevateWord.java @@ -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.
+ *
+ * [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);
+ * = = = = = = = = = =/
+ * 
+ * @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 myuniqueDrivenProperties() { + return __uniqueDrivenProperties.getPropertyNames(); + } + + protected EntityUniqueDrivenProperties newUniqueDrivenProperties() { + return new EntityUniqueDrivenProperties(); + } + + // =================================================================================== + // Foreign Property + // ================ + // =================================================================================== + // Referrer Property + // ================= + protected List newReferrerList() { + return new ArrayList(); + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * {@inheritDoc} + */ + @Override + public Set 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.
+ * 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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @return The value of the column 'READING'. (NullAllowed even if selected: for no constraint) + */ + public String getReading() { + return _reading; + } + + /** + * [set] READING: {VARCHAR(255)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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)}
+ * @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; + } +} diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/BoostDocumentRuleDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/BoostDocumentRuleDbm.java new file mode 100644 index 000000000..6ecca810f --- /dev/null +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/BoostDocumentRuleDbm.java @@ -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 _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 ccil() { + final List 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 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 mp) { + doAcceptPrimaryKeyMap((BoostDocumentRule) et, mp); + } + + @Override + public void acceptAllColumnMap(final Entity et, + final Map mp) { + doAcceptAllColumnMap((BoostDocumentRule) et, mp); + } + + @Override + public Map extractPrimaryKeyMap(final Entity et) { + return doExtractPrimaryKeyMap(et); + } + + @Override + public Map extractAllColumnMap(final Entity et) { + return doExtractAllColumnMap(et); + } +} diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/ClickLogDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/ClickLogDbm.java index cb472d216..1a3aeffec 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/ClickLogDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/ClickLogDbm.java @@ -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", diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/CrawlingSessionDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/CrawlingSessionDbm.java index bfdbd8354..e022fb01b 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/CrawlingSessionDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/CrawlingSessionDbm.java @@ -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", diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/CrawlingSessionInfoDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/CrawlingSessionInfoDbm.java index ad52de308..4e9c369ef 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/CrawlingSessionInfoDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/CrawlingSessionInfoDbm.java @@ -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( diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataConfigToLabelTypeMappingDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataConfigToLabelTypeMappingDbm.java index 5e7ee444c..c65bfabd9 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataConfigToLabelTypeMappingDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataConfigToLabelTypeMappingDbm.java @@ -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", diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataConfigToRoleTypeMappingDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataConfigToRoleTypeMappingDbm.java index 3d3427c6b..d75b40553 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataConfigToRoleTypeMappingDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataConfigToRoleTypeMappingDbm.java @@ -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", diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataCrawlingConfigDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataCrawlingConfigDbm.java index 0b076c201..9cd57f1d3 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataCrawlingConfigDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataCrawlingConfigDbm.java @@ -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); diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FailureUrlDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FailureUrlDbm.java index 4cc61cd9e..a0ec59fc8 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FailureUrlDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FailureUrlDbm.java @@ -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, diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FavoriteLogDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FavoriteLogDbm.java index 4e91d8578..590f64425 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FavoriteLogDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FavoriteLogDbm.java @@ -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, diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileAuthenticationDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileAuthenticationDbm.java index 9a4524062..682c500d0 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileAuthenticationDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileAuthenticationDbm.java @@ -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", diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileConfigToLabelTypeMappingDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileConfigToLabelTypeMappingDbm.java index 39de7d627..7785140b5 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileConfigToLabelTypeMappingDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileConfigToLabelTypeMappingDbm.java @@ -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", diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileConfigToRoleTypeMappingDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileConfigToRoleTypeMappingDbm.java index a55892b23..acfbb56b5 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileConfigToRoleTypeMappingDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileConfigToRoleTypeMappingDbm.java @@ -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", diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileCrawlingConfigDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileCrawlingConfigDbm.java index 572986ba9..2551bed61 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileCrawlingConfigDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileCrawlingConfigDbm.java @@ -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, diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/JobLogDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/JobLogDbm.java index 254fa8458..30011b0ec 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/JobLogDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/JobLogDbm.java @@ -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", diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/KeyMatchDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/KeyMatchDbm.java index 3b5a470bb..8d0dec043 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/KeyMatchDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/KeyMatchDbm.java @@ -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, diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/LabelTypeDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/LabelTypeDbm.java index 3e7a613a5..58ec792ab 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/LabelTypeDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/LabelTypeDbm.java @@ -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, diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/LabelTypeToRoleTypeMappingDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/LabelTypeToRoleTypeMappingDbm.java index e9a188cbc..50927074c 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/LabelTypeToRoleTypeMappingDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/LabelTypeToRoleTypeMappingDbm.java @@ -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", diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/OverlappingHostDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/OverlappingHostDbm.java index 8a4587623..4d401ba15 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/OverlappingHostDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/OverlappingHostDbm.java @@ -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", diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/PathMappingDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/PathMappingDbm.java index ff9e59901..3a37d7e8c 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/PathMappingDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/PathMappingDbm.java @@ -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, diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/RequestHeaderDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/RequestHeaderDbm.java index ce0e9edcd..013afe4fc 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/RequestHeaderDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/RequestHeaderDbm.java @@ -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, diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/RoleTypeDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/RoleTypeDbm.java index b829b44b7..3189df761 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/RoleTypeDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/RoleTypeDbm.java @@ -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, diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/ScheduledJobDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/ScheduledJobDbm.java index 4cb2aadc8..dfe2d6dc0 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/ScheduledJobDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/ScheduledJobDbm.java @@ -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, diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/SearchFieldLogDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/SearchFieldLogDbm.java index 7d895c8cb..aca9e1699 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/SearchFieldLogDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/SearchFieldLogDbm.java @@ -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", diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/SearchLogDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/SearchLogDbm.java index d7b18e7a3..1f8ff4ef9 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/SearchLogDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/SearchLogDbm.java @@ -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", diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/SuggestBadWordDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/SuggestBadWordDbm.java new file mode 100644 index 000000000..aff9a2c81 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/SuggestBadWordDbm.java @@ -0,0 +1,540 @@ +/* + * 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.SuggestBadWord; + +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 SUGGEST_BAD_WORD. (Singleton) + * @author DBFlute(AutoGenerator) + */ +public class SuggestBadWordDbm extends AbstractDBMeta { + + // =================================================================================== + // Singleton + // ========= + private static final SuggestBadWordDbm _instance = new SuggestBadWordDbm(); + + private SuggestBadWordDbm() { + } + + public static SuggestBadWordDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Current DBDef + // ============= + @Override + public DBDef getCurrentDBDef() { + return DBCurrent.getInstance().currentDBDef(); + } + + // =================================================================================== + // Property Gateway + // ================ + // ----------------------------------------------------- + // Column Property + // --------------- + protected final Map _epgMap = newHashMap(); + { + setupEpg(_epgMap, new EpgId(), "id"); + setupEpg(_epgMap, new EpgSuggestWord(), "suggestWord"); + setupEpg(_epgMap, new EpgTargetRole(), "targetRole"); + setupEpg(_epgMap, new EpgTargetLabel(), "targetLabel"); + 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 ((SuggestBadWord) et).getId(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestBadWord) et).setId(ctl(vl)); + } + } + + public static class EpgSuggestWord implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestBadWord) et).getSuggestWord(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestBadWord) et).setSuggestWord((String) vl); + } + } + + public static class EpgTargetRole implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestBadWord) et).getTargetRole(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestBadWord) et).setTargetRole((String) vl); + } + } + + public static class EpgTargetLabel implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestBadWord) et).getTargetLabel(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestBadWord) et).setTargetLabel((String) vl); + } + } + + public static class EpgCreatedBy implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestBadWord) et).getCreatedBy(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestBadWord) et).setCreatedBy((String) vl); + } + } + + public static class EpgCreatedTime implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestBadWord) et).getCreatedTime(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestBadWord) et).setCreatedTime((java.sql.Timestamp) vl); + } + } + + public static class EpgUpdatedBy implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestBadWord) et).getUpdatedBy(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestBadWord) et).setUpdatedBy((String) vl); + } + } + + public static class EpgUpdatedTime implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestBadWord) et).getUpdatedTime(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestBadWord) et).setUpdatedTime((java.sql.Timestamp) vl); + } + } + + public static class EpgDeletedBy implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestBadWord) et).getDeletedBy(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestBadWord) et).setDeletedBy((String) vl); + } + } + + public static class EpgDeletedTime implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestBadWord) et).getDeletedTime(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestBadWord) et).setDeletedTime((java.sql.Timestamp) vl); + } + } + + public static class EpgVersionNo implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestBadWord) et).getVersionNo(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestBadWord) et).setVersionNo(cti(vl)); + } + } + + @Override + public PropertyGateway findPropertyGateway(final String prop) { + return doFindEpg(_epgMap, prop); + } + + // =================================================================================== + // Table Info + // ========== + protected final String _tableDbName = "SUGGEST_BAD_WORD"; + + protected final String _tablePropertyName = "suggestBadWord"; + + protected final TableSqlName _tableSqlName = new TableSqlName( + "SUGGEST_BAD_WORD", _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_794D1FB6_B3E4_460E_BC28_41AC2DB9636D", + false, null, null, null, null, null); + + protected final ColumnInfo _columnSuggestWord = cci("SUGGEST_WORD", + "SUGGEST_WORD", null, null, String.class, "suggestWord", null, + false, false, true, "VARCHAR", 255, 0, null, false, null, null, + null, null, null); + + protected final ColumnInfo _columnTargetRole = cci("TARGET_ROLE", + "TARGET_ROLE", null, null, String.class, "targetRole", null, false, + false, false, "VARCHAR", 255, 0, null, false, null, null, null, + null, null); + + protected final ColumnInfo _columnTargetLabel = cci("TARGET_LABEL", + "TARGET_LABEL", null, null, String.class, "targetLabel", null, + false, false, false, "VARCHAR", 255, 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; + } + + /** + * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public ColumnInfo columnSuggestWord() { + return _columnSuggestWord; + } + + /** + * TARGET_ROLE: {VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public ColumnInfo columnTargetRole() { + return _columnTargetRole; + } + + /** + * TARGET_LABEL: {VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public ColumnInfo columnTargetLabel() { + return _columnTargetLabel; + } + + /** + * 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 ccil() { + final List ls = newArrayList(); + ls.add(columnId()); + ls.add(columnSuggestWord()); + ls.add(columnTargetRole()); + ls.add(columnTargetLabel()); + 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.SuggestBadWord"; + } + + @Override + public String getConditionBeanTypeName() { + return "jp.sf.fess.db.cbean.SuggestBadWordCB"; + } + + @Override + public String getBehaviorTypeName() { + return "jp.sf.fess.db.exbhv.SuggestBadWordBhv"; + } + + // =================================================================================== + // Object Type + // =========== + @Override + public Class getEntityType() { + return SuggestBadWord.class; + } + + // =================================================================================== + // Object Instance + // =============== + @Override + public SuggestBadWord newEntity() { + return new SuggestBadWord(); + } + + public SuggestBadWord newMyEntity() { + return new SuggestBadWord(); + } + + // =================================================================================== + // Map Communication + // ================= + @Override + public void acceptPrimaryKeyMap(final Entity et, + final Map mp) { + doAcceptPrimaryKeyMap((SuggestBadWord) et, mp); + } + + @Override + public void acceptAllColumnMap(final Entity et, + final Map mp) { + doAcceptAllColumnMap((SuggestBadWord) et, mp); + } + + @Override + public Map extractPrimaryKeyMap(final Entity et) { + return doExtractPrimaryKeyMap(et); + } + + @Override + public Map extractAllColumnMap(final Entity et) { + return doExtractAllColumnMap(et); + } +} diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/SuggestElevateWordDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/SuggestElevateWordDbm.java new file mode 100644 index 000000000..0471b4a12 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/SuggestElevateWordDbm.java @@ -0,0 +1,592 @@ +/* + * 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.SuggestElevateWord; + +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 SUGGEST_ELEVATE_WORD. (Singleton) + * @author DBFlute(AutoGenerator) + */ +public class SuggestElevateWordDbm extends AbstractDBMeta { + + // =================================================================================== + // Singleton + // ========= + private static final SuggestElevateWordDbm _instance = new SuggestElevateWordDbm(); + + private SuggestElevateWordDbm() { + } + + public static SuggestElevateWordDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Current DBDef + // ============= + @Override + public DBDef getCurrentDBDef() { + return DBCurrent.getInstance().currentDBDef(); + } + + // =================================================================================== + // Property Gateway + // ================ + // ----------------------------------------------------- + // Column Property + // --------------- + protected final Map _epgMap = newHashMap(); + { + setupEpg(_epgMap, new EpgId(), "id"); + setupEpg(_epgMap, new EpgSuggestWord(), "suggestWord"); + setupEpg(_epgMap, new EpgReading(), "reading"); + setupEpg(_epgMap, new EpgTargetRole(), "targetRole"); + setupEpg(_epgMap, new EpgTargetLabel(), "targetLabel"); + setupEpg(_epgMap, new EpgBoost(), "boost"); + 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 ((SuggestElevateWord) et).getId(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestElevateWord) et).setId(ctl(vl)); + } + } + + public static class EpgSuggestWord implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestElevateWord) et).getSuggestWord(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestElevateWord) et).setSuggestWord((String) vl); + } + } + + public static class EpgReading implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestElevateWord) et).getReading(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestElevateWord) et).setReading((String) vl); + } + } + + public static class EpgTargetRole implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestElevateWord) et).getTargetRole(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestElevateWord) et).setTargetRole((String) vl); + } + } + + public static class EpgTargetLabel implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestElevateWord) et).getTargetLabel(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestElevateWord) et).setTargetLabel((String) vl); + } + } + + public static class EpgBoost implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestElevateWord) et).getBoost(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestElevateWord) et).setBoost(ctb(vl)); + } + } + + public static class EpgCreatedBy implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestElevateWord) et).getCreatedBy(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestElevateWord) et).setCreatedBy((String) vl); + } + } + + public static class EpgCreatedTime implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestElevateWord) et).getCreatedTime(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestElevateWord) et).setCreatedTime((java.sql.Timestamp) vl); + } + } + + public static class EpgUpdatedBy implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestElevateWord) et).getUpdatedBy(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestElevateWord) et).setUpdatedBy((String) vl); + } + } + + public static class EpgUpdatedTime implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestElevateWord) et).getUpdatedTime(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestElevateWord) et).setUpdatedTime((java.sql.Timestamp) vl); + } + } + + public static class EpgDeletedBy implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestElevateWord) et).getDeletedBy(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestElevateWord) et).setDeletedBy((String) vl); + } + } + + public static class EpgDeletedTime implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestElevateWord) et).getDeletedTime(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestElevateWord) et).setDeletedTime((java.sql.Timestamp) vl); + } + } + + public static class EpgVersionNo implements PropertyGateway { + @Override + public Object read(final Entity et) { + return ((SuggestElevateWord) et).getVersionNo(); + } + + @Override + public void write(final Entity et, final Object vl) { + ((SuggestElevateWord) et).setVersionNo(cti(vl)); + } + } + + @Override + public PropertyGateway findPropertyGateway(final String prop) { + return doFindEpg(_epgMap, prop); + } + + // =================================================================================== + // Table Info + // ========== + protected final String _tableDbName = "SUGGEST_ELEVATE_WORD"; + + protected final String _tablePropertyName = "suggestElevateWord"; + + protected final TableSqlName _tableSqlName = new TableSqlName( + "SUGGEST_ELEVATE_WORD", _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_278A6A28_36F4_4786_9C84_87D820521EDC", + false, null, null, null, null, null); + + protected final ColumnInfo _columnSuggestWord = cci("SUGGEST_WORD", + "SUGGEST_WORD", null, null, String.class, "suggestWord", null, + false, false, true, "VARCHAR", 255, 0, null, false, null, null, + null, null, null); + + protected final ColumnInfo _columnReading = cci("READING", "READING", null, + null, String.class, "reading", null, false, false, false, + "VARCHAR", 255, 0, null, false, null, null, null, null, null); + + protected final ColumnInfo _columnTargetRole = cci("TARGET_ROLE", + "TARGET_ROLE", null, null, String.class, "targetRole", null, false, + false, false, "VARCHAR", 255, 0, null, false, null, null, null, + null, null); + + protected final ColumnInfo _columnTargetLabel = cci("TARGET_LABEL", + "TARGET_LABEL", null, null, String.class, "targetLabel", null, + false, false, false, "VARCHAR", 255, 0, null, false, null, null, + null, null, null); + + protected final ColumnInfo _columnBoost = cci("BOOST", "BOOST", null, null, + java.math.BigDecimal.class, "boost", null, false, false, true, + "DOUBLE", 17, 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; + } + + /** + * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public ColumnInfo columnSuggestWord() { + return _columnSuggestWord; + } + + /** + * READING: {VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public ColumnInfo columnReading() { + return _columnReading; + } + + /** + * TARGET_ROLE: {VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public ColumnInfo columnTargetRole() { + return _columnTargetRole; + } + + /** + * TARGET_LABEL: {VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public ColumnInfo columnTargetLabel() { + return _columnTargetLabel; + } + + /** + * BOOST: {NotNull, DOUBLE(17)} + * @return The information object of specified column. (NotNull) + */ + public ColumnInfo columnBoost() { + return _columnBoost; + } + + /** + * 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 ccil() { + final List ls = newArrayList(); + ls.add(columnId()); + ls.add(columnSuggestWord()); + ls.add(columnReading()); + ls.add(columnTargetRole()); + ls.add(columnTargetLabel()); + ls.add(columnBoost()); + 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.SuggestElevateWord"; + } + + @Override + public String getConditionBeanTypeName() { + return "jp.sf.fess.db.cbean.SuggestElevateWordCB"; + } + + @Override + public String getBehaviorTypeName() { + return "jp.sf.fess.db.exbhv.SuggestElevateWordBhv"; + } + + // =================================================================================== + // Object Type + // =========== + @Override + public Class getEntityType() { + return SuggestElevateWord.class; + } + + // =================================================================================== + // Object Instance + // =============== + @Override + public SuggestElevateWord newEntity() { + return new SuggestElevateWord(); + } + + public SuggestElevateWord newMyEntity() { + return new SuggestElevateWord(); + } + + // =================================================================================== + // Map Communication + // ================= + @Override + public void acceptPrimaryKeyMap(final Entity et, + final Map mp) { + doAcceptPrimaryKeyMap((SuggestElevateWord) et, mp); + } + + @Override + public void acceptAllColumnMap(final Entity et, + final Map mp) { + doAcceptAllColumnMap((SuggestElevateWord) et, mp); + } + + @Override + public Map extractPrimaryKeyMap(final Entity et) { + return doExtractPrimaryKeyMap(et); + } + + @Override + public Map extractAllColumnMap(final Entity et) { + return doExtractAllColumnMap(et); + } +} diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/UserInfoDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/UserInfoDbm.java index 07c20e708..473d87074 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/UserInfoDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/UserInfoDbm.java @@ -171,7 +171,7 @@ public class UserInfoDbm extends AbstractDBMeta { "BIGINT", 19, 0, - "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_AEA89236_23DC_4D8F_B645_FEF0BEE63AE3", + "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_73943943_5D67_4C52_BD23_8FAE169D4F5E", false, null, null, null, "favoriteLogList,searchLogList", null); protected final ColumnInfo _columnCode = cci("CODE", "CODE", null, null, diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/WebAuthenticationDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/WebAuthenticationDbm.java index 3f6e60854..aa1e30b6a 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/WebAuthenticationDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/WebAuthenticationDbm.java @@ -354,7 +354,7 @@ public class WebAuthenticationDbm extends AbstractDBMeta { "BIGINT", 19, 0, - "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_239D97D2_3CE1_4BAD_9E96_A33676C1461C", + "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_C0A5E7AC_A4B9_4116_848B_830A77742A7E", false, null, null, null, null, null); protected final ColumnInfo _columnHostname = cci("HOSTNAME", "HOSTNAME", diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/WebConfigToLabelTypeMappingDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/WebConfigToLabelTypeMappingDbm.java index 88411f69a..3375e27c5 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/WebConfigToLabelTypeMappingDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/WebConfigToLabelTypeMappingDbm.java @@ -199,7 +199,7 @@ public class WebConfigToLabelTypeMappingDbm extends AbstractDBMeta { "BIGINT", 19, 0, - "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_D01534A7_E100_49A9_A6C6_ED0C525E0111", + "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_D6257AC4_F6DD_4CFC_B688_EC04598F8751", false, null, null, null, null, null); protected final ColumnInfo _columnWebConfigId = cci("WEB_CONFIG_ID", diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/WebConfigToRoleTypeMappingDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/WebConfigToRoleTypeMappingDbm.java index 0d77f833f..73a2b13db 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/WebConfigToRoleTypeMappingDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/WebConfigToRoleTypeMappingDbm.java @@ -199,7 +199,7 @@ public class WebConfigToRoleTypeMappingDbm extends AbstractDBMeta { "BIGINT", 19, 0, - "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_3498664F_AE93_4441_9780_8D6D8C62011B", + "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_105A1870_C2AD_4635_BE01_6360711F5509", false, null, null, null, null, null); protected final ColumnInfo _columnWebConfigId = cci("WEB_CONFIG_ID", diff --git a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/WebCrawlingConfigDbm.java b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/WebCrawlingConfigDbm.java index 7d0310a2f..2d1d1f8c7 100644 --- a/src/main/java/jp/sf/fess/db/bsentity/dbmeta/WebCrawlingConfigDbm.java +++ b/src/main/java/jp/sf/fess/db/bsentity/dbmeta/WebCrawlingConfigDbm.java @@ -418,7 +418,7 @@ public class WebCrawlingConfigDbm extends AbstractDBMeta { "BIGINT", 19, 0, - "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_BE9CC66D_15CD_43DB_8E0D_F05E290AF6D6", + "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_1FDCD552_C6C3_44C5_802A_A080B6B1037D", false, null, null, diff --git a/src/main/java/jp/sf/fess/db/cbean/BoostDocumentRuleCB.java b/src/main/java/jp/sf/fess/db/cbean/BoostDocumentRuleCB.java new file mode 100644 index 000000000..b8cc5b7f6 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/BoostDocumentRuleCB.java @@ -0,0 +1,30 @@ +/* + * 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.cbean; + +import jp.sf.fess.db.cbean.bs.BsBoostDocumentRuleCB; + +/** + * The condition-bean of BOOST_DOCUMENT_RULE. + *

+ * You can implement your original methods here. + * This class remains when re-generating. + *

+ * @author DBFlute(AutoGenerator) + */ +public class BoostDocumentRuleCB extends BsBoostDocumentRuleCB { +} diff --git a/src/main/java/jp/sf/fess/db/cbean/SuggestBadWordCB.java b/src/main/java/jp/sf/fess/db/cbean/SuggestBadWordCB.java new file mode 100644 index 000000000..dfaa3eb67 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/SuggestBadWordCB.java @@ -0,0 +1,30 @@ +/* + * 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.cbean; + +import jp.sf.fess.db.cbean.bs.BsSuggestBadWordCB; + +/** + * The condition-bean of SUGGEST_BAD_WORD. + *

+ * You can implement your original methods here. + * This class remains when re-generating. + *

+ * @author DBFlute(AutoGenerator) + */ +public class SuggestBadWordCB extends BsSuggestBadWordCB { +} diff --git a/src/main/java/jp/sf/fess/db/cbean/SuggestElevateWordCB.java b/src/main/java/jp/sf/fess/db/cbean/SuggestElevateWordCB.java new file mode 100644 index 000000000..4b4bf6d62 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/SuggestElevateWordCB.java @@ -0,0 +1,30 @@ +/* + * 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.cbean; + +import jp.sf.fess.db.cbean.bs.BsSuggestElevateWordCB; + +/** + * The condition-bean of SUGGEST_ELEVATE_WORD. + *

+ * You can implement your original methods here. + * This class remains when re-generating. + *

+ * @author DBFlute(AutoGenerator) + */ +public class SuggestElevateWordCB extends BsSuggestElevateWordCB { +} diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsBoostDocumentRuleCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsBoostDocumentRuleCB.java new file mode 100644 index 000000000..58af86032 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsBoostDocumentRuleCB.java @@ -0,0 +1,791 @@ +/* + * 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.cbean.bs; + +import jp.sf.fess.db.allcommon.DBFluteConfig; +import jp.sf.fess.db.allcommon.DBMetaInstanceHandler; +import jp.sf.fess.db.allcommon.ImplementedInvokerAssistant; +import jp.sf.fess.db.allcommon.ImplementedSqlClauseCreator; +import jp.sf.fess.db.cbean.BoostDocumentRuleCB; +import jp.sf.fess.db.cbean.cq.BoostDocumentRuleCQ; + +import org.seasar.dbflute.cbean.AbstractConditionBean; +import org.seasar.dbflute.cbean.AndQuery; +import org.seasar.dbflute.cbean.ConditionBean; +import org.seasar.dbflute.cbean.ConditionQuery; +import org.seasar.dbflute.cbean.OrQuery; +import org.seasar.dbflute.cbean.SpecifyQuery; +import org.seasar.dbflute.cbean.SubQuery; +import org.seasar.dbflute.cbean.UnionQuery; +import org.seasar.dbflute.cbean.chelper.HpAbstractSpecification; +import org.seasar.dbflute.cbean.chelper.HpCBPurpose; +import org.seasar.dbflute.cbean.chelper.HpCalculator; +import org.seasar.dbflute.cbean.chelper.HpColQyHandler; +import org.seasar.dbflute.cbean.chelper.HpColQyOperand; +import org.seasar.dbflute.cbean.chelper.HpColumnSpHandler; +import org.seasar.dbflute.cbean.chelper.HpSDRFunction; +import org.seasar.dbflute.cbean.chelper.HpSDRSetupper; +import org.seasar.dbflute.cbean.chelper.HpSpQyCall; +import org.seasar.dbflute.cbean.chelper.HpSpecifiedColumn; +import org.seasar.dbflute.cbean.coption.ConditionOption; +import org.seasar.dbflute.cbean.coption.DerivedReferrerOption; +import org.seasar.dbflute.cbean.sqlclause.SqlClause; +import org.seasar.dbflute.cbean.sqlclause.SqlClauseCreator; +import org.seasar.dbflute.dbmeta.DBMetaProvider; +import org.seasar.dbflute.twowaysql.factory.SqlAnalyzerFactory; + +/** + * The base condition-bean of BOOST_DOCUMENT_RULE. + * @author DBFlute(AutoGenerator) + */ +public class BsBoostDocumentRuleCB extends AbstractConditionBean { + + // =================================================================================== + // Attribute + // ========= + protected BoostDocumentRuleCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + public BsBoostDocumentRuleCB() { + if (DBFluteConfig.getInstance().isPagingCountLater()) { + enablePagingCountLater(); + } + if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { + enablePagingCountLeastJoin(); + } + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); + } + } + + // =================================================================================== + // SqlClause + // ========= + @Override + protected SqlClause createSqlClause() { + final SqlClauseCreator creator = DBFluteConfig.getInstance() + .getSqlClauseCreator(); + if (creator != null) { + return creator.createSqlClause(this); + } + return new ImplementedSqlClauseCreator().createSqlClause(this); // as default + } + + // =================================================================================== + // DBMeta Provider + // =============== + @Override + protected DBMetaProvider getDBMetaProvider() { + return DBMetaInstanceHandler.getProvider(); // as default + } + + // =================================================================================== + // Table Name + // ========== + @Override + public String getTableDbName() { + return "BOOST_DOCUMENT_RULE"; + } + + // =================================================================================== + // PrimaryKey Handling + // =================== + /** + * Accept the query condition of primary key as equal. + * @param id : PK, ID, NotNull, BIGINT(19). (NotNull) + * @return this. (NotNull) + */ + public BoostDocumentRuleCB acceptPK(final Long id) { + assertObjectNotNull("id", id); + final BsBoostDocumentRuleCB cb = this; + cb.query().setId_Equal(id); + return (BoostDocumentRuleCB) this; + } + + /** + * Accept the query condition of primary key as equal. (old style) + * @param id : PK, ID, NotNull, BIGINT(19). (NotNull) + */ + public void acceptPrimaryKey(final Long id) { + assertObjectNotNull("id", id); + final BsBoostDocumentRuleCB cb = this; + cb.query().setId_Equal(id); + } + + @Override + public ConditionBean addOrderBy_PK_Asc() { + query().addOrderBy_Id_Asc(); + return this; + } + + @Override + public ConditionBean addOrderBy_PK_Desc() { + query().addOrderBy_Id_Desc(); + return this; + } + + // =================================================================================== + // Query + // ===== + /** + * Prepare for various queries.
+ * Examples of main functions are following: + *
+     * // Basic Queries
+     * cb.query().setMemberId_Equal(value);        // =
+     * cb.query().setMemberId_NotEqual(value);     // !=
+     * cb.query().setMemberId_GreaterThan(value);  // >
+     * cb.query().setMemberId_LessThan(value);     // <
+     * cb.query().setMemberId_GreaterEqual(value); // >=
+     * cb.query().setMemberId_LessEqual(value);    // <=
+     * cb.query().setMemberName_InScope(valueList);    // in ('a', 'b')
+     * cb.query().setMemberName_NotInScope(valueList); // not in ('a', 'b')
+     * cb.query().setMemberName_PrefixSearch(value);   // like 'a%' escape '|'
+     * // LikeSearch with various options: (versatile)
+     * // {like ... [options]}
+     * cb.query().setMemberName_LikeSearch(value, option);
+     * cb.query().setMemberName_NotLikeSearch(value, option); // not like ...
+     * // FromTo with various options: (versatile)
+     * // {(default) fromDatetime <= BIRTHDATE <= toDatetime}
+     * cb.query().setBirthdate_FromTo(fromDatetime, toDatetime, option);
+     * // DateFromTo: (Date means yyyy/MM/dd)
+     * // {fromDate <= BIRTHDATE < toDate + 1 day}
+     * cb.query().setBirthdate_DateFromTo(fromDate, toDate);
+     * cb.query().setBirthdate_IsNull();    // is null
+     * cb.query().setBirthdate_IsNotNull(); // is not null
+     *
+     * // ExistsReferrer: (correlated sub-query)
+     * // {where exists (select PURCHASE_ID from PURCHASE where ...)}
+     * cb.query().existsPurchaseList(new SubQuery<PurchaseCB>() {
+     *     public void query(PurchaseCB subCB) {
+     *         subCB.query().setXxx... // referrer sub-query condition
+     *     }
+     * });
+     * cb.query().notExistsPurchaseList...
+     *
+     * // InScopeRelation: (sub-query)
+     * // {where MEMBER_STATUS_CODE in (select MEMBER_STATUS_CODE from MEMBER_STATUS where ...)}
+     * cb.query().inScopeMemberStatus(new SubQuery<MemberStatusCB>() {
+     *     public void query(MemberStatusCB subCB) {
+     *         subCB.query().setXxx... // relation sub-query condition
+     *     }
+     * });
+     * cb.query().notInScopeMemberStatus...
+     *
+     * // (Query)DerivedReferrer: (correlated sub-query)
+     * cb.query().derivedPurchaseList().max(new SubQuery<PurchaseCB>() {
+     *     public void query(PurchaseCB subCB) {
+     *         subCB.specify().columnPurchasePrice(); // derived column for function
+     *         subCB.query().setXxx... // referrer sub-query condition
+     *     }
+     * }).greaterEqual(value);
+     *
+     * // ScalarCondition: (self-table sub-query)
+     * cb.query().scalar_Equal().max(new SubQuery<MemberCB>() {
+     *     public void query(MemberCB subCB) {
+     *         subCB.specify().columnBirthdate(); // derived column for function
+     *         subCB.query().setXxx... // scalar sub-query condition
+     *     }
+     * });
+     *
+     * // OrderBy
+     * cb.query().addOrderBy_MemberName_Asc();
+     * cb.query().addOrderBy_MemberName_Desc().withManualOrder(valueList);
+     * cb.query().addOrderBy_MemberName_Desc().withNullsFirst();
+     * cb.query().addOrderBy_MemberName_Desc().withNullsLast();
+     * cb.query().addSpecifiedDerivedOrderBy_Desc(aliasName);
+     *
+     * // Query(Relation)
+     * cb.query().queryMemberStatus()...;
+     * cb.query().queryMemberAddressAsValid(targetDate)...;
+     * 
+ * @return The instance of condition-query for base-point table to set up query. (NotNull) + */ + public BoostDocumentRuleCQ query() { + assertQueryPurpose(); // assert only when user-public query + return getConditionQuery(); + } + + public BoostDocumentRuleCQ getConditionQuery() { // public for parameter comment and internal + if (_conditionQuery == null) { + _conditionQuery = createLocalCQ(); + } + return _conditionQuery; + } + + protected BoostDocumentRuleCQ createLocalCQ() { + return xcreateCQ(null, getSqlClause(), getSqlClause() + .getBasePointAliasName(), 0); + } + + protected BoostDocumentRuleCQ xcreateCQ(final ConditionQuery childQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel) { + final BoostDocumentRuleCQ cq = xnewCQ(childQuery, sqlClause, aliasName, + nestLevel); + cq.xsetBaseCB(this); + return cq; + } + + protected BoostDocumentRuleCQ xnewCQ(final ConditionQuery childQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel) { + return new BoostDocumentRuleCQ(childQuery, sqlClause, aliasName, + nestLevel); + } + + @Override + public ConditionQuery localCQ() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Set up 'union' for base-point table.
+ * You don't need to call SetupSelect in union-query, + * because it inherits calls before. (Don't call SetupSelect after here) + *
+     * cb.query().union(new UnionQuery<BoostDocumentRuleCB>() {
+     *     public void query(BoostDocumentRuleCB unionCB) {
+     *         unionCB.query().setXxx...
+     *     }
+     * });
+     * 
+ * @param unionQuery The query of 'union'. (NotNull) + */ + public void union(final UnionQuery unionQuery) { + final BoostDocumentRuleCB cb = new BoostDocumentRuleCB(); + cb.xsetupForUnion(this); + xsyncUQ(cb); + try { + lock(); + unionQuery.query(cb); + } finally { + unlock(); + } + xsaveUCB(cb); + final BoostDocumentRuleCQ cq = cb.query(); + query().xsetUnionQuery(cq); + } + + /** + * Set up 'union all' for base-point table.
+ * You don't need to call SetupSelect in union-query, + * because it inherits calls before. (Don't call SetupSelect after here) + *
+     * cb.query().unionAll(new UnionQuery<BoostDocumentRuleCB>() {
+     *     public void query(BoostDocumentRuleCB unionCB) {
+     *         unionCB.query().setXxx...
+     *     }
+     * });
+     * 
+ * @param unionQuery The query of 'union all'. (NotNull) + */ + public void unionAll(final UnionQuery unionQuery) { + final BoostDocumentRuleCB cb = new BoostDocumentRuleCB(); + cb.xsetupForUnion(this); + xsyncUQ(cb); + try { + lock(); + unionQuery.query(cb); + } finally { + unlock(); + } + xsaveUCB(cb); + final BoostDocumentRuleCQ cq = cb.query(); + query().xsetUnionAllQuery(cq); + } + + // =================================================================================== + // SetupSelect + // =========== + // [DBFlute-0.7.4] + // =================================================================================== + // Specify + // ======= + protected HpSpecification _specification; + + /** + * Prepare for SpecifyColumn, (Specify)DerivedReferrer.
+ * This method should be called after SetupSelect. + *
+     * cb.setupSelect_MemberStatus(); // should be called before specify()
+     * cb.specify().columnMemberName();
+     * cb.specify().specifyMemberStatus().columnMemberStatusName();
+     * cb.specify().derivedPurchaseList().max(new SubQuery<PurchaseCB>() {
+     *     public void query(PurchaseCB subCB) {
+     *         subCB.specify().columnPurchaseDatetime();
+     *         subCB.query().set...
+     *     }
+     * }, aliasName);
+     * 
+ * @return The instance of specification. (NotNull) + */ + public HpSpecification specify() { + assertSpecifyPurpose(); + if (_specification == null) { + _specification = new HpSpecification(this, + new HpSpQyCall() { + @Override + public boolean has() { + return true; + } + + @Override + public BoostDocumentRuleCQ qy() { + return getConditionQuery(); + } + }, _purpose, getDBMetaProvider()); + } + return _specification; + } + + @Override + public HpColumnSpHandler localSp() { + return specify(); + } + + @Override + public boolean hasSpecifiedColumn() { + return _specification != null + && _specification.isAlreadySpecifiedRequiredColumn(); + } + + public static class HpSpecification extends + HpAbstractSpecification { + public HpSpecification(final ConditionBean baseCB, + final HpSpQyCall qyCall, + final HpCBPurpose purpose, final DBMetaProvider dbmetaProvider) { + super(baseCB, qyCall, purpose, dbmetaProvider); + } + + /** + * ID: {PK, ID, NotNull, BIGINT(19)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnId() { + return doColumn("ID"); + } + + /** + * URL_EXPR: {NotNull, VARCHAR(4000)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnUrlExpr() { + return doColumn("URL_EXPR"); + } + + /** + * BOOST_EXPR: {NotNull, VARCHAR(4000)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnBoostExpr() { + return doColumn("BOOST_EXPR"); + } + + /** + * SORT_ORDER: {NotNull, INTEGER(10)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnSortOrder() { + return doColumn("SORT_ORDER"); + } + + /** + * CREATED_BY: {NotNull, VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnCreatedBy() { + return doColumn("CREATED_BY"); + } + + /** + * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnCreatedTime() { + return doColumn("CREATED_TIME"); + } + + /** + * UPDATED_BY: {VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnUpdatedBy() { + return doColumn("UPDATED_BY"); + } + + /** + * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnUpdatedTime() { + return doColumn("UPDATED_TIME"); + } + + /** + * DELETED_BY: {VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnDeletedBy() { + return doColumn("DELETED_BY"); + } + + /** + * DELETED_TIME: {TIMESTAMP(23, 10)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnDeletedTime() { + return doColumn("DELETED_TIME"); + } + + /** + * VERSION_NO: {NotNull, INTEGER(10)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnVersionNo() { + return doColumn("VERSION_NO"); + } + + @Override + public void everyColumn() { + doEveryColumn(); + } + + @Override + public void exceptRecordMetaColumn() { + doExceptRecordMetaColumn(); + } + + @Override + protected void doSpecifyRequiredColumn() { + columnId(); // PK + } + + @Override + protected String getTableDbName() { + return "BOOST_DOCUMENT_RULE"; + } + + /** + * Prepare for (Specify)MyselfDerived (SubQuery). + * @return The object to set up a function for myself table. (NotNull) + */ + public HpSDRFunction myselfDerived() { + assertDerived("myselfDerived"); + if (xhasSyncQyCall()) { + xsyncQyCall().qy(); + } // for sync (for example, this in ColumnQuery) + return new HpSDRFunction( + _baseCB, + _qyCall.qy(), + new HpSDRSetupper() { + @Override + public void setup(final String fn, + final SubQuery sq, + final BoostDocumentRuleCQ cq, final String al, + final DerivedReferrerOption op) { + cq.xsmyselfDerive(fn, sq, al, op); + } + }, _dbmetaProvider); + } + } + + // [DBFlute-0.9.5.3] + // =================================================================================== + // Column Query + // ============ + /** + * Set up column-query. {column1 = column2} + *
+     * // where FOO < BAR
+     * cb.columnQuery(new SpecifyQuery<BoostDocumentRuleCB>() {
+     *     public void query(BoostDocumentRuleCB cb) {
+     *         cb.specify().columnFoo(); // left column
+     *     }
+     * }).lessThan(new SpecifyQuery<BoostDocumentRuleCB>() {
+     *     public void query(BoostDocumentRuleCB cb) {
+     *         cb.specify().columnBar(); // right column
+     *     }
+     * }); // you can calculate for right column like '}).plus(3);'
+     * 
+ * @param leftSpecifyQuery The specify-query for left column. (NotNull) + * @return The object for setting up operand and right column. (NotNull) + */ + public HpColQyOperand columnQuery( + final SpecifyQuery leftSpecifyQuery) { + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); + } + + protected BoostDocumentRuleCB xcreateColumnQueryCB() { + final BoostDocumentRuleCB cb = new BoostDocumentRuleCB(); + cb.xsetupForColumnQuery(this); + return cb; + } + + // =================================================================================== + // Dream Cruise + // ============ + /** + * Welcome to the Dream Cruise for condition-bean deep world.
+ * This is very specialty so you can get the frontier spirit. Bon voyage! + * @return The condition-bean for dream cruise, which is linked to main condition-bean. + */ + public BoostDocumentRuleCB dreamCruiseCB() { + final BoostDocumentRuleCB cb = new BoostDocumentRuleCB(); + cb.xsetupForDreamCruise(this); + return cb; + } + + @Override + protected ConditionBean xdoCreateDreamCruiseCB() { + return dreamCruiseCB(); + } + + // [DBFlute-0.9.6.3] + // =================================================================================== + // OrScope Query + // ============= + /** + * Set up the query for or-scope.
+ * (Same-column-and-same-condition-key conditions are allowed in or-scope) + *
+     * // where (FOO = '...' or BAR = '...')
+     * cb.orScopeQuery(new OrQuery<BoostDocumentRuleCB>() {
+     *     public void query(BoostDocumentRuleCB orCB) {
+     *         orCB.query().setFOO_Equal...
+     *         orCB.query().setBAR_Equal...
+     *     }
+     * });
+     * 
+ * @param orQuery The query for or-condition. (NotNull) + */ + public void orScopeQuery(final OrQuery orQuery) { + xorSQ((BoostDocumentRuleCB) this, orQuery); + } + + @Override + protected HpCBPurpose xhandleOrSQPurposeChange() { + return null; // means no check + } + + /** + * Set up the and-part of or-scope.
+ * (However nested or-scope query and as-or-split of like-search in and-part are unsupported) + *
+     * // where (FOO = '...' or (BAR = '...' and QUX = '...'))
+     * cb.orScopeQuery(new OrQuery<BoostDocumentRuleCB>() {
+     *     public void query(BoostDocumentRuleCB orCB) {
+     *         orCB.query().setFOO_Equal...
+     *         orCB.orScopeQueryAndPart(new AndQuery<BoostDocumentRuleCB>() {
+     *             public void query(BoostDocumentRuleCB andCB) {
+     *                 andCB.query().setBar_...
+     *                 andCB.query().setQux_...
+     *             }
+     *         });
+     *     }
+     * });
+     * 
+ * @param andQuery The query for and-condition. (NotNull) + */ + public void orScopeQueryAndPart(final AndQuery andQuery) { + xorSQAP((BoostDocumentRuleCB) this, andQuery); + } + + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + + // =================================================================================== + // DisplaySQL + // ========== + @Override + protected SqlAnalyzerFactory getSqlAnalyzerFactory() { + return new ImplementedInvokerAssistant().assistSqlAnalyzerFactory(); + } + + @Override + protected String getLogDateFormat() { + return DBFluteConfig.getInstance().getLogDateFormat(); + } + + @Override + protected String getLogTimestampFormat() { + return DBFluteConfig.getInstance().getLogTimestampFormat(); + } + + // =================================================================================== + // Meta Handling + // ============= + @Override + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Purpose Type + // ============ + @Override + protected void xprepareSyncQyCall(final ConditionBean mainCB) { + final BoostDocumentRuleCB cb; + if (mainCB != null) { + cb = (BoostDocumentRuleCB) mainCB; + } else { + cb = new BoostDocumentRuleCB(); + } + specify().xsetSyncQyCall(new HpSpQyCall() { + @Override + public boolean has() { + return true; + } + + @Override + public BoostDocumentRuleCQ qy() { + return cb.query(); + } + }); + } + + // =================================================================================== + // Internal + // ======== + // very internal (for suppressing warn about 'Not Use Import') + protected String getConditionBeanClassNameInternally() { + return BoostDocumentRuleCB.class.getName(); + } + + protected String getConditionQueryClassNameInternally() { + return BoostDocumentRuleCQ.class.getName(); + } + + protected String getSubQueryClassNameInternally() { + return SubQuery.class.getName(); + } + + protected String getConditionOptionClassNameInternally() { + return ConditionOption.class.getName(); + } +} diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsClickLogCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsClickLogCB.java index cb22768db..29285a5bd 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsClickLogCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsClickLogCB.java @@ -72,8 +72,8 @@ public class BsClickLogCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -561,7 +561,7 @@ public class BsClickLogCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand(new HpColQyHandler() { + return xcreateColQyOperand(new HpColQyHandler() { @Override public HpCalculator handle(final SpecifyQuery rightSp, final String operand) { @@ -646,6 +646,107 @@ public class BsClickLogCB extends AbstractConditionBean { xorSQAP((ClickLogCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsCrawlingSessionCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsCrawlingSessionCB.java index 72f98901e..bca8dca2d 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsCrawlingSessionCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsCrawlingSessionCB.java @@ -70,8 +70,8 @@ public class BsCrawlingSessionCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -517,17 +517,15 @@ public class BsCrawlingSessionCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected CrawlingSessionCB xcreateColumnQueryCB() { @@ -605,6 +603,107 @@ public class BsCrawlingSessionCB extends AbstractConditionBean { xorSQAP((CrawlingSessionCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsCrawlingSessionInfoCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsCrawlingSessionInfoCB.java index a9897db6b..d8d7df818 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsCrawlingSessionInfoCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsCrawlingSessionInfoCB.java @@ -71,8 +71,8 @@ public class BsCrawlingSessionInfoCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -561,17 +561,15 @@ public class BsCrawlingSessionInfoCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected CrawlingSessionInfoCB xcreateColumnQueryCB() { @@ -650,6 +648,107 @@ public class BsCrawlingSessionInfoCB extends AbstractConditionBean { xorSQAP((CrawlingSessionInfoCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsDataConfigToLabelTypeMappingCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsDataConfigToLabelTypeMappingCB.java index 82913eaf5..4e7018971 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsDataConfigToLabelTypeMappingCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsDataConfigToLabelTypeMappingCB.java @@ -73,8 +73,8 @@ public class BsDataConfigToLabelTypeMappingCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -621,17 +621,15 @@ public class BsDataConfigToLabelTypeMappingCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected DataConfigToLabelTypeMappingCB xcreateColumnQueryCB() { @@ -711,6 +709,107 @@ public class BsDataConfigToLabelTypeMappingCB extends AbstractConditionBean { xorSQAP((DataConfigToLabelTypeMappingCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsDataConfigToRoleTypeMappingCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsDataConfigToRoleTypeMappingCB.java index 194b0c48a..1b573716e 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsDataConfigToRoleTypeMappingCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsDataConfigToRoleTypeMappingCB.java @@ -73,8 +73,8 @@ public class BsDataConfigToRoleTypeMappingCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -620,17 +620,15 @@ public class BsDataConfigToRoleTypeMappingCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected DataConfigToRoleTypeMappingCB xcreateColumnQueryCB() { @@ -710,6 +708,107 @@ public class BsDataConfigToRoleTypeMappingCB extends AbstractConditionBean { xorSQAP((DataConfigToRoleTypeMappingCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsDataCrawlingConfigCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsDataCrawlingConfigCB.java index 5cd3d4e92..5dcdc9b50 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsDataCrawlingConfigCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsDataCrawlingConfigCB.java @@ -71,8 +71,8 @@ public class BsDataCrawlingConfigCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -636,17 +636,15 @@ public class BsDataCrawlingConfigCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected DataCrawlingConfigCB xcreateColumnQueryCB() { @@ -725,6 +723,107 @@ public class BsDataCrawlingConfigCB extends AbstractConditionBean { xorSQAP((DataCrawlingConfigCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsFailureUrlCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsFailureUrlCB.java index 1c5e16e1b..8875f3b60 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsFailureUrlCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsFailureUrlCB.java @@ -69,8 +69,8 @@ public class BsFailureUrlCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -506,17 +506,15 @@ public class BsFailureUrlCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected FailureUrlCB xcreateColumnQueryCB() { @@ -594,6 +592,107 @@ public class BsFailureUrlCB extends AbstractConditionBean { xorSQAP((FailureUrlCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsFavoriteLogCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsFavoriteLogCB.java index 303c300a6..85794e21d 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsFavoriteLogCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsFavoriteLogCB.java @@ -71,8 +71,8 @@ public class BsFavoriteLogCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -562,17 +562,15 @@ public class BsFavoriteLogCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected FavoriteLogCB xcreateColumnQueryCB() { @@ -650,6 +648,107 @@ public class BsFavoriteLogCB extends AbstractConditionBean { xorSQAP((FavoriteLogCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsFileAuthenticationCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsFileAuthenticationCB.java index b4598e234..d238701ea 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsFileAuthenticationCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsFileAuthenticationCB.java @@ -71,8 +71,8 @@ public class BsFileAuthenticationCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -641,17 +641,15 @@ public class BsFileAuthenticationCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected FileAuthenticationCB xcreateColumnQueryCB() { @@ -730,6 +728,107 @@ public class BsFileAuthenticationCB extends AbstractConditionBean { xorSQAP((FileAuthenticationCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsFileConfigToLabelTypeMappingCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsFileConfigToLabelTypeMappingCB.java index 128d68d27..f686f3c71 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsFileConfigToLabelTypeMappingCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsFileConfigToLabelTypeMappingCB.java @@ -73,8 +73,8 @@ public class BsFileConfigToLabelTypeMappingCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -621,17 +621,15 @@ public class BsFileConfigToLabelTypeMappingCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected FileConfigToLabelTypeMappingCB xcreateColumnQueryCB() { @@ -711,6 +709,107 @@ public class BsFileConfigToLabelTypeMappingCB extends AbstractConditionBean { xorSQAP((FileConfigToLabelTypeMappingCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsFileConfigToRoleTypeMappingCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsFileConfigToRoleTypeMappingCB.java index a8f64cf21..6b73dc74e 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsFileConfigToRoleTypeMappingCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsFileConfigToRoleTypeMappingCB.java @@ -73,8 +73,8 @@ public class BsFileConfigToRoleTypeMappingCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -620,17 +620,15 @@ public class BsFileConfigToRoleTypeMappingCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected FileConfigToRoleTypeMappingCB xcreateColumnQueryCB() { @@ -710,6 +708,107 @@ public class BsFileConfigToRoleTypeMappingCB extends AbstractConditionBean { xorSQAP((FileConfigToRoleTypeMappingCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsFileCrawlingConfigCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsFileCrawlingConfigCB.java index 92734016a..4a13b3fb8 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsFileCrawlingConfigCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsFileCrawlingConfigCB.java @@ -72,8 +72,8 @@ public class BsFileCrawlingConfigCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -726,17 +726,15 @@ public class BsFileCrawlingConfigCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected FileCrawlingConfigCB xcreateColumnQueryCB() { @@ -815,6 +813,107 @@ public class BsFileCrawlingConfigCB extends AbstractConditionBean { xorSQAP((FileCrawlingConfigCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsJobLogCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsJobLogCB.java index 7af661094..3cbf227c9 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsJobLogCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsJobLogCB.java @@ -69,8 +69,8 @@ public class BsJobLogCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -511,7 +511,7 @@ public class BsJobLogCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand(new HpColQyHandler() { + return xcreateColQyOperand(new HpColQyHandler() { @Override public HpCalculator handle(final SpecifyQuery rightSp, final String operand) { @@ -596,6 +596,107 @@ public class BsJobLogCB extends AbstractConditionBean { xorSQAP((JobLogCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsKeyMatchCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsKeyMatchCB.java index 89d78d709..0035f0e5a 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsKeyMatchCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsKeyMatchCB.java @@ -69,8 +69,8 @@ public class BsKeyMatchCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -537,7 +537,7 @@ public class BsKeyMatchCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand(new HpColQyHandler() { + return xcreateColQyOperand(new HpColQyHandler() { @Override public HpCalculator handle(final SpecifyQuery rightSp, final String operand) { @@ -622,6 +622,107 @@ public class BsKeyMatchCB extends AbstractConditionBean { xorSQAP((KeyMatchCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsLabelTypeCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsLabelTypeCB.java index b59e7fe84..0f6b0f660 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsLabelTypeCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsLabelTypeCB.java @@ -73,8 +73,8 @@ public class BsLabelTypeCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -690,17 +690,14 @@ public class BsLabelTypeCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle(final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected LabelTypeCB xcreateColumnQueryCB() { @@ -778,6 +775,107 @@ public class BsLabelTypeCB extends AbstractConditionBean { xorSQAP((LabelTypeCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsLabelTypeToRoleTypeMappingCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsLabelTypeToRoleTypeMappingCB.java index b9dbd2f7f..021491ccf 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsLabelTypeToRoleTypeMappingCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsLabelTypeToRoleTypeMappingCB.java @@ -73,8 +73,8 @@ public class BsLabelTypeToRoleTypeMappingCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -616,17 +616,15 @@ public class BsLabelTypeToRoleTypeMappingCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected LabelTypeToRoleTypeMappingCB xcreateColumnQueryCB() { @@ -705,6 +703,107 @@ public class BsLabelTypeToRoleTypeMappingCB extends AbstractConditionBean { xorSQAP((LabelTypeToRoleTypeMappingCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsOverlappingHostCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsOverlappingHostCB.java index 62c23ef32..0d585ba3e 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsOverlappingHostCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsOverlappingHostCB.java @@ -69,8 +69,8 @@ public class BsOverlappingHostCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -531,17 +531,15 @@ public class BsOverlappingHostCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected OverlappingHostCB xcreateColumnQueryCB() { @@ -619,6 +617,107 @@ public class BsOverlappingHostCB extends AbstractConditionBean { xorSQAP((OverlappingHostCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsPathMappingCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsPathMappingCB.java index 827e0ddaf..e437b13f6 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsPathMappingCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsPathMappingCB.java @@ -69,8 +69,8 @@ public class BsPathMappingCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -538,17 +538,15 @@ public class BsPathMappingCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected PathMappingCB xcreateColumnQueryCB() { @@ -626,6 +624,107 @@ public class BsPathMappingCB extends AbstractConditionBean { xorSQAP((PathMappingCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsRequestHeaderCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsRequestHeaderCB.java index 8e8a4ec0e..7e0364292 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsRequestHeaderCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsRequestHeaderCB.java @@ -71,8 +71,8 @@ public class BsRequestHeaderCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -607,17 +607,15 @@ public class BsRequestHeaderCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected RequestHeaderCB xcreateColumnQueryCB() { @@ -695,6 +693,107 @@ public class BsRequestHeaderCB extends AbstractConditionBean { xorSQAP((RequestHeaderCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsRoleTypeCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsRoleTypeCB.java index eca21548c..404b68dcb 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsRoleTypeCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsRoleTypeCB.java @@ -73,8 +73,8 @@ public class BsRoleTypeCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -673,7 +673,7 @@ public class BsRoleTypeCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand(new HpColQyHandler() { + return xcreateColQyOperand(new HpColQyHandler() { @Override public HpCalculator handle(final SpecifyQuery rightSp, final String operand) { @@ -758,6 +758,107 @@ public class BsRoleTypeCB extends AbstractConditionBean { xorSQAP((RoleTypeCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsScheduledJobCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsScheduledJobCB.java index 6c8d10179..d69d24b86 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsScheduledJobCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsScheduledJobCB.java @@ -69,8 +69,8 @@ public class BsScheduledJobCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -578,17 +578,15 @@ public class BsScheduledJobCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected ScheduledJobCB xcreateColumnQueryCB() { @@ -666,6 +664,107 @@ public class BsScheduledJobCB extends AbstractConditionBean { xorSQAP((ScheduledJobCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsSearchFieldLogCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsSearchFieldLogCB.java index 4ef6a889f..cc1600a1b 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsSearchFieldLogCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsSearchFieldLogCB.java @@ -72,8 +72,8 @@ public class BsSearchFieldLogCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -562,17 +562,15 @@ public class BsSearchFieldLogCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected SearchFieldLogCB xcreateColumnQueryCB() { @@ -650,6 +648,107 @@ public class BsSearchFieldLogCB extends AbstractConditionBean { xorSQAP((SearchFieldLogCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsSearchLogCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsSearchLogCB.java index 27263964f..a3d841917 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsSearchLogCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsSearchLogCB.java @@ -73,8 +73,8 @@ public class BsSearchLogCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -684,17 +684,14 @@ public class BsSearchLogCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle(final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected SearchLogCB xcreateColumnQueryCB() { @@ -772,6 +769,107 @@ public class BsSearchLogCB extends AbstractConditionBean { xorSQAP((SearchLogCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsSuggestBadWordCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsSuggestBadWordCB.java new file mode 100644 index 000000000..2d9358eda --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsSuggestBadWordCB.java @@ -0,0 +1,789 @@ +/* + * 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.cbean.bs; + +import jp.sf.fess.db.allcommon.DBFluteConfig; +import jp.sf.fess.db.allcommon.DBMetaInstanceHandler; +import jp.sf.fess.db.allcommon.ImplementedInvokerAssistant; +import jp.sf.fess.db.allcommon.ImplementedSqlClauseCreator; +import jp.sf.fess.db.cbean.SuggestBadWordCB; +import jp.sf.fess.db.cbean.cq.SuggestBadWordCQ; + +import org.seasar.dbflute.cbean.AbstractConditionBean; +import org.seasar.dbflute.cbean.AndQuery; +import org.seasar.dbflute.cbean.ConditionBean; +import org.seasar.dbflute.cbean.ConditionQuery; +import org.seasar.dbflute.cbean.OrQuery; +import org.seasar.dbflute.cbean.SpecifyQuery; +import org.seasar.dbflute.cbean.SubQuery; +import org.seasar.dbflute.cbean.UnionQuery; +import org.seasar.dbflute.cbean.chelper.HpAbstractSpecification; +import org.seasar.dbflute.cbean.chelper.HpCBPurpose; +import org.seasar.dbflute.cbean.chelper.HpCalculator; +import org.seasar.dbflute.cbean.chelper.HpColQyHandler; +import org.seasar.dbflute.cbean.chelper.HpColQyOperand; +import org.seasar.dbflute.cbean.chelper.HpColumnSpHandler; +import org.seasar.dbflute.cbean.chelper.HpSDRFunction; +import org.seasar.dbflute.cbean.chelper.HpSDRSetupper; +import org.seasar.dbflute.cbean.chelper.HpSpQyCall; +import org.seasar.dbflute.cbean.chelper.HpSpecifiedColumn; +import org.seasar.dbflute.cbean.coption.ConditionOption; +import org.seasar.dbflute.cbean.coption.DerivedReferrerOption; +import org.seasar.dbflute.cbean.sqlclause.SqlClause; +import org.seasar.dbflute.cbean.sqlclause.SqlClauseCreator; +import org.seasar.dbflute.dbmeta.DBMetaProvider; +import org.seasar.dbflute.twowaysql.factory.SqlAnalyzerFactory; + +/** + * The base condition-bean of SUGGEST_BAD_WORD. + * @author DBFlute(AutoGenerator) + */ +public class BsSuggestBadWordCB extends AbstractConditionBean { + + // =================================================================================== + // Attribute + // ========= + protected SuggestBadWordCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + public BsSuggestBadWordCB() { + if (DBFluteConfig.getInstance().isPagingCountLater()) { + enablePagingCountLater(); + } + if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { + enablePagingCountLeastJoin(); + } + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); + } + } + + // =================================================================================== + // SqlClause + // ========= + @Override + protected SqlClause createSqlClause() { + final SqlClauseCreator creator = DBFluteConfig.getInstance() + .getSqlClauseCreator(); + if (creator != null) { + return creator.createSqlClause(this); + } + return new ImplementedSqlClauseCreator().createSqlClause(this); // as default + } + + // =================================================================================== + // DBMeta Provider + // =============== + @Override + protected DBMetaProvider getDBMetaProvider() { + return DBMetaInstanceHandler.getProvider(); // as default + } + + // =================================================================================== + // Table Name + // ========== + @Override + public String getTableDbName() { + return "SUGGEST_BAD_WORD"; + } + + // =================================================================================== + // PrimaryKey Handling + // =================== + /** + * Accept the query condition of primary key as equal. + * @param id : PK, ID, NotNull, BIGINT(19). (NotNull) + * @return this. (NotNull) + */ + public SuggestBadWordCB acceptPK(final Long id) { + assertObjectNotNull("id", id); + final BsSuggestBadWordCB cb = this; + cb.query().setId_Equal(id); + return (SuggestBadWordCB) this; + } + + /** + * Accept the query condition of primary key as equal. (old style) + * @param id : PK, ID, NotNull, BIGINT(19). (NotNull) + */ + public void acceptPrimaryKey(final Long id) { + assertObjectNotNull("id", id); + final BsSuggestBadWordCB cb = this; + cb.query().setId_Equal(id); + } + + @Override + public ConditionBean addOrderBy_PK_Asc() { + query().addOrderBy_Id_Asc(); + return this; + } + + @Override + public ConditionBean addOrderBy_PK_Desc() { + query().addOrderBy_Id_Desc(); + return this; + } + + // =================================================================================== + // Query + // ===== + /** + * Prepare for various queries.
+ * Examples of main functions are following: + *
+     * // Basic Queries
+     * cb.query().setMemberId_Equal(value);        // =
+     * cb.query().setMemberId_NotEqual(value);     // !=
+     * cb.query().setMemberId_GreaterThan(value);  // >
+     * cb.query().setMemberId_LessThan(value);     // <
+     * cb.query().setMemberId_GreaterEqual(value); // >=
+     * cb.query().setMemberId_LessEqual(value);    // <=
+     * cb.query().setMemberName_InScope(valueList);    // in ('a', 'b')
+     * cb.query().setMemberName_NotInScope(valueList); // not in ('a', 'b')
+     * cb.query().setMemberName_PrefixSearch(value);   // like 'a%' escape '|'
+     * // LikeSearch with various options: (versatile)
+     * // {like ... [options]}
+     * cb.query().setMemberName_LikeSearch(value, option);
+     * cb.query().setMemberName_NotLikeSearch(value, option); // not like ...
+     * // FromTo with various options: (versatile)
+     * // {(default) fromDatetime <= BIRTHDATE <= toDatetime}
+     * cb.query().setBirthdate_FromTo(fromDatetime, toDatetime, option);
+     * // DateFromTo: (Date means yyyy/MM/dd)
+     * // {fromDate <= BIRTHDATE < toDate + 1 day}
+     * cb.query().setBirthdate_DateFromTo(fromDate, toDate);
+     * cb.query().setBirthdate_IsNull();    // is null
+     * cb.query().setBirthdate_IsNotNull(); // is not null
+     *
+     * // ExistsReferrer: (correlated sub-query)
+     * // {where exists (select PURCHASE_ID from PURCHASE where ...)}
+     * cb.query().existsPurchaseList(new SubQuery<PurchaseCB>() {
+     *     public void query(PurchaseCB subCB) {
+     *         subCB.query().setXxx... // referrer sub-query condition
+     *     }
+     * });
+     * cb.query().notExistsPurchaseList...
+     *
+     * // InScopeRelation: (sub-query)
+     * // {where MEMBER_STATUS_CODE in (select MEMBER_STATUS_CODE from MEMBER_STATUS where ...)}
+     * cb.query().inScopeMemberStatus(new SubQuery<MemberStatusCB>() {
+     *     public void query(MemberStatusCB subCB) {
+     *         subCB.query().setXxx... // relation sub-query condition
+     *     }
+     * });
+     * cb.query().notInScopeMemberStatus...
+     *
+     * // (Query)DerivedReferrer: (correlated sub-query)
+     * cb.query().derivedPurchaseList().max(new SubQuery<PurchaseCB>() {
+     *     public void query(PurchaseCB subCB) {
+     *         subCB.specify().columnPurchasePrice(); // derived column for function
+     *         subCB.query().setXxx... // referrer sub-query condition
+     *     }
+     * }).greaterEqual(value);
+     *
+     * // ScalarCondition: (self-table sub-query)
+     * cb.query().scalar_Equal().max(new SubQuery<MemberCB>() {
+     *     public void query(MemberCB subCB) {
+     *         subCB.specify().columnBirthdate(); // derived column for function
+     *         subCB.query().setXxx... // scalar sub-query condition
+     *     }
+     * });
+     *
+     * // OrderBy
+     * cb.query().addOrderBy_MemberName_Asc();
+     * cb.query().addOrderBy_MemberName_Desc().withManualOrder(valueList);
+     * cb.query().addOrderBy_MemberName_Desc().withNullsFirst();
+     * cb.query().addOrderBy_MemberName_Desc().withNullsLast();
+     * cb.query().addSpecifiedDerivedOrderBy_Desc(aliasName);
+     *
+     * // Query(Relation)
+     * cb.query().queryMemberStatus()...;
+     * cb.query().queryMemberAddressAsValid(targetDate)...;
+     * 
+ * @return The instance of condition-query for base-point table to set up query. (NotNull) + */ + public SuggestBadWordCQ query() { + assertQueryPurpose(); // assert only when user-public query + return getConditionQuery(); + } + + public SuggestBadWordCQ getConditionQuery() { // public for parameter comment and internal + if (_conditionQuery == null) { + _conditionQuery = createLocalCQ(); + } + return _conditionQuery; + } + + protected SuggestBadWordCQ createLocalCQ() { + return xcreateCQ(null, getSqlClause(), getSqlClause() + .getBasePointAliasName(), 0); + } + + protected SuggestBadWordCQ xcreateCQ(final ConditionQuery childQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel) { + final SuggestBadWordCQ cq = xnewCQ(childQuery, sqlClause, aliasName, + nestLevel); + cq.xsetBaseCB(this); + return cq; + } + + protected SuggestBadWordCQ xnewCQ(final ConditionQuery childQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel) { + return new SuggestBadWordCQ(childQuery, sqlClause, aliasName, nestLevel); + } + + @Override + public ConditionQuery localCQ() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Set up 'union' for base-point table.
+ * You don't need to call SetupSelect in union-query, + * because it inherits calls before. (Don't call SetupSelect after here) + *
+     * cb.query().union(new UnionQuery<SuggestBadWordCB>() {
+     *     public void query(SuggestBadWordCB unionCB) {
+     *         unionCB.query().setXxx...
+     *     }
+     * });
+     * 
+ * @param unionQuery The query of 'union'. (NotNull) + */ + public void union(final UnionQuery unionQuery) { + final SuggestBadWordCB cb = new SuggestBadWordCB(); + cb.xsetupForUnion(this); + xsyncUQ(cb); + try { + lock(); + unionQuery.query(cb); + } finally { + unlock(); + } + xsaveUCB(cb); + final SuggestBadWordCQ cq = cb.query(); + query().xsetUnionQuery(cq); + } + + /** + * Set up 'union all' for base-point table.
+ * You don't need to call SetupSelect in union-query, + * because it inherits calls before. (Don't call SetupSelect after here) + *
+     * cb.query().unionAll(new UnionQuery<SuggestBadWordCB>() {
+     *     public void query(SuggestBadWordCB unionCB) {
+     *         unionCB.query().setXxx...
+     *     }
+     * });
+     * 
+ * @param unionQuery The query of 'union all'. (NotNull) + */ + public void unionAll(final UnionQuery unionQuery) { + final SuggestBadWordCB cb = new SuggestBadWordCB(); + cb.xsetupForUnion(this); + xsyncUQ(cb); + try { + lock(); + unionQuery.query(cb); + } finally { + unlock(); + } + xsaveUCB(cb); + final SuggestBadWordCQ cq = cb.query(); + query().xsetUnionAllQuery(cq); + } + + // =================================================================================== + // SetupSelect + // =========== + // [DBFlute-0.7.4] + // =================================================================================== + // Specify + // ======= + protected HpSpecification _specification; + + /** + * Prepare for SpecifyColumn, (Specify)DerivedReferrer.
+ * This method should be called after SetupSelect. + *
+     * cb.setupSelect_MemberStatus(); // should be called before specify()
+     * cb.specify().columnMemberName();
+     * cb.specify().specifyMemberStatus().columnMemberStatusName();
+     * cb.specify().derivedPurchaseList().max(new SubQuery<PurchaseCB>() {
+     *     public void query(PurchaseCB subCB) {
+     *         subCB.specify().columnPurchaseDatetime();
+     *         subCB.query().set...
+     *     }
+     * }, aliasName);
+     * 
+ * @return The instance of specification. (NotNull) + */ + public HpSpecification specify() { + assertSpecifyPurpose(); + if (_specification == null) { + _specification = new HpSpecification(this, + new HpSpQyCall() { + @Override + public boolean has() { + return true; + } + + @Override + public SuggestBadWordCQ qy() { + return getConditionQuery(); + } + }, _purpose, getDBMetaProvider()); + } + return _specification; + } + + @Override + public HpColumnSpHandler localSp() { + return specify(); + } + + @Override + public boolean hasSpecifiedColumn() { + return _specification != null + && _specification.isAlreadySpecifiedRequiredColumn(); + } + + public static class HpSpecification extends + HpAbstractSpecification { + public HpSpecification(final ConditionBean baseCB, + final HpSpQyCall qyCall, + final HpCBPurpose purpose, final DBMetaProvider dbmetaProvider) { + super(baseCB, qyCall, purpose, dbmetaProvider); + } + + /** + * ID: {PK, ID, NotNull, BIGINT(19)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnId() { + return doColumn("ID"); + } + + /** + * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnSuggestWord() { + return doColumn("SUGGEST_WORD"); + } + + /** + * TARGET_ROLE: {VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnTargetRole() { + return doColumn("TARGET_ROLE"); + } + + /** + * TARGET_LABEL: {VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnTargetLabel() { + return doColumn("TARGET_LABEL"); + } + + /** + * CREATED_BY: {NotNull, VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnCreatedBy() { + return doColumn("CREATED_BY"); + } + + /** + * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnCreatedTime() { + return doColumn("CREATED_TIME"); + } + + /** + * UPDATED_BY: {VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnUpdatedBy() { + return doColumn("UPDATED_BY"); + } + + /** + * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnUpdatedTime() { + return doColumn("UPDATED_TIME"); + } + + /** + * DELETED_BY: {VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnDeletedBy() { + return doColumn("DELETED_BY"); + } + + /** + * DELETED_TIME: {TIMESTAMP(23, 10)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnDeletedTime() { + return doColumn("DELETED_TIME"); + } + + /** + * VERSION_NO: {NotNull, INTEGER(10)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnVersionNo() { + return doColumn("VERSION_NO"); + } + + @Override + public void everyColumn() { + doEveryColumn(); + } + + @Override + public void exceptRecordMetaColumn() { + doExceptRecordMetaColumn(); + } + + @Override + protected void doSpecifyRequiredColumn() { + columnId(); // PK + } + + @Override + protected String getTableDbName() { + return "SUGGEST_BAD_WORD"; + } + + /** + * Prepare for (Specify)MyselfDerived (SubQuery). + * @return The object to set up a function for myself table. (NotNull) + */ + public HpSDRFunction myselfDerived() { + assertDerived("myselfDerived"); + if (xhasSyncQyCall()) { + xsyncQyCall().qy(); + } // for sync (for example, this in ColumnQuery) + return new HpSDRFunction( + _baseCB, _qyCall.qy(), + new HpSDRSetupper() { + @Override + public void setup(final String fn, + final SubQuery sq, + final SuggestBadWordCQ cq, final String al, + final DerivedReferrerOption op) { + cq.xsmyselfDerive(fn, sq, al, op); + } + }, _dbmetaProvider); + } + } + + // [DBFlute-0.9.5.3] + // =================================================================================== + // Column Query + // ============ + /** + * Set up column-query. {column1 = column2} + *
+     * // where FOO < BAR
+     * cb.columnQuery(new SpecifyQuery<SuggestBadWordCB>() {
+     *     public void query(SuggestBadWordCB cb) {
+     *         cb.specify().columnFoo(); // left column
+     *     }
+     * }).lessThan(new SpecifyQuery<SuggestBadWordCB>() {
+     *     public void query(SuggestBadWordCB cb) {
+     *         cb.specify().columnBar(); // right column
+     *     }
+     * }); // you can calculate for right column like '}).plus(3);'
+     * 
+ * @param leftSpecifyQuery The specify-query for left column. (NotNull) + * @return The object for setting up operand and right column. (NotNull) + */ + public HpColQyOperand columnQuery( + final SpecifyQuery leftSpecifyQuery) { + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); + } + + protected SuggestBadWordCB xcreateColumnQueryCB() { + final SuggestBadWordCB cb = new SuggestBadWordCB(); + cb.xsetupForColumnQuery(this); + return cb; + } + + // =================================================================================== + // Dream Cruise + // ============ + /** + * Welcome to the Dream Cruise for condition-bean deep world.
+ * This is very specialty so you can get the frontier spirit. Bon voyage! + * @return The condition-bean for dream cruise, which is linked to main condition-bean. + */ + public SuggestBadWordCB dreamCruiseCB() { + final SuggestBadWordCB cb = new SuggestBadWordCB(); + cb.xsetupForDreamCruise(this); + return cb; + } + + @Override + protected ConditionBean xdoCreateDreamCruiseCB() { + return dreamCruiseCB(); + } + + // [DBFlute-0.9.6.3] + // =================================================================================== + // OrScope Query + // ============= + /** + * Set up the query for or-scope.
+ * (Same-column-and-same-condition-key conditions are allowed in or-scope) + *
+     * // where (FOO = '...' or BAR = '...')
+     * cb.orScopeQuery(new OrQuery<SuggestBadWordCB>() {
+     *     public void query(SuggestBadWordCB orCB) {
+     *         orCB.query().setFOO_Equal...
+     *         orCB.query().setBAR_Equal...
+     *     }
+     * });
+     * 
+ * @param orQuery The query for or-condition. (NotNull) + */ + public void orScopeQuery(final OrQuery orQuery) { + xorSQ((SuggestBadWordCB) this, orQuery); + } + + @Override + protected HpCBPurpose xhandleOrSQPurposeChange() { + return null; // means no check + } + + /** + * Set up the and-part of or-scope.
+ * (However nested or-scope query and as-or-split of like-search in and-part are unsupported) + *
+     * // where (FOO = '...' or (BAR = '...' and QUX = '...'))
+     * cb.orScopeQuery(new OrQuery<SuggestBadWordCB>() {
+     *     public void query(SuggestBadWordCB orCB) {
+     *         orCB.query().setFOO_Equal...
+     *         orCB.orScopeQueryAndPart(new AndQuery<SuggestBadWordCB>() {
+     *             public void query(SuggestBadWordCB andCB) {
+     *                 andCB.query().setBar_...
+     *                 andCB.query().setQux_...
+     *             }
+     *         });
+     *     }
+     * });
+     * 
+ * @param andQuery The query for and-condition. (NotNull) + */ + public void orScopeQueryAndPart(final AndQuery andQuery) { + xorSQAP((SuggestBadWordCB) this, andQuery); + } + + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + + // =================================================================================== + // DisplaySQL + // ========== + @Override + protected SqlAnalyzerFactory getSqlAnalyzerFactory() { + return new ImplementedInvokerAssistant().assistSqlAnalyzerFactory(); + } + + @Override + protected String getLogDateFormat() { + return DBFluteConfig.getInstance().getLogDateFormat(); + } + + @Override + protected String getLogTimestampFormat() { + return DBFluteConfig.getInstance().getLogTimestampFormat(); + } + + // =================================================================================== + // Meta Handling + // ============= + @Override + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Purpose Type + // ============ + @Override + protected void xprepareSyncQyCall(final ConditionBean mainCB) { + final SuggestBadWordCB cb; + if (mainCB != null) { + cb = (SuggestBadWordCB) mainCB; + } else { + cb = new SuggestBadWordCB(); + } + specify().xsetSyncQyCall(new HpSpQyCall() { + @Override + public boolean has() { + return true; + } + + @Override + public SuggestBadWordCQ qy() { + return cb.query(); + } + }); + } + + // =================================================================================== + // Internal + // ======== + // very internal (for suppressing warn about 'Not Use Import') + protected String getConditionBeanClassNameInternally() { + return SuggestBadWordCB.class.getName(); + } + + protected String getConditionQueryClassNameInternally() { + return SuggestBadWordCQ.class.getName(); + } + + protected String getSubQueryClassNameInternally() { + return SubQuery.class.getName(); + } + + protected String getConditionOptionClassNameInternally() { + return ConditionOption.class.getName(); + } +} diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsSuggestElevateWordCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsSuggestElevateWordCB.java new file mode 100644 index 000000000..2a9b834f7 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsSuggestElevateWordCB.java @@ -0,0 +1,808 @@ +/* + * 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.cbean.bs; + +import jp.sf.fess.db.allcommon.DBFluteConfig; +import jp.sf.fess.db.allcommon.DBMetaInstanceHandler; +import jp.sf.fess.db.allcommon.ImplementedInvokerAssistant; +import jp.sf.fess.db.allcommon.ImplementedSqlClauseCreator; +import jp.sf.fess.db.cbean.SuggestElevateWordCB; +import jp.sf.fess.db.cbean.cq.SuggestElevateWordCQ; + +import org.seasar.dbflute.cbean.AbstractConditionBean; +import org.seasar.dbflute.cbean.AndQuery; +import org.seasar.dbflute.cbean.ConditionBean; +import org.seasar.dbflute.cbean.ConditionQuery; +import org.seasar.dbflute.cbean.OrQuery; +import org.seasar.dbflute.cbean.SpecifyQuery; +import org.seasar.dbflute.cbean.SubQuery; +import org.seasar.dbflute.cbean.UnionQuery; +import org.seasar.dbflute.cbean.chelper.HpAbstractSpecification; +import org.seasar.dbflute.cbean.chelper.HpCBPurpose; +import org.seasar.dbflute.cbean.chelper.HpCalculator; +import org.seasar.dbflute.cbean.chelper.HpColQyHandler; +import org.seasar.dbflute.cbean.chelper.HpColQyOperand; +import org.seasar.dbflute.cbean.chelper.HpColumnSpHandler; +import org.seasar.dbflute.cbean.chelper.HpSDRFunction; +import org.seasar.dbflute.cbean.chelper.HpSDRSetupper; +import org.seasar.dbflute.cbean.chelper.HpSpQyCall; +import org.seasar.dbflute.cbean.chelper.HpSpecifiedColumn; +import org.seasar.dbflute.cbean.coption.ConditionOption; +import org.seasar.dbflute.cbean.coption.DerivedReferrerOption; +import org.seasar.dbflute.cbean.sqlclause.SqlClause; +import org.seasar.dbflute.cbean.sqlclause.SqlClauseCreator; +import org.seasar.dbflute.dbmeta.DBMetaProvider; +import org.seasar.dbflute.twowaysql.factory.SqlAnalyzerFactory; + +/** + * The base condition-bean of SUGGEST_ELEVATE_WORD. + * @author DBFlute(AutoGenerator) + */ +public class BsSuggestElevateWordCB extends AbstractConditionBean { + + // =================================================================================== + // Attribute + // ========= + protected SuggestElevateWordCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + public BsSuggestElevateWordCB() { + if (DBFluteConfig.getInstance().isPagingCountLater()) { + enablePagingCountLater(); + } + if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { + enablePagingCountLeastJoin(); + } + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); + } + } + + // =================================================================================== + // SqlClause + // ========= + @Override + protected SqlClause createSqlClause() { + final SqlClauseCreator creator = DBFluteConfig.getInstance() + .getSqlClauseCreator(); + if (creator != null) { + return creator.createSqlClause(this); + } + return new ImplementedSqlClauseCreator().createSqlClause(this); // as default + } + + // =================================================================================== + // DBMeta Provider + // =============== + @Override + protected DBMetaProvider getDBMetaProvider() { + return DBMetaInstanceHandler.getProvider(); // as default + } + + // =================================================================================== + // Table Name + // ========== + @Override + public String getTableDbName() { + return "SUGGEST_ELEVATE_WORD"; + } + + // =================================================================================== + // PrimaryKey Handling + // =================== + /** + * Accept the query condition of primary key as equal. + * @param id : PK, ID, NotNull, BIGINT(19). (NotNull) + * @return this. (NotNull) + */ + public SuggestElevateWordCB acceptPK(final Long id) { + assertObjectNotNull("id", id); + final BsSuggestElevateWordCB cb = this; + cb.query().setId_Equal(id); + return (SuggestElevateWordCB) this; + } + + /** + * Accept the query condition of primary key as equal. (old style) + * @param id : PK, ID, NotNull, BIGINT(19). (NotNull) + */ + public void acceptPrimaryKey(final Long id) { + assertObjectNotNull("id", id); + final BsSuggestElevateWordCB cb = this; + cb.query().setId_Equal(id); + } + + @Override + public ConditionBean addOrderBy_PK_Asc() { + query().addOrderBy_Id_Asc(); + return this; + } + + @Override + public ConditionBean addOrderBy_PK_Desc() { + query().addOrderBy_Id_Desc(); + return this; + } + + // =================================================================================== + // Query + // ===== + /** + * Prepare for various queries.
+ * Examples of main functions are following: + *
+     * // Basic Queries
+     * cb.query().setMemberId_Equal(value);        // =
+     * cb.query().setMemberId_NotEqual(value);     // !=
+     * cb.query().setMemberId_GreaterThan(value);  // >
+     * cb.query().setMemberId_LessThan(value);     // <
+     * cb.query().setMemberId_GreaterEqual(value); // >=
+     * cb.query().setMemberId_LessEqual(value);    // <=
+     * cb.query().setMemberName_InScope(valueList);    // in ('a', 'b')
+     * cb.query().setMemberName_NotInScope(valueList); // not in ('a', 'b')
+     * cb.query().setMemberName_PrefixSearch(value);   // like 'a%' escape '|'
+     * // LikeSearch with various options: (versatile)
+     * // {like ... [options]}
+     * cb.query().setMemberName_LikeSearch(value, option);
+     * cb.query().setMemberName_NotLikeSearch(value, option); // not like ...
+     * // FromTo with various options: (versatile)
+     * // {(default) fromDatetime <= BIRTHDATE <= toDatetime}
+     * cb.query().setBirthdate_FromTo(fromDatetime, toDatetime, option);
+     * // DateFromTo: (Date means yyyy/MM/dd)
+     * // {fromDate <= BIRTHDATE < toDate + 1 day}
+     * cb.query().setBirthdate_DateFromTo(fromDate, toDate);
+     * cb.query().setBirthdate_IsNull();    // is null
+     * cb.query().setBirthdate_IsNotNull(); // is not null
+     *
+     * // ExistsReferrer: (correlated sub-query)
+     * // {where exists (select PURCHASE_ID from PURCHASE where ...)}
+     * cb.query().existsPurchaseList(new SubQuery<PurchaseCB>() {
+     *     public void query(PurchaseCB subCB) {
+     *         subCB.query().setXxx... // referrer sub-query condition
+     *     }
+     * });
+     * cb.query().notExistsPurchaseList...
+     *
+     * // InScopeRelation: (sub-query)
+     * // {where MEMBER_STATUS_CODE in (select MEMBER_STATUS_CODE from MEMBER_STATUS where ...)}
+     * cb.query().inScopeMemberStatus(new SubQuery<MemberStatusCB>() {
+     *     public void query(MemberStatusCB subCB) {
+     *         subCB.query().setXxx... // relation sub-query condition
+     *     }
+     * });
+     * cb.query().notInScopeMemberStatus...
+     *
+     * // (Query)DerivedReferrer: (correlated sub-query)
+     * cb.query().derivedPurchaseList().max(new SubQuery<PurchaseCB>() {
+     *     public void query(PurchaseCB subCB) {
+     *         subCB.specify().columnPurchasePrice(); // derived column for function
+     *         subCB.query().setXxx... // referrer sub-query condition
+     *     }
+     * }).greaterEqual(value);
+     *
+     * // ScalarCondition: (self-table sub-query)
+     * cb.query().scalar_Equal().max(new SubQuery<MemberCB>() {
+     *     public void query(MemberCB subCB) {
+     *         subCB.specify().columnBirthdate(); // derived column for function
+     *         subCB.query().setXxx... // scalar sub-query condition
+     *     }
+     * });
+     *
+     * // OrderBy
+     * cb.query().addOrderBy_MemberName_Asc();
+     * cb.query().addOrderBy_MemberName_Desc().withManualOrder(valueList);
+     * cb.query().addOrderBy_MemberName_Desc().withNullsFirst();
+     * cb.query().addOrderBy_MemberName_Desc().withNullsLast();
+     * cb.query().addSpecifiedDerivedOrderBy_Desc(aliasName);
+     *
+     * // Query(Relation)
+     * cb.query().queryMemberStatus()...;
+     * cb.query().queryMemberAddressAsValid(targetDate)...;
+     * 
+ * @return The instance of condition-query for base-point table to set up query. (NotNull) + */ + public SuggestElevateWordCQ query() { + assertQueryPurpose(); // assert only when user-public query + return getConditionQuery(); + } + + public SuggestElevateWordCQ getConditionQuery() { // public for parameter comment and internal + if (_conditionQuery == null) { + _conditionQuery = createLocalCQ(); + } + return _conditionQuery; + } + + protected SuggestElevateWordCQ createLocalCQ() { + return xcreateCQ(null, getSqlClause(), getSqlClause() + .getBasePointAliasName(), 0); + } + + protected SuggestElevateWordCQ xcreateCQ(final ConditionQuery childQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel) { + final SuggestElevateWordCQ cq = xnewCQ(childQuery, sqlClause, + aliasName, nestLevel); + cq.xsetBaseCB(this); + return cq; + } + + protected SuggestElevateWordCQ xnewCQ(final ConditionQuery childQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel) { + return new SuggestElevateWordCQ(childQuery, sqlClause, aliasName, + nestLevel); + } + + @Override + public ConditionQuery localCQ() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Set up 'union' for base-point table.
+ * You don't need to call SetupSelect in union-query, + * because it inherits calls before. (Don't call SetupSelect after here) + *
+     * cb.query().union(new UnionQuery<SuggestElevateWordCB>() {
+     *     public void query(SuggestElevateWordCB unionCB) {
+     *         unionCB.query().setXxx...
+     *     }
+     * });
+     * 
+ * @param unionQuery The query of 'union'. (NotNull) + */ + public void union(final UnionQuery unionQuery) { + final SuggestElevateWordCB cb = new SuggestElevateWordCB(); + cb.xsetupForUnion(this); + xsyncUQ(cb); + try { + lock(); + unionQuery.query(cb); + } finally { + unlock(); + } + xsaveUCB(cb); + final SuggestElevateWordCQ cq = cb.query(); + query().xsetUnionQuery(cq); + } + + /** + * Set up 'union all' for base-point table.
+ * You don't need to call SetupSelect in union-query, + * because it inherits calls before. (Don't call SetupSelect after here) + *
+     * cb.query().unionAll(new UnionQuery<SuggestElevateWordCB>() {
+     *     public void query(SuggestElevateWordCB unionCB) {
+     *         unionCB.query().setXxx...
+     *     }
+     * });
+     * 
+ * @param unionQuery The query of 'union all'. (NotNull) + */ + public void unionAll(final UnionQuery unionQuery) { + final SuggestElevateWordCB cb = new SuggestElevateWordCB(); + cb.xsetupForUnion(this); + xsyncUQ(cb); + try { + lock(); + unionQuery.query(cb); + } finally { + unlock(); + } + xsaveUCB(cb); + final SuggestElevateWordCQ cq = cb.query(); + query().xsetUnionAllQuery(cq); + } + + // =================================================================================== + // SetupSelect + // =========== + // [DBFlute-0.7.4] + // =================================================================================== + // Specify + // ======= + protected HpSpecification _specification; + + /** + * Prepare for SpecifyColumn, (Specify)DerivedReferrer.
+ * This method should be called after SetupSelect. + *
+     * cb.setupSelect_MemberStatus(); // should be called before specify()
+     * cb.specify().columnMemberName();
+     * cb.specify().specifyMemberStatus().columnMemberStatusName();
+     * cb.specify().derivedPurchaseList().max(new SubQuery<PurchaseCB>() {
+     *     public void query(PurchaseCB subCB) {
+     *         subCB.specify().columnPurchaseDatetime();
+     *         subCB.query().set...
+     *     }
+     * }, aliasName);
+     * 
+ * @return The instance of specification. (NotNull) + */ + public HpSpecification specify() { + assertSpecifyPurpose(); + if (_specification == null) { + _specification = new HpSpecification(this, + new HpSpQyCall() { + @Override + public boolean has() { + return true; + } + + @Override + public SuggestElevateWordCQ qy() { + return getConditionQuery(); + } + }, _purpose, getDBMetaProvider()); + } + return _specification; + } + + @Override + public HpColumnSpHandler localSp() { + return specify(); + } + + @Override + public boolean hasSpecifiedColumn() { + return _specification != null + && _specification.isAlreadySpecifiedRequiredColumn(); + } + + public static class HpSpecification extends + HpAbstractSpecification { + public HpSpecification(final ConditionBean baseCB, + final HpSpQyCall qyCall, + final HpCBPurpose purpose, final DBMetaProvider dbmetaProvider) { + super(baseCB, qyCall, purpose, dbmetaProvider); + } + + /** + * ID: {PK, ID, NotNull, BIGINT(19)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnId() { + return doColumn("ID"); + } + + /** + * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnSuggestWord() { + return doColumn("SUGGEST_WORD"); + } + + /** + * READING: {VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnReading() { + return doColumn("READING"); + } + + /** + * TARGET_ROLE: {VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnTargetRole() { + return doColumn("TARGET_ROLE"); + } + + /** + * TARGET_LABEL: {VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnTargetLabel() { + return doColumn("TARGET_LABEL"); + } + + /** + * BOOST: {NotNull, DOUBLE(17)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnBoost() { + return doColumn("BOOST"); + } + + /** + * CREATED_BY: {NotNull, VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnCreatedBy() { + return doColumn("CREATED_BY"); + } + + /** + * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnCreatedTime() { + return doColumn("CREATED_TIME"); + } + + /** + * UPDATED_BY: {VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnUpdatedBy() { + return doColumn("UPDATED_BY"); + } + + /** + * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnUpdatedTime() { + return doColumn("UPDATED_TIME"); + } + + /** + * DELETED_BY: {VARCHAR(255)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnDeletedBy() { + return doColumn("DELETED_BY"); + } + + /** + * DELETED_TIME: {TIMESTAMP(23, 10)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnDeletedTime() { + return doColumn("DELETED_TIME"); + } + + /** + * VERSION_NO: {NotNull, INTEGER(10)} + * @return The information object of specified column. (NotNull) + */ + public HpSpecifiedColumn columnVersionNo() { + return doColumn("VERSION_NO"); + } + + @Override + public void everyColumn() { + doEveryColumn(); + } + + @Override + public void exceptRecordMetaColumn() { + doExceptRecordMetaColumn(); + } + + @Override + protected void doSpecifyRequiredColumn() { + columnId(); // PK + } + + @Override + protected String getTableDbName() { + return "SUGGEST_ELEVATE_WORD"; + } + + /** + * Prepare for (Specify)MyselfDerived (SubQuery). + * @return The object to set up a function for myself table. (NotNull) + */ + public HpSDRFunction myselfDerived() { + assertDerived("myselfDerived"); + if (xhasSyncQyCall()) { + xsyncQyCall().qy(); + } // for sync (for example, this in ColumnQuery) + return new HpSDRFunction( + _baseCB, + _qyCall.qy(), + new HpSDRSetupper() { + @Override + public void setup(final String fn, + final SubQuery sq, + final SuggestElevateWordCQ cq, final String al, + final DerivedReferrerOption op) { + cq.xsmyselfDerive(fn, sq, al, op); + } + }, _dbmetaProvider); + } + } + + // [DBFlute-0.9.5.3] + // =================================================================================== + // Column Query + // ============ + /** + * Set up column-query. {column1 = column2} + *
+     * // where FOO < BAR
+     * cb.columnQuery(new SpecifyQuery<SuggestElevateWordCB>() {
+     *     public void query(SuggestElevateWordCB cb) {
+     *         cb.specify().columnFoo(); // left column
+     *     }
+     * }).lessThan(new SpecifyQuery<SuggestElevateWordCB>() {
+     *     public void query(SuggestElevateWordCB cb) {
+     *         cb.specify().columnBar(); // right column
+     *     }
+     * }); // you can calculate for right column like '}).plus(3);'
+     * 
+ * @param leftSpecifyQuery The specify-query for left column. (NotNull) + * @return The object for setting up operand and right column. (NotNull) + */ + public HpColQyOperand columnQuery( + final SpecifyQuery leftSpecifyQuery) { + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); + } + + protected SuggestElevateWordCB xcreateColumnQueryCB() { + final SuggestElevateWordCB cb = new SuggestElevateWordCB(); + cb.xsetupForColumnQuery(this); + return cb; + } + + // =================================================================================== + // Dream Cruise + // ============ + /** + * Welcome to the Dream Cruise for condition-bean deep world.
+ * This is very specialty so you can get the frontier spirit. Bon voyage! + * @return The condition-bean for dream cruise, which is linked to main condition-bean. + */ + public SuggestElevateWordCB dreamCruiseCB() { + final SuggestElevateWordCB cb = new SuggestElevateWordCB(); + cb.xsetupForDreamCruise(this); + return cb; + } + + @Override + protected ConditionBean xdoCreateDreamCruiseCB() { + return dreamCruiseCB(); + } + + // [DBFlute-0.9.6.3] + // =================================================================================== + // OrScope Query + // ============= + /** + * Set up the query for or-scope.
+ * (Same-column-and-same-condition-key conditions are allowed in or-scope) + *
+     * // where (FOO = '...' or BAR = '...')
+     * cb.orScopeQuery(new OrQuery<SuggestElevateWordCB>() {
+     *     public void query(SuggestElevateWordCB orCB) {
+     *         orCB.query().setFOO_Equal...
+     *         orCB.query().setBAR_Equal...
+     *     }
+     * });
+     * 
+ * @param orQuery The query for or-condition. (NotNull) + */ + public void orScopeQuery(final OrQuery orQuery) { + xorSQ((SuggestElevateWordCB) this, orQuery); + } + + @Override + protected HpCBPurpose xhandleOrSQPurposeChange() { + return null; // means no check + } + + /** + * Set up the and-part of or-scope.
+ * (However nested or-scope query and as-or-split of like-search in and-part are unsupported) + *
+     * // where (FOO = '...' or (BAR = '...' and QUX = '...'))
+     * cb.orScopeQuery(new OrQuery<SuggestElevateWordCB>() {
+     *     public void query(SuggestElevateWordCB orCB) {
+     *         orCB.query().setFOO_Equal...
+     *         orCB.orScopeQueryAndPart(new AndQuery<SuggestElevateWordCB>() {
+     *             public void query(SuggestElevateWordCB andCB) {
+     *                 andCB.query().setBar_...
+     *                 andCB.query().setQux_...
+     *             }
+     *         });
+     *     }
+     * });
+     * 
+ * @param andQuery The query for and-condition. (NotNull) + */ + public void orScopeQueryAndPart( + final AndQuery andQuery) { + xorSQAP((SuggestElevateWordCB) this, andQuery); + } + + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + + // =================================================================================== + // DisplaySQL + // ========== + @Override + protected SqlAnalyzerFactory getSqlAnalyzerFactory() { + return new ImplementedInvokerAssistant().assistSqlAnalyzerFactory(); + } + + @Override + protected String getLogDateFormat() { + return DBFluteConfig.getInstance().getLogDateFormat(); + } + + @Override + protected String getLogTimestampFormat() { + return DBFluteConfig.getInstance().getLogTimestampFormat(); + } + + // =================================================================================== + // Meta Handling + // ============= + @Override + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Purpose Type + // ============ + @Override + protected void xprepareSyncQyCall(final ConditionBean mainCB) { + final SuggestElevateWordCB cb; + if (mainCB != null) { + cb = (SuggestElevateWordCB) mainCB; + } else { + cb = new SuggestElevateWordCB(); + } + specify().xsetSyncQyCall(new HpSpQyCall() { + @Override + public boolean has() { + return true; + } + + @Override + public SuggestElevateWordCQ qy() { + return cb.query(); + } + }); + } + + // =================================================================================== + // Internal + // ======== + // very internal (for suppressing warn about 'Not Use Import') + protected String getConditionBeanClassNameInternally() { + return SuggestElevateWordCB.class.getName(); + } + + protected String getConditionQueryClassNameInternally() { + return SuggestElevateWordCQ.class.getName(); + } + + protected String getSubQueryClassNameInternally() { + return SubQuery.class.getName(); + } + + protected String getConditionOptionClassNameInternally() { + return ConditionOption.class.getName(); + } +} diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsUserInfoCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsUserInfoCB.java index a44a5faae..b5b273de2 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsUserInfoCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsUserInfoCB.java @@ -71,8 +71,8 @@ public class BsUserInfoCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -538,7 +538,7 @@ public class BsUserInfoCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand(new HpColQyHandler() { + return xcreateColQyOperand(new HpColQyHandler() { @Override public HpCalculator handle(final SpecifyQuery rightSp, final String operand) { @@ -623,6 +623,107 @@ public class BsUserInfoCB extends AbstractConditionBean { xorSQAP((UserInfoCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsWebAuthenticationCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsWebAuthenticationCB.java index 8eb6a3f35..58cbe954a 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsWebAuthenticationCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsWebAuthenticationCB.java @@ -71,8 +71,8 @@ public class BsWebAuthenticationCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -649,17 +649,15 @@ public class BsWebAuthenticationCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected WebAuthenticationCB xcreateColumnQueryCB() { @@ -737,6 +735,107 @@ public class BsWebAuthenticationCB extends AbstractConditionBean { xorSQAP((WebAuthenticationCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsWebConfigToLabelTypeMappingCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsWebConfigToLabelTypeMappingCB.java index d84b90573..ea495be72 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsWebConfigToLabelTypeMappingCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsWebConfigToLabelTypeMappingCB.java @@ -73,8 +73,8 @@ public class BsWebConfigToLabelTypeMappingCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -620,17 +620,15 @@ public class BsWebConfigToLabelTypeMappingCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected WebConfigToLabelTypeMappingCB xcreateColumnQueryCB() { @@ -710,6 +708,107 @@ public class BsWebConfigToLabelTypeMappingCB extends AbstractConditionBean { xorSQAP((WebConfigToLabelTypeMappingCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsWebConfigToRoleTypeMappingCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsWebConfigToRoleTypeMappingCB.java index 209a9e6b8..77ce9983d 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsWebConfigToRoleTypeMappingCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsWebConfigToRoleTypeMappingCB.java @@ -73,8 +73,8 @@ public class BsWebConfigToRoleTypeMappingCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -620,17 +620,15 @@ public class BsWebConfigToRoleTypeMappingCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected WebConfigToRoleTypeMappingCB xcreateColumnQueryCB() { @@ -709,6 +707,107 @@ public class BsWebConfigToRoleTypeMappingCB extends AbstractConditionBean { xorSQAP((WebConfigToRoleTypeMappingCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/bs/BsWebCrawlingConfigCB.java b/src/main/java/jp/sf/fess/db/cbean/bs/BsWebCrawlingConfigCB.java index c6bfbed04..e9957f58e 100644 --- a/src/main/java/jp/sf/fess/db/cbean/bs/BsWebCrawlingConfigCB.java +++ b/src/main/java/jp/sf/fess/db/cbean/bs/BsWebCrawlingConfigCB.java @@ -73,8 +73,8 @@ public class BsWebCrawlingConfigCB extends AbstractConditionBean { if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) { enablePagingCountLeastJoin(); } - if (DBFluteConfig.getInstance().isCheckCountBeforeQueryUpdate()) { - enableCheckCountBeforeQueryUpdate(); + if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) { + enableQueryUpdateCountPreCheck(); } } @@ -767,17 +767,15 @@ public class BsWebCrawlingConfigCB extends AbstractConditionBean { */ public HpColQyOperand columnQuery( final SpecifyQuery leftSpecifyQuery) { - return new HpColQyOperand( - new HpColQyHandler() { - @Override - public HpCalculator handle( - final SpecifyQuery rightSp, - final String operand) { - return xcolqy(xcreateColumnQueryCB(), - xcreateColumnQueryCB(), leftSpecifyQuery, - rightSp, operand); - } - }); + return xcreateColQyOperand(new HpColQyHandler() { + @Override + public HpCalculator handle( + final SpecifyQuery rightSp, + final String operand) { + return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), + leftSpecifyQuery, rightSp, operand); + } + }); } protected WebCrawlingConfigCB xcreateColumnQueryCB() { @@ -855,6 +853,107 @@ public class BsWebCrawlingConfigCB extends AbstractConditionBean { xorSQAP((WebCrawlingConfigCB) this, andQuery); } + /** + * Check invalid query when query is set.
+ * (it throws an exception if set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this.
+ * + *

renamed to checkNullOrEmptyQuery() since 1.1, + * but not deprecated because it might have many use.

+ * + * #java8 compatible option + */ + public void checkInvalidQuery() { + checkNullOrEmptyQuery(); + } + + /** + * Accept (no check) an invalid query when a query is set.
+ * (no condition if a set query is invalid)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use ignoreNullOrEmptyQuery() + */ + @Deprecated + public void acceptInvalidQuery() { + getSqlClause().ignoreNullOrEmptyQuery(); + } + + /** + * Allow to auto-detect joins that can be inner-join.
+ *
+     * o You should call this before registrations of where clause.
+     * o Union and SubQuery and other sub condition-bean inherit this.
+     * o You should confirm your SQL on the log to be tuned by inner-join correctly.
+     * 
+ * @deprecated use enableInnerJoinAutoDetect() + */ + @Deprecated + public void allowInnerJoinAutoDetect() { + enableInnerJoinAutoDetect(); + } + + /** + * Suppress auto-detecting inner-join.
+ * You should call this before registrations of where clause. + * @deprecated use disableInnerJoinAutoDetect() + */ + @Deprecated + public void suppressInnerJoinAutoDetect() { + disableInnerJoinAutoDetect(); + } + + /** + * Allow an empty string for query.
+ * (you can use an empty string as condition)
+ * You should call this before registrations of where clause and other queries.
+ * Union and SubQuery and other sub condition-bean inherit this. + * @deprecated use enableEmptyStringQuery() + */ + @Deprecated + public void allowEmptyStringQuery() { + enableEmptyStringQuery(); + } + + /** + * Enable checking record count before QueryUpdate (contains QueryDelete). (default is disabled)
+ * No query update if zero count. (basically for MySQL's deadlock by next-key lock) + * @deprecated use enableQueryUpdateCountPreCheck() + */ + @Deprecated + public void enableCheckCountBeforeQueryUpdate() { + enableQueryUpdateCountPreCheck(); + } + + /** + * Disable checking record count before QueryUpdate (contains QueryDelete). (back to default)
+ * Executes query update even if zero count. (normal specification) + * @deprecated use disableQueryUpdateCountPreCheck() + */ + @Deprecated + public void disableCheckCountBeforeQueryUpdate() { + disableQueryUpdateCountPreCheck(); + } + + /** + * Allow "that's bad timing" check. + * @deprecated use enableThatsBadTiming() + */ + @Deprecated + public void allowThatsBadTiming() { + enableThatsBadTiming(); + } + + /** + * Suppress "that's bad timing" check. + * @deprecated use disableThatsBadTiming() + */ + @Deprecated + public void suppressThatsBadTiming() { + disableThatsBadTiming(); + } + // =================================================================================== // DisplaySQL // ========== diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/BoostDocumentRuleCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/BoostDocumentRuleCQ.java new file mode 100644 index 000000000..33e08d9b3 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/cq/BoostDocumentRuleCQ.java @@ -0,0 +1,55 @@ +/* + * 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.cbean.cq; + +import jp.sf.fess.db.cbean.cq.bs.BsBoostDocumentRuleCQ; + +import org.seasar.dbflute.cbean.ConditionQuery; +import org.seasar.dbflute.cbean.sqlclause.SqlClause; + +/** + * The condition-query of BOOST_DOCUMENT_RULE. + *

+ * You can implement your original methods here. + * This class remains when re-generating. + *

+ * @author DBFlute(AutoGenerator) + */ +public class BoostDocumentRuleCQ extends BsBoostDocumentRuleCQ { + + // =================================================================================== + // Constructor + // =========== + // You should NOT touch with this constructor. + /** + * Auto-generated constructor to create query instance, basically called in DBFlute. + * @param referrerQuery The instance of referrer query. (NullAllowed: if null, this is base query) + * @param sqlClause The instance of SQL clause. (NotNull) + * @param aliasName The alias name for this query. (NotNull) + * @param nestLevel The nest level of this query. (if zero, this is base query) + */ + public BoostDocumentRuleCQ(final ConditionQuery referrerQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel) { + super(referrerQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Arrange Query + // ============= + // You can make your arranged query methods here. e.g. public void arrangeXxx() +} diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/SuggestBadWordCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/SuggestBadWordCQ.java new file mode 100644 index 000000000..c34f8baeb --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/cq/SuggestBadWordCQ.java @@ -0,0 +1,55 @@ +/* + * 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.cbean.cq; + +import jp.sf.fess.db.cbean.cq.bs.BsSuggestBadWordCQ; + +import org.seasar.dbflute.cbean.ConditionQuery; +import org.seasar.dbflute.cbean.sqlclause.SqlClause; + +/** + * The condition-query of SUGGEST_BAD_WORD. + *

+ * You can implement your original methods here. + * This class remains when re-generating. + *

+ * @author DBFlute(AutoGenerator) + */ +public class SuggestBadWordCQ extends BsSuggestBadWordCQ { + + // =================================================================================== + // Constructor + // =========== + // You should NOT touch with this constructor. + /** + * Auto-generated constructor to create query instance, basically called in DBFlute. + * @param referrerQuery The instance of referrer query. (NullAllowed: if null, this is base query) + * @param sqlClause The instance of SQL clause. (NotNull) + * @param aliasName The alias name for this query. (NotNull) + * @param nestLevel The nest level of this query. (if zero, this is base query) + */ + public SuggestBadWordCQ(final ConditionQuery referrerQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel) { + super(referrerQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Arrange Query + // ============= + // You can make your arranged query methods here. e.g. public void arrangeXxx() +} diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/SuggestElevateWordCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/SuggestElevateWordCQ.java new file mode 100644 index 000000000..d911db1af --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/cq/SuggestElevateWordCQ.java @@ -0,0 +1,55 @@ +/* + * 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.cbean.cq; + +import jp.sf.fess.db.cbean.cq.bs.BsSuggestElevateWordCQ; + +import org.seasar.dbflute.cbean.ConditionQuery; +import org.seasar.dbflute.cbean.sqlclause.SqlClause; + +/** + * The condition-query of SUGGEST_ELEVATE_WORD. + *

+ * You can implement your original methods here. + * This class remains when re-generating. + *

+ * @author DBFlute(AutoGenerator) + */ +public class SuggestElevateWordCQ extends BsSuggestElevateWordCQ { + + // =================================================================================== + // Constructor + // =========== + // You should NOT touch with this constructor. + /** + * Auto-generated constructor to create query instance, basically called in DBFlute. + * @param referrerQuery The instance of referrer query. (NullAllowed: if null, this is base query) + * @param sqlClause The instance of SQL clause. (NotNull) + * @param aliasName The alias name for this query. (NotNull) + * @param nestLevel The nest level of this query. (if zero, this is base query) + */ + public SuggestElevateWordCQ(final ConditionQuery referrerQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel) { + super(referrerQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Arrange Query + // ============= + // You can make your arranged query methods here. e.g. public void arrangeXxx() +} diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsBoostDocumentRuleCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsBoostDocumentRuleCQ.java new file mode 100644 index 000000000..935ddaf30 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsBoostDocumentRuleCQ.java @@ -0,0 +1,1731 @@ +/* + * 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.cbean.cq.bs; + +import java.util.Collection; +import java.util.Date; +import java.util.List; + +import jp.sf.fess.db.allcommon.DBMetaInstanceHandler; +import jp.sf.fess.db.cbean.BoostDocumentRuleCB; +import jp.sf.fess.db.cbean.cq.BoostDocumentRuleCQ; + +import org.seasar.dbflute.cbean.AbstractConditionQuery; +import org.seasar.dbflute.cbean.ConditionBean; +import org.seasar.dbflute.cbean.ConditionQuery; +import org.seasar.dbflute.cbean.ManualOrderBean; +import org.seasar.dbflute.cbean.SubQuery; +import org.seasar.dbflute.cbean.chelper.HpQDRFunction; +import org.seasar.dbflute.cbean.chelper.HpSSQFunction; +import org.seasar.dbflute.cbean.chelper.HpSSQOption; +import org.seasar.dbflute.cbean.chelper.HpSSQSetupper; +import org.seasar.dbflute.cbean.ckey.ConditionKey; +import org.seasar.dbflute.cbean.coption.DerivedReferrerOption; +import org.seasar.dbflute.cbean.coption.FromToOption; +import org.seasar.dbflute.cbean.coption.LikeSearchOption; +import org.seasar.dbflute.cbean.coption.RangeOfOption; +import org.seasar.dbflute.cbean.cvalue.ConditionValue; +import org.seasar.dbflute.cbean.sqlclause.SqlClause; +import org.seasar.dbflute.dbmeta.DBMetaProvider; + +/** + * The abstract condition-query of BOOST_DOCUMENT_RULE. + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsBoostDocumentRuleCQ extends + AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + public AbstractBsBoostDocumentRuleCQ(final ConditionQuery referrerQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel) { + super(referrerQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // DBMeta Provider + // =============== + @Override + protected DBMetaProvider xgetDBMetaProvider() { + return DBMetaInstanceHandler.getProvider(); + } + + // =================================================================================== + // Table Name + // ========== + @Override + public String getTableDbName() { + return "BOOST_DOCUMENT_RULE"; + } + + // =================================================================================== + // Query + // ===== + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as equal. (NullAllowed: if null, no condition) + */ + public void setId_Equal(final Long id) { + doSetId_Equal(id); + } + + protected void doSetId_Equal(final Long id) { + regId(CK_EQ, id); + } + + /** + * NotEqual(<>). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as notEqual. (NullAllowed: if null, no condition) + */ + public void setId_NotEqual(final Long id) { + doSetId_NotEqual(id); + } + + protected void doSetId_NotEqual(final Long id) { + regId(CK_NES, id); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as greaterThan. (NullAllowed: if null, no condition) + */ + public void setId_GreaterThan(final Long id) { + regId(CK_GT, id); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as lessThan. (NullAllowed: if null, no condition) + */ + public void setId_LessThan(final Long id) { + regId(CK_LT, id); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setId_GreaterEqual(final Long id) { + regId(CK_GE, id); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as lessEqual. (NullAllowed: if null, no condition) + */ + public void setId_LessEqual(final Long id) { + regId(CK_LE, id); + } + + /** + * RangeOf with various options. (versatile)
+ * {(default) minNumber <= column <= maxNumber}
+ * And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param minNumber The min number of id. (NullAllowed: if null, no from-condition) + * @param maxNumber The max number of id. (NullAllowed: if null, no to-condition) + * @param rangeOfOption The option of range-of. (NotNull) + */ + public void setId_RangeOf(final Long minNumber, final Long maxNumber, + final RangeOfOption rangeOfOption) { + regROO(minNumber, maxNumber, getCValueId(), "ID", rangeOfOption); + } + + /** + * InScope {in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param idList The collection of id as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setId_InScope(final Collection idList) { + doSetId_InScope(idList); + } + + protected void doSetId_InScope(final Collection idList) { + regINS(CK_INS, cTL(idList), getCValueId(), "ID"); + } + + /** + * NotInScope {not in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param idList The collection of id as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setId_NotInScope(final Collection idList) { + doSetId_NotInScope(idList); + } + + protected void doSetId_NotInScope(final Collection idList) { + regINS(CK_NINS, cTL(idList), getCValueId(), "ID"); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + */ + public void setId_IsNull() { + regId(CK_ISN, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + */ + public void setId_IsNotNull() { + regId(CK_ISNN, DOBJ); + } + + protected void regId(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueId(), "ID"); + } + + protected abstract ConditionValue getCValueId(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * URL_EXPR: {NotNull, VARCHAR(4000)} + * @param urlExpr The value of urlExpr as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setUrlExpr_Equal(final String urlExpr) { + doSetUrlExpr_Equal(fRES(urlExpr)); + } + + protected void doSetUrlExpr_Equal(final String urlExpr) { + regUrlExpr(CK_EQ, urlExpr); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * URL_EXPR: {NotNull, VARCHAR(4000)} + * @param urlExpr The value of urlExpr as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setUrlExpr_NotEqual(final String urlExpr) { + doSetUrlExpr_NotEqual(fRES(urlExpr)); + } + + protected void doSetUrlExpr_NotEqual(final String urlExpr) { + regUrlExpr(CK_NES, urlExpr); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * URL_EXPR: {NotNull, VARCHAR(4000)} + * @param urlExpr The value of urlExpr as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setUrlExpr_GreaterThan(final String urlExpr) { + regUrlExpr(CK_GT, fRES(urlExpr)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * URL_EXPR: {NotNull, VARCHAR(4000)} + * @param urlExpr The value of urlExpr as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setUrlExpr_LessThan(final String urlExpr) { + regUrlExpr(CK_LT, fRES(urlExpr)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * URL_EXPR: {NotNull, VARCHAR(4000)} + * @param urlExpr The value of urlExpr as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setUrlExpr_GreaterEqual(final String urlExpr) { + regUrlExpr(CK_GE, fRES(urlExpr)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * URL_EXPR: {NotNull, VARCHAR(4000)} + * @param urlExpr The value of urlExpr as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setUrlExpr_LessEqual(final String urlExpr) { + regUrlExpr(CK_LE, fRES(urlExpr)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * URL_EXPR: {NotNull, VARCHAR(4000)} + * @param urlExprList The collection of urlExpr as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setUrlExpr_InScope(final Collection urlExprList) { + doSetUrlExpr_InScope(urlExprList); + } + + public void doSetUrlExpr_InScope(final Collection urlExprList) { + regINS(CK_INS, cTL(urlExprList), getCValueUrlExpr(), "URL_EXPR"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * URL_EXPR: {NotNull, VARCHAR(4000)} + * @param urlExprList The collection of urlExpr as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setUrlExpr_NotInScope(final Collection urlExprList) { + doSetUrlExpr_NotInScope(urlExprList); + } + + public void doSetUrlExpr_NotInScope(final Collection urlExprList) { + regINS(CK_NINS, cTL(urlExprList), getCValueUrlExpr(), "URL_EXPR"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * URL_EXPR: {NotNull, VARCHAR(4000)} + * @param urlExpr The value of urlExpr as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setUrlExpr_PrefixSearch(final String urlExpr) { + setUrlExpr_LikeSearch(urlExpr, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * URL_EXPR: {NotNull, VARCHAR(4000)}
+ *
e.g. setUrlExpr_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param urlExpr The value of urlExpr as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setUrlExpr_LikeSearch(final String urlExpr, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(urlExpr), getCValueUrlExpr(), "URL_EXPR", + likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * URL_EXPR: {NotNull, VARCHAR(4000)} + * @param urlExpr The value of urlExpr as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setUrlExpr_NotLikeSearch(final String urlExpr, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(urlExpr), getCValueUrlExpr(), "URL_EXPR", + likeSearchOption); + } + + protected void regUrlExpr(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueUrlExpr(), "URL_EXPR"); + } + + protected abstract ConditionValue getCValueUrlExpr(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * BOOST_EXPR: {NotNull, VARCHAR(4000)} + * @param boostExpr The value of boostExpr as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setBoostExpr_Equal(final String boostExpr) { + doSetBoostExpr_Equal(fRES(boostExpr)); + } + + protected void doSetBoostExpr_Equal(final String boostExpr) { + regBoostExpr(CK_EQ, boostExpr); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * BOOST_EXPR: {NotNull, VARCHAR(4000)} + * @param boostExpr The value of boostExpr as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setBoostExpr_NotEqual(final String boostExpr) { + doSetBoostExpr_NotEqual(fRES(boostExpr)); + } + + protected void doSetBoostExpr_NotEqual(final String boostExpr) { + regBoostExpr(CK_NES, boostExpr); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * BOOST_EXPR: {NotNull, VARCHAR(4000)} + * @param boostExpr The value of boostExpr as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setBoostExpr_GreaterThan(final String boostExpr) { + regBoostExpr(CK_GT, fRES(boostExpr)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * BOOST_EXPR: {NotNull, VARCHAR(4000)} + * @param boostExpr The value of boostExpr as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setBoostExpr_LessThan(final String boostExpr) { + regBoostExpr(CK_LT, fRES(boostExpr)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * BOOST_EXPR: {NotNull, VARCHAR(4000)} + * @param boostExpr The value of boostExpr as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setBoostExpr_GreaterEqual(final String boostExpr) { + regBoostExpr(CK_GE, fRES(boostExpr)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * BOOST_EXPR: {NotNull, VARCHAR(4000)} + * @param boostExpr The value of boostExpr as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setBoostExpr_LessEqual(final String boostExpr) { + regBoostExpr(CK_LE, fRES(boostExpr)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * BOOST_EXPR: {NotNull, VARCHAR(4000)} + * @param boostExprList The collection of boostExpr as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setBoostExpr_InScope(final Collection boostExprList) { + doSetBoostExpr_InScope(boostExprList); + } + + public void doSetBoostExpr_InScope(final Collection boostExprList) { + regINS(CK_INS, cTL(boostExprList), getCValueBoostExpr(), "BOOST_EXPR"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * BOOST_EXPR: {NotNull, VARCHAR(4000)} + * @param boostExprList The collection of boostExpr as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setBoostExpr_NotInScope(final Collection boostExprList) { + doSetBoostExpr_NotInScope(boostExprList); + } + + public void doSetBoostExpr_NotInScope(final Collection boostExprList) { + regINS(CK_NINS, cTL(boostExprList), getCValueBoostExpr(), "BOOST_EXPR"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * BOOST_EXPR: {NotNull, VARCHAR(4000)} + * @param boostExpr The value of boostExpr as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setBoostExpr_PrefixSearch(final String boostExpr) { + setBoostExpr_LikeSearch(boostExpr, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * BOOST_EXPR: {NotNull, VARCHAR(4000)}
+ *
e.g. setBoostExpr_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param boostExpr The value of boostExpr as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setBoostExpr_LikeSearch(final String boostExpr, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(boostExpr), getCValueBoostExpr(), "BOOST_EXPR", + likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * BOOST_EXPR: {NotNull, VARCHAR(4000)} + * @param boostExpr The value of boostExpr as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setBoostExpr_NotLikeSearch(final String boostExpr, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(boostExpr), getCValueBoostExpr(), "BOOST_EXPR", + likeSearchOption); + } + + protected void regBoostExpr(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueBoostExpr(), "BOOST_EXPR"); + } + + protected abstract ConditionValue getCValueBoostExpr(); + + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * SORT_ORDER: {NotNull, INTEGER(10)} + * @param sortOrder The value of sortOrder as equal. (NullAllowed: if null, no condition) + */ + public void setSortOrder_Equal(final Integer sortOrder) { + doSetSortOrder_Equal(sortOrder); + } + + protected void doSetSortOrder_Equal(final Integer sortOrder) { + regSortOrder(CK_EQ, sortOrder); + } + + /** + * NotEqual(<>). And NullIgnored, OnlyOnceRegistered.
+ * SORT_ORDER: {NotNull, INTEGER(10)} + * @param sortOrder The value of sortOrder as notEqual. (NullAllowed: if null, no condition) + */ + public void setSortOrder_NotEqual(final Integer sortOrder) { + doSetSortOrder_NotEqual(sortOrder); + } + + protected void doSetSortOrder_NotEqual(final Integer sortOrder) { + regSortOrder(CK_NES, sortOrder); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * SORT_ORDER: {NotNull, INTEGER(10)} + * @param sortOrder The value of sortOrder as greaterThan. (NullAllowed: if null, no condition) + */ + public void setSortOrder_GreaterThan(final Integer sortOrder) { + regSortOrder(CK_GT, sortOrder); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * SORT_ORDER: {NotNull, INTEGER(10)} + * @param sortOrder The value of sortOrder as lessThan. (NullAllowed: if null, no condition) + */ + public void setSortOrder_LessThan(final Integer sortOrder) { + regSortOrder(CK_LT, sortOrder); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * SORT_ORDER: {NotNull, INTEGER(10)} + * @param sortOrder The value of sortOrder as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setSortOrder_GreaterEqual(final Integer sortOrder) { + regSortOrder(CK_GE, sortOrder); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * SORT_ORDER: {NotNull, INTEGER(10)} + * @param sortOrder The value of sortOrder as lessEqual. (NullAllowed: if null, no condition) + */ + public void setSortOrder_LessEqual(final Integer sortOrder) { + regSortOrder(CK_LE, sortOrder); + } + + /** + * RangeOf with various options. (versatile)
+ * {(default) minNumber <= column <= maxNumber}
+ * And NullIgnored, OnlyOnceRegistered.
+ * SORT_ORDER: {NotNull, INTEGER(10)} + * @param minNumber The min number of sortOrder. (NullAllowed: if null, no from-condition) + * @param maxNumber The max number of sortOrder. (NullAllowed: if null, no to-condition) + * @param rangeOfOption The option of range-of. (NotNull) + */ + public void setSortOrder_RangeOf(final Integer minNumber, + final Integer maxNumber, final RangeOfOption rangeOfOption) { + regROO(minNumber, maxNumber, getCValueSortOrder(), "SORT_ORDER", + rangeOfOption); + } + + /** + * InScope {in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered.
+ * SORT_ORDER: {NotNull, INTEGER(10)} + * @param sortOrderList The collection of sortOrder as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setSortOrder_InScope(final Collection sortOrderList) { + doSetSortOrder_InScope(sortOrderList); + } + + protected void doSetSortOrder_InScope( + final Collection sortOrderList) { + regINS(CK_INS, cTL(sortOrderList), getCValueSortOrder(), "SORT_ORDER"); + } + + /** + * NotInScope {not in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered.
+ * SORT_ORDER: {NotNull, INTEGER(10)} + * @param sortOrderList The collection of sortOrder as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setSortOrder_NotInScope(final Collection sortOrderList) { + doSetSortOrder_NotInScope(sortOrderList); + } + + protected void doSetSortOrder_NotInScope( + final Collection sortOrderList) { + regINS(CK_NINS, cTL(sortOrderList), getCValueSortOrder(), "SORT_ORDER"); + } + + protected void regSortOrder(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueSortOrder(), "SORT_ORDER"); + } + + protected abstract ConditionValue getCValueSortOrder(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_Equal(final String createdBy) { + doSetCreatedBy_Equal(fRES(createdBy)); + } + + protected void doSetCreatedBy_Equal(final String createdBy) { + regCreatedBy(CK_EQ, createdBy); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_NotEqual(final String createdBy) { + doSetCreatedBy_NotEqual(fRES(createdBy)); + } + + protected void doSetCreatedBy_NotEqual(final String createdBy) { + regCreatedBy(CK_NES, createdBy); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_GreaterThan(final String createdBy) { + regCreatedBy(CK_GT, fRES(createdBy)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_LessThan(final String createdBy) { + regCreatedBy(CK_LT, fRES(createdBy)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_GreaterEqual(final String createdBy) { + regCreatedBy(CK_GE, fRES(createdBy)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_LessEqual(final String createdBy) { + regCreatedBy(CK_LE, fRES(createdBy)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdByList The collection of createdBy as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_InScope(final Collection createdByList) { + doSetCreatedBy_InScope(createdByList); + } + + public void doSetCreatedBy_InScope(final Collection createdByList) { + regINS(CK_INS, cTL(createdByList), getCValueCreatedBy(), "CREATED_BY"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdByList The collection of createdBy as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_NotInScope(final Collection createdByList) { + doSetCreatedBy_NotInScope(createdByList); + } + + public void doSetCreatedBy_NotInScope(final Collection createdByList) { + regINS(CK_NINS, cTL(createdByList), getCValueCreatedBy(), "CREATED_BY"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_PrefixSearch(final String createdBy) { + setCreatedBy_LikeSearch(createdBy, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)}
+ *
e.g. setCreatedBy_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param createdBy The value of createdBy as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setCreatedBy_LikeSearch(final String createdBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(createdBy), getCValueCreatedBy(), "CREATED_BY", + likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setCreatedBy_NotLikeSearch(final String createdBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(createdBy), getCValueCreatedBy(), "CREATED_BY", + likeSearchOption); + } + + protected void regCreatedBy(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueCreatedBy(), "CREATED_BY"); + } + + protected abstract ConditionValue getCValueCreatedBy(); + + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @param createdTime The value of createdTime as equal. (NullAllowed: if null, no condition) + */ + public void setCreatedTime_Equal(final java.sql.Timestamp createdTime) { + regCreatedTime(CK_EQ, createdTime); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @param createdTime The value of createdTime as greaterThan. (NullAllowed: if null, no condition) + */ + public void setCreatedTime_GreaterThan(final java.sql.Timestamp createdTime) { + regCreatedTime(CK_GT, createdTime); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @param createdTime The value of createdTime as lessThan. (NullAllowed: if null, no condition) + */ + public void setCreatedTime_LessThan(final java.sql.Timestamp createdTime) { + regCreatedTime(CK_LT, createdTime); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @param createdTime The value of createdTime as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setCreatedTime_GreaterEqual(final java.sql.Timestamp createdTime) { + regCreatedTime(CK_GE, createdTime); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @param createdTime The value of createdTime as lessEqual. (NullAllowed: if null, no condition) + */ + public void setCreatedTime_LessEqual(final java.sql.Timestamp createdTime) { + regCreatedTime(CK_LE, createdTime); + } + + /** + * FromTo with various options. (versatile) {(default) fromDatetime <= column <= toDatetime}
+ * And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + *
e.g. setCreatedTime_FromTo(fromDate, toDate, new FromToOption().compareAsDate());
+ * @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of createdTime. (NullAllowed: if null, no from-condition) + * @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of createdTime. (NullAllowed: if null, no to-condition) + * @param fromToOption The option of from-to. (NotNull) + */ + public void setCreatedTime_FromTo(final Date fromDatetime, + final Date toDatetime, final FromToOption fromToOption) { + regFTQ(fromDatetime != null ? new java.sql.Timestamp( + fromDatetime.getTime()) : null, + toDatetime != null ? new java.sql.Timestamp(toDatetime + .getTime()) : null, getCValueCreatedTime(), + "CREATED_TIME", fromToOption); + } + + /** + * DateFromTo. (Date means yyyy/MM/dd) {fromDate <= column < toDate + 1 day}
+ * And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + *
+     * e.g. from:{2007/04/10 08:24:53} to:{2007/04/16 14:36:29}
+     *  column >= '2007/04/10 00:00:00' and column < '2007/04/17 00:00:00'
+     * 
+ * @param fromDate The from-date(yyyy/MM/dd) of createdTime. (NullAllowed: if null, no from-condition) + * @param toDate The to-date(yyyy/MM/dd) of createdTime. (NullAllowed: if null, no to-condition) + */ + public void setCreatedTime_DateFromTo(final Date fromDate, final Date toDate) { + setCreatedTime_FromTo(fromDate, toDate, + new FromToOption().compareAsDate()); + } + + protected void regCreatedTime(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueCreatedTime(), "CREATED_TIME"); + } + + protected abstract ConditionValue getCValueCreatedTime(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_Equal(final String updatedBy) { + doSetUpdatedBy_Equal(fRES(updatedBy)); + } + + protected void doSetUpdatedBy_Equal(final String updatedBy) { + regUpdatedBy(CK_EQ, updatedBy); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_NotEqual(final String updatedBy) { + doSetUpdatedBy_NotEqual(fRES(updatedBy)); + } + + protected void doSetUpdatedBy_NotEqual(final String updatedBy) { + regUpdatedBy(CK_NES, updatedBy); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_GreaterThan(final String updatedBy) { + regUpdatedBy(CK_GT, fRES(updatedBy)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_LessThan(final String updatedBy) { + regUpdatedBy(CK_LT, fRES(updatedBy)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_GreaterEqual(final String updatedBy) { + regUpdatedBy(CK_GE, fRES(updatedBy)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_LessEqual(final String updatedBy) { + regUpdatedBy(CK_LE, fRES(updatedBy)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedByList The collection of updatedBy as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_InScope(final Collection updatedByList) { + doSetUpdatedBy_InScope(updatedByList); + } + + public void doSetUpdatedBy_InScope(final Collection updatedByList) { + regINS(CK_INS, cTL(updatedByList), getCValueUpdatedBy(), "UPDATED_BY"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedByList The collection of updatedBy as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_NotInScope(final Collection updatedByList) { + doSetUpdatedBy_NotInScope(updatedByList); + } + + public void doSetUpdatedBy_NotInScope(final Collection updatedByList) { + regINS(CK_NINS, cTL(updatedByList), getCValueUpdatedBy(), "UPDATED_BY"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_PrefixSearch(final String updatedBy) { + setUpdatedBy_LikeSearch(updatedBy, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * UPDATED_BY: {VARCHAR(255)}
+ *
e.g. setUpdatedBy_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param updatedBy The value of updatedBy as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setUpdatedBy_LikeSearch(final String updatedBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(updatedBy), getCValueUpdatedBy(), "UPDATED_BY", + likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setUpdatedBy_NotLikeSearch(final String updatedBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(updatedBy), getCValueUpdatedBy(), "UPDATED_BY", + likeSearchOption); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + */ + public void setUpdatedBy_IsNull() { + regUpdatedBy(CK_ISN, DOBJ); + } + + /** + * IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + */ + public void setUpdatedBy_IsNullOrEmpty() { + regUpdatedBy(CK_ISNOE, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + */ + public void setUpdatedBy_IsNotNull() { + regUpdatedBy(CK_ISNN, DOBJ); + } + + protected void regUpdatedBy(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueUpdatedBy(), "UPDATED_BY"); + } + + protected abstract ConditionValue getCValueUpdatedBy(); + + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @param updatedTime The value of updatedTime as equal. (NullAllowed: if null, no condition) + */ + public void setUpdatedTime_Equal(final java.sql.Timestamp updatedTime) { + regUpdatedTime(CK_EQ, updatedTime); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @param updatedTime The value of updatedTime as greaterThan. (NullAllowed: if null, no condition) + */ + public void setUpdatedTime_GreaterThan(final java.sql.Timestamp updatedTime) { + regUpdatedTime(CK_GT, updatedTime); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @param updatedTime The value of updatedTime as lessThan. (NullAllowed: if null, no condition) + */ + public void setUpdatedTime_LessThan(final java.sql.Timestamp updatedTime) { + regUpdatedTime(CK_LT, updatedTime); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @param updatedTime The value of updatedTime as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setUpdatedTime_GreaterEqual(final java.sql.Timestamp updatedTime) { + regUpdatedTime(CK_GE, updatedTime); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @param updatedTime The value of updatedTime as lessEqual. (NullAllowed: if null, no condition) + */ + public void setUpdatedTime_LessEqual(final java.sql.Timestamp updatedTime) { + regUpdatedTime(CK_LE, updatedTime); + } + + /** + * FromTo with various options. (versatile) {(default) fromDatetime <= column <= toDatetime}
+ * And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + *
e.g. setUpdatedTime_FromTo(fromDate, toDate, new FromToOption().compareAsDate());
+ * @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of updatedTime. (NullAllowed: if null, no from-condition) + * @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of updatedTime. (NullAllowed: if null, no to-condition) + * @param fromToOption The option of from-to. (NotNull) + */ + public void setUpdatedTime_FromTo(final Date fromDatetime, + final Date toDatetime, final FromToOption fromToOption) { + regFTQ(fromDatetime != null ? new java.sql.Timestamp( + fromDatetime.getTime()) : null, + toDatetime != null ? new java.sql.Timestamp(toDatetime + .getTime()) : null, getCValueUpdatedTime(), + "UPDATED_TIME", fromToOption); + } + + /** + * DateFromTo. (Date means yyyy/MM/dd) {fromDate <= column < toDate + 1 day}
+ * And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + *
+     * e.g. from:{2007/04/10 08:24:53} to:{2007/04/16 14:36:29}
+     *  column >= '2007/04/10 00:00:00' and column < '2007/04/17 00:00:00'
+     * 
+ * @param fromDate The from-date(yyyy/MM/dd) of updatedTime. (NullAllowed: if null, no from-condition) + * @param toDate The to-date(yyyy/MM/dd) of updatedTime. (NullAllowed: if null, no to-condition) + */ + public void setUpdatedTime_DateFromTo(final Date fromDate, final Date toDate) { + setUpdatedTime_FromTo(fromDate, toDate, + new FromToOption().compareAsDate()); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + */ + public void setUpdatedTime_IsNull() { + regUpdatedTime(CK_ISN, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + */ + public void setUpdatedTime_IsNotNull() { + regUpdatedTime(CK_ISNN, DOBJ); + } + + protected void regUpdatedTime(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueUpdatedTime(), "UPDATED_TIME"); + } + + protected abstract ConditionValue getCValueUpdatedTime(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_Equal(final String deletedBy) { + doSetDeletedBy_Equal(fRES(deletedBy)); + } + + protected void doSetDeletedBy_Equal(final String deletedBy) { + regDeletedBy(CK_EQ, deletedBy); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_NotEqual(final String deletedBy) { + doSetDeletedBy_NotEqual(fRES(deletedBy)); + } + + protected void doSetDeletedBy_NotEqual(final String deletedBy) { + regDeletedBy(CK_NES, deletedBy); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_GreaterThan(final String deletedBy) { + regDeletedBy(CK_GT, fRES(deletedBy)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_LessThan(final String deletedBy) { + regDeletedBy(CK_LT, fRES(deletedBy)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_GreaterEqual(final String deletedBy) { + regDeletedBy(CK_GE, fRES(deletedBy)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_LessEqual(final String deletedBy) { + regDeletedBy(CK_LE, fRES(deletedBy)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedByList The collection of deletedBy as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_InScope(final Collection deletedByList) { + doSetDeletedBy_InScope(deletedByList); + } + + public void doSetDeletedBy_InScope(final Collection deletedByList) { + regINS(CK_INS, cTL(deletedByList), getCValueDeletedBy(), "DELETED_BY"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedByList The collection of deletedBy as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_NotInScope(final Collection deletedByList) { + doSetDeletedBy_NotInScope(deletedByList); + } + + public void doSetDeletedBy_NotInScope(final Collection deletedByList) { + regINS(CK_NINS, cTL(deletedByList), getCValueDeletedBy(), "DELETED_BY"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_PrefixSearch(final String deletedBy) { + setDeletedBy_LikeSearch(deletedBy, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * DELETED_BY: {VARCHAR(255)}
+ *
e.g. setDeletedBy_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param deletedBy The value of deletedBy as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setDeletedBy_LikeSearch(final String deletedBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(deletedBy), getCValueDeletedBy(), "DELETED_BY", + likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setDeletedBy_NotLikeSearch(final String deletedBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(deletedBy), getCValueDeletedBy(), "DELETED_BY", + likeSearchOption); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + */ + public void setDeletedBy_IsNull() { + regDeletedBy(CK_ISN, DOBJ); + } + + /** + * IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + */ + public void setDeletedBy_IsNullOrEmpty() { + regDeletedBy(CK_ISNOE, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + */ + public void setDeletedBy_IsNotNull() { + regDeletedBy(CK_ISNN, DOBJ); + } + + protected void regDeletedBy(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueDeletedBy(), "DELETED_BY"); + } + + protected abstract ConditionValue getCValueDeletedBy(); + + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @param deletedTime The value of deletedTime as equal. (NullAllowed: if null, no condition) + */ + public void setDeletedTime_Equal(final java.sql.Timestamp deletedTime) { + regDeletedTime(CK_EQ, deletedTime); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @param deletedTime The value of deletedTime as greaterThan. (NullAllowed: if null, no condition) + */ + public void setDeletedTime_GreaterThan(final java.sql.Timestamp deletedTime) { + regDeletedTime(CK_GT, deletedTime); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @param deletedTime The value of deletedTime as lessThan. (NullAllowed: if null, no condition) + */ + public void setDeletedTime_LessThan(final java.sql.Timestamp deletedTime) { + regDeletedTime(CK_LT, deletedTime); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @param deletedTime The value of deletedTime as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setDeletedTime_GreaterEqual(final java.sql.Timestamp deletedTime) { + regDeletedTime(CK_GE, deletedTime); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @param deletedTime The value of deletedTime as lessEqual. (NullAllowed: if null, no condition) + */ + public void setDeletedTime_LessEqual(final java.sql.Timestamp deletedTime) { + regDeletedTime(CK_LE, deletedTime); + } + + /** + * FromTo with various options. (versatile) {(default) fromDatetime <= column <= toDatetime}
+ * And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + *
e.g. setDeletedTime_FromTo(fromDate, toDate, new FromToOption().compareAsDate());
+ * @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of deletedTime. (NullAllowed: if null, no from-condition) + * @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of deletedTime. (NullAllowed: if null, no to-condition) + * @param fromToOption The option of from-to. (NotNull) + */ + public void setDeletedTime_FromTo(final Date fromDatetime, + final Date toDatetime, final FromToOption fromToOption) { + regFTQ(fromDatetime != null ? new java.sql.Timestamp( + fromDatetime.getTime()) : null, + toDatetime != null ? new java.sql.Timestamp(toDatetime + .getTime()) : null, getCValueDeletedTime(), + "DELETED_TIME", fromToOption); + } + + /** + * DateFromTo. (Date means yyyy/MM/dd) {fromDate <= column < toDate + 1 day}
+ * And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + *
+     * e.g. from:{2007/04/10 08:24:53} to:{2007/04/16 14:36:29}
+     *  column >= '2007/04/10 00:00:00' and column < '2007/04/17 00:00:00'
+     * 
+ * @param fromDate The from-date(yyyy/MM/dd) of deletedTime. (NullAllowed: if null, no from-condition) + * @param toDate The to-date(yyyy/MM/dd) of deletedTime. (NullAllowed: if null, no to-condition) + */ + public void setDeletedTime_DateFromTo(final Date fromDate, final Date toDate) { + setDeletedTime_FromTo(fromDate, toDate, + new FromToOption().compareAsDate()); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + */ + public void setDeletedTime_IsNull() { + regDeletedTime(CK_ISN, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + */ + public void setDeletedTime_IsNotNull() { + regDeletedTime(CK_ISNN, DOBJ); + } + + protected void regDeletedTime(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueDeletedTime(), "DELETED_TIME"); + } + + protected abstract ConditionValue getCValueDeletedTime(); + + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as equal. (NullAllowed: if null, no condition) + */ + public void setVersionNo_Equal(final Integer versionNo) { + doSetVersionNo_Equal(versionNo); + } + + protected void doSetVersionNo_Equal(final Integer versionNo) { + regVersionNo(CK_EQ, versionNo); + } + + /** + * NotEqual(<>). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as notEqual. (NullAllowed: if null, no condition) + */ + public void setVersionNo_NotEqual(final Integer versionNo) { + doSetVersionNo_NotEqual(versionNo); + } + + protected void doSetVersionNo_NotEqual(final Integer versionNo) { + regVersionNo(CK_NES, versionNo); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as greaterThan. (NullAllowed: if null, no condition) + */ + public void setVersionNo_GreaterThan(final Integer versionNo) { + regVersionNo(CK_GT, versionNo); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as lessThan. (NullAllowed: if null, no condition) + */ + public void setVersionNo_LessThan(final Integer versionNo) { + regVersionNo(CK_LT, versionNo); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setVersionNo_GreaterEqual(final Integer versionNo) { + regVersionNo(CK_GE, versionNo); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as lessEqual. (NullAllowed: if null, no condition) + */ + public void setVersionNo_LessEqual(final Integer versionNo) { + regVersionNo(CK_LE, versionNo); + } + + /** + * RangeOf with various options. (versatile)
+ * {(default) minNumber <= column <= maxNumber}
+ * And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param minNumber The min number of versionNo. (NullAllowed: if null, no from-condition) + * @param maxNumber The max number of versionNo. (NullAllowed: if null, no to-condition) + * @param rangeOfOption The option of range-of. (NotNull) + */ + public void setVersionNo_RangeOf(final Integer minNumber, + final Integer maxNumber, final RangeOfOption rangeOfOption) { + regROO(minNumber, maxNumber, getCValueVersionNo(), "VERSION_NO", + rangeOfOption); + } + + /** + * InScope {in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNoList The collection of versionNo as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setVersionNo_InScope(final Collection versionNoList) { + doSetVersionNo_InScope(versionNoList); + } + + protected void doSetVersionNo_InScope( + final Collection versionNoList) { + regINS(CK_INS, cTL(versionNoList), getCValueVersionNo(), "VERSION_NO"); + } + + /** + * NotInScope {not in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNoList The collection of versionNo as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setVersionNo_NotInScope(final Collection versionNoList) { + doSetVersionNo_NotInScope(versionNoList); + } + + protected void doSetVersionNo_NotInScope( + final Collection versionNoList) { + regINS(CK_NINS, cTL(versionNoList), getCValueVersionNo(), "VERSION_NO"); + } + + protected void regVersionNo(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueVersionNo(), "VERSION_NO"); + } + + protected abstract ConditionValue getCValueVersionNo(); + + // =================================================================================== + // ScalarCondition + // =============== + /** + * Prepare ScalarCondition as equal.
+ * {where FOO = (select max(BAR) from ...) + *
+     * cb.query().scalar_Equal().max(new SubQuery<BoostDocumentRuleCB>() {
+     *     public void query(BoostDocumentRuleCB subCB) {
+     *         subCB.specify().setXxx... // derived column for function
+     *         subCB.query().setYyy...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_Equal() { + return xcreateSSQFunction(CK_EQ, BoostDocumentRuleCB.class); + } + + /** + * Prepare ScalarCondition as equal.
+ * {where FOO <> (select max(BAR) from ...) + *
+     * cb.query().scalar_NotEqual().max(new SubQuery<BoostDocumentRuleCB>() {
+     *     public void query(BoostDocumentRuleCB subCB) {
+     *         subCB.specify().setXxx... // derived column for function
+     *         subCB.query().setYyy...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_NotEqual() { + return xcreateSSQFunction(CK_NES, BoostDocumentRuleCB.class); + } + + /** + * Prepare ScalarCondition as greaterThan.
+ * {where FOO > (select max(BAR) from ...) + *
+     * cb.query().scalar_GreaterThan().max(new SubQuery<BoostDocumentRuleCB>() {
+     *     public void query(BoostDocumentRuleCB subCB) {
+     *         subCB.specify().setFoo... // derived column for function
+     *         subCB.query().setBar...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_GreaterThan() { + return xcreateSSQFunction(CK_GT, BoostDocumentRuleCB.class); + } + + /** + * Prepare ScalarCondition as lessThan.
+ * {where FOO < (select max(BAR) from ...) + *
+     * cb.query().scalar_LessThan().max(new SubQuery<BoostDocumentRuleCB>() {
+     *     public void query(BoostDocumentRuleCB subCB) {
+     *         subCB.specify().setFoo... // derived column for function
+     *         subCB.query().setBar...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_LessThan() { + return xcreateSSQFunction(CK_LT, BoostDocumentRuleCB.class); + } + + /** + * Prepare ScalarCondition as greaterEqual.
+ * {where FOO >= (select max(BAR) from ...) + *
+     * cb.query().scalar_GreaterEqual().max(new SubQuery<BoostDocumentRuleCB>() {
+     *     public void query(BoostDocumentRuleCB subCB) {
+     *         subCB.specify().setFoo... // derived column for function
+     *         subCB.query().setBar...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_GreaterEqual() { + return xcreateSSQFunction(CK_GE, BoostDocumentRuleCB.class); + } + + /** + * Prepare ScalarCondition as lessEqual.
+ * {where FOO <= (select max(BAR) from ...) + *
+     * cb.query().scalar_LessEqual().max(new SubQuery<BoostDocumentRuleCB>() {
+     *     public void query(BoostDocumentRuleCB subCB) {
+     *         subCB.specify().setFoo... // derived column for function
+     *         subCB.query().setBar...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_LessEqual() { + return xcreateSSQFunction(CK_LE, BoostDocumentRuleCB.class); + } + + @Override + @SuppressWarnings("unchecked") + protected void xscalarCondition(final String fn, + final SubQuery sq, final String rd, final HpSSQOption op) { + assertObjectNotNull("subQuery", sq); + final BoostDocumentRuleCB cb = xcreateScalarConditionCB(); + sq.query((CB) cb); + final String pp = keepScalarCondition(cb.query()); // for saving query-value + op.setPartitionByCBean((CB) xcreateScalarConditionPartitionByCB()); // for using partition-by + registerScalarCondition(fn, cb.query(), pp, rd, op); + } + + public abstract String keepScalarCondition(BoostDocumentRuleCQ sq); + + protected BoostDocumentRuleCB xcreateScalarConditionCB() { + final BoostDocumentRuleCB cb = newMyCB(); + cb.xsetupForScalarCondition(this); + return cb; + } + + protected BoostDocumentRuleCB xcreateScalarConditionPartitionByCB() { + final BoostDocumentRuleCB cb = newMyCB(); + cb.xsetupForScalarConditionPartitionBy(this); + return cb; + } + + // =================================================================================== + // MyselfDerived + // ============= + public void xsmyselfDerive(final String fn, + final SubQuery sq, final String al, + final DerivedReferrerOption op) { + assertObjectNotNull("subQuery", sq); + final BoostDocumentRuleCB cb = new BoostDocumentRuleCB(); + cb.xsetupForDerivedReferrer(this); + try { + lock(); + sq.query(cb); + } finally { + unlock(); + } + final String pp = keepSpecifyMyselfDerived(cb.query()); + final String pk = "ID"; + registerSpecifyMyselfDerived(fn, cb.query(), pk, pk, pp, + "myselfDerived", al, op); + } + + public abstract String keepSpecifyMyselfDerived(BoostDocumentRuleCQ sq); + + /** + * Prepare for (Query)MyselfDerived (correlated sub-query). + * @return The object to set up a function for myself table. (NotNull) + */ + public HpQDRFunction myselfDerived() { + return xcreateQDRFunctionMyselfDerived(BoostDocumentRuleCB.class); + } + + @Override + @SuppressWarnings("unchecked") + protected void xqderiveMyselfDerived( + final String fn, final SubQuery sq, final String rd, + final Object vl, final DerivedReferrerOption op) { + assertObjectNotNull("subQuery", sq); + final BoostDocumentRuleCB cb = new BoostDocumentRuleCB(); + cb.xsetupForDerivedReferrer(this); + sq.query((CB) cb); + final String pk = "ID"; + final String sqpp = keepQueryMyselfDerived(cb.query()); // for saving query-value. + final String prpp = keepQueryMyselfDerivedParameter(vl); + registerQueryMyselfDerived(fn, cb.query(), pk, pk, sqpp, + "myselfDerived", rd, vl, prpp, op); + } + + public abstract String keepQueryMyselfDerived(BoostDocumentRuleCQ sq); + + public abstract String keepQueryMyselfDerivedParameter(Object vl); + + // =================================================================================== + // MyselfExists + // ============ + /** + * Prepare for MyselfExists (correlated sub-query). + * @param subQuery The implementation of sub-query. (NotNull) + */ + public void myselfExists(final SubQuery subQuery) { + assertObjectNotNull("subQuery", subQuery); + final BoostDocumentRuleCB cb = new BoostDocumentRuleCB(); + cb.xsetupForMyselfExists(this); + try { + lock(); + subQuery.query(cb); + } finally { + unlock(); + } + final String pp = keepMyselfExists(cb.query()); + registerMyselfExists(cb.query(), pp); + } + + public abstract String keepMyselfExists(BoostDocumentRuleCQ sq); + + // =================================================================================== + // MyselfInScope + // ============= + /** + * Prepare for MyselfInScope (sub-query). + * @param subQuery The implementation of sub-query. (NotNull) + */ + public void myselfInScope(final SubQuery subQuery) { + assertObjectNotNull("subQuery", subQuery); + final BoostDocumentRuleCB cb = new BoostDocumentRuleCB(); + cb.xsetupForMyselfInScope(this); + try { + lock(); + subQuery.query(cb); + } finally { + unlock(); + } + final String pp = keepMyselfInScope(cb.query()); + registerMyselfInScope(cb.query(), pp); + } + + public abstract String keepMyselfInScope(BoostDocumentRuleCQ sq); + + // =================================================================================== + // Manual Order + // ============ + /** + * Order along manual ordering information. + *
+     * MemberCB cb = new MemberCB();
+     * ManualOrderBean mob = new ManualOrderBean();
+     * mob.when_GreaterEqual(priorityDate); // e.g. 2000/01/01
+     * cb.query().addOrderBy_Birthdate_Asc().withManualOrder(mob);
+     * // order by 
+     * //   case
+     * //     when BIRTHDATE >= '2000/01/01' then 0
+     * //     else 1
+     * //   end asc, ...
+     *
+     * MemberCB cb = new MemberCB();
+     * ManualOrderBean mob = new ManualOrderBean();
+     * mob.when_Equal(CDef.MemberStatus.Withdrawal);
+     * mob.when_Equal(CDef.MemberStatus.Formalized);
+     * mob.when_Equal(CDef.MemberStatus.Provisional);
+     * cb.query().addOrderBy_MemberStatusCode_Asc().withManualOrder(mob);
+     * // order by 
+     * //   case
+     * //     when MEMBER_STATUS_CODE = 'WDL' then 0
+     * //     when MEMBER_STATUS_CODE = 'FML' then 1
+     * //     when MEMBER_STATUS_CODE = 'PRV' then 2
+     * //     else 3
+     * //   end asc, ...
+     * 
+ *

This function with Union is unsupported!

+ *

The order values are bound (treated as bind parameter).

+ * @param mob The bean of manual order containing order values. (NotNull) + */ + public void withManualOrder(final ManualOrderBean mob) { // is user public! + xdoWithManualOrder(mob); + } + + // =================================================================================== + // Small Adjustment + // ================ + /** + * Order along the list of manual values. #beforejava8
+ * This function with Union is unsupported!
+ * The order values are bound (treated as bind parameter). + *
+     * MemberCB cb = new MemberCB();
+     * List<CDef.MemberStatus> orderValueList = new ArrayList<CDef.MemberStatus>();
+     * orderValueList.add(CDef.MemberStatus.Withdrawal);
+     * orderValueList.add(CDef.MemberStatus.Formalized);
+     * orderValueList.add(CDef.MemberStatus.Provisional);
+     * cb.query().addOrderBy_MemberStatusCode_Asc().withManualOrder(orderValueList);
+     * // order by 
+     * //   case
+     * //     when MEMBER_STATUS_CODE = 'WDL' then 0
+     * //     when MEMBER_STATUS_CODE = 'FML' then 1
+     * //     when MEMBER_STATUS_CODE = 'PRV' then 2
+     * //     else 3
+     * //   end asc, ...
+     * 
+ * @param orderValueList The list of order values for manual ordering. (NotNull) + */ + public void withManualOrder(final List orderValueList) { // is user public! + assertObjectNotNull("withManualOrder(orderValueList)", orderValueList); + final ManualOrderBean manualOrderBean = new ManualOrderBean(); + manualOrderBean.acceptOrderValueList(orderValueList); + withManualOrder(manualOrderBean); + } + + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + + // =================================================================================== + // Very Internal + // ============= + protected BoostDocumentRuleCB newMyCB() { + return new BoostDocumentRuleCB(); + } + + // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + + protected String xabCQ() { + return BoostDocumentRuleCQ.class.getName(); + } + + protected String xabLSO() { + return LikeSearchOption.class.getName(); + } + + protected String xabSSQS() { + return HpSSQSetupper.class.getName(); + } +} diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsClickLogCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsClickLogCQ.java index d909234f2..d126a9124 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsClickLogCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsClickLogCQ.java @@ -78,7 +78,6 @@ public abstract class AbstractBsClickLogCQ extends AbstractConditionQuery { // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -801,6 +800,9 @@ public abstract class AbstractBsClickLogCQ extends AbstractConditionQuery { public abstract String keepMyselfInScope(ClickLogCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -837,8 +839,8 @@ public abstract class AbstractBsClickLogCQ extends AbstractConditionQuery {
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -867,6 +869,11 @@ public abstract class AbstractBsClickLogCQ extends AbstractConditionQuery { withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -875,6 +882,10 @@ public abstract class AbstractBsClickLogCQ extends AbstractConditionQuery { } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return ClickLogCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsCrawlingSessionCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsCrawlingSessionCQ.java index 59b652595..69ca52871 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsCrawlingSessionCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsCrawlingSessionCQ.java @@ -80,7 +80,6 @@ public abstract class AbstractBsCrawlingSessionCQ extends // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -1095,6 +1094,9 @@ public abstract class AbstractBsCrawlingSessionCQ extends public abstract String keepMyselfInScope(CrawlingSessionCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -1131,8 +1133,8 @@ public abstract class AbstractBsCrawlingSessionCQ extends
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -1161,6 +1163,11 @@ public abstract class AbstractBsCrawlingSessionCQ extends withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -1169,6 +1176,10 @@ public abstract class AbstractBsCrawlingSessionCQ extends } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return CrawlingSessionCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsCrawlingSessionInfoCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsCrawlingSessionInfoCQ.java index 319bfd3a8..785fdd44b 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsCrawlingSessionInfoCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsCrawlingSessionInfoCQ.java @@ -79,7 +79,6 @@ public abstract class AbstractBsCrawlingSessionInfoCQ extends // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -938,6 +937,9 @@ public abstract class AbstractBsCrawlingSessionInfoCQ extends public abstract String keepMyselfInScope(CrawlingSessionInfoCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -974,8 +976,8 @@ public abstract class AbstractBsCrawlingSessionInfoCQ extends
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -1004,6 +1006,11 @@ public abstract class AbstractBsCrawlingSessionInfoCQ extends withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -1012,6 +1019,10 @@ public abstract class AbstractBsCrawlingSessionInfoCQ extends } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return CrawlingSessionInfoCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsDataConfigToLabelTypeMappingCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsDataConfigToLabelTypeMappingCQ.java index a6ce57ab0..8202ff968 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsDataConfigToLabelTypeMappingCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsDataConfigToLabelTypeMappingCQ.java @@ -17,6 +17,7 @@ package jp.sf.fess.db.cbean.cq.bs; import java.util.Collection; +import java.util.Date; import java.util.List; import jp.sf.fess.db.allcommon.DBMetaInstanceHandler; @@ -38,6 +39,7 @@ import org.seasar.dbflute.cbean.chelper.HpSSQOption; import org.seasar.dbflute.cbean.chelper.HpSSQSetupper; import org.seasar.dbflute.cbean.ckey.ConditionKey; import org.seasar.dbflute.cbean.coption.DerivedReferrerOption; +import org.seasar.dbflute.cbean.coption.FromToOption; import org.seasar.dbflute.cbean.coption.LikeSearchOption; import org.seasar.dbflute.cbean.coption.RangeOfOption; import org.seasar.dbflute.cbean.cvalue.ConditionValue; @@ -79,7 +81,6 @@ public abstract class AbstractBsDataConfigToLabelTypeMappingCQ extends // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -764,6 +765,9 @@ public abstract class AbstractBsDataConfigToLabelTypeMappingCQ extends public abstract String keepMyselfInScope(DataConfigToLabelTypeMappingCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -800,8 +804,8 @@ public abstract class AbstractBsDataConfigToLabelTypeMappingCQ extends
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -830,6 +834,11 @@ public abstract class AbstractBsDataConfigToLabelTypeMappingCQ extends withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -838,6 +847,10 @@ public abstract class AbstractBsDataConfigToLabelTypeMappingCQ extends } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return DataConfigToLabelTypeMappingCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsDataConfigToRoleTypeMappingCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsDataConfigToRoleTypeMappingCQ.java index 5bc8c02ad..90f9a9c49 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsDataConfigToRoleTypeMappingCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsDataConfigToRoleTypeMappingCQ.java @@ -17,6 +17,7 @@ package jp.sf.fess.db.cbean.cq.bs; import java.util.Collection; +import java.util.Date; import java.util.List; import jp.sf.fess.db.allcommon.DBMetaInstanceHandler; @@ -38,6 +39,7 @@ import org.seasar.dbflute.cbean.chelper.HpSSQOption; import org.seasar.dbflute.cbean.chelper.HpSSQSetupper; import org.seasar.dbflute.cbean.ckey.ConditionKey; import org.seasar.dbflute.cbean.coption.DerivedReferrerOption; +import org.seasar.dbflute.cbean.coption.FromToOption; import org.seasar.dbflute.cbean.coption.LikeSearchOption; import org.seasar.dbflute.cbean.coption.RangeOfOption; import org.seasar.dbflute.cbean.cvalue.ConditionValue; @@ -79,7 +81,6 @@ public abstract class AbstractBsDataConfigToRoleTypeMappingCQ extends // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -761,6 +762,9 @@ public abstract class AbstractBsDataConfigToRoleTypeMappingCQ extends public abstract String keepMyselfInScope(DataConfigToRoleTypeMappingCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -797,8 +801,8 @@ public abstract class AbstractBsDataConfigToRoleTypeMappingCQ extends
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -827,6 +831,11 @@ public abstract class AbstractBsDataConfigToRoleTypeMappingCQ extends withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -835,6 +844,10 @@ public abstract class AbstractBsDataConfigToRoleTypeMappingCQ extends } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return DataConfigToRoleTypeMappingCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsDataCrawlingConfigCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsDataCrawlingConfigCQ.java index 8e534a5af..dd3e7d482 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsDataCrawlingConfigCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsDataCrawlingConfigCQ.java @@ -82,7 +82,6 @@ public abstract class AbstractBsDataCrawlingConfigCQ extends // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -2593,6 +2592,9 @@ public abstract class AbstractBsDataCrawlingConfigCQ extends public abstract String keepMyselfInScope(DataCrawlingConfigCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -2629,8 +2631,8 @@ public abstract class AbstractBsDataCrawlingConfigCQ extends
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -2659,6 +2661,11 @@ public abstract class AbstractBsDataCrawlingConfigCQ extends withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -2667,6 +2674,10 @@ public abstract class AbstractBsDataCrawlingConfigCQ extends } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return DataCrawlingConfigCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFailureUrlCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFailureUrlCQ.java index 5ec4e9e2d..4cf749254 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFailureUrlCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFailureUrlCQ.java @@ -76,7 +76,6 @@ public abstract class AbstractBsFailureUrlCQ extends AbstractConditionQuery { // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -1351,6 +1350,9 @@ public abstract class AbstractBsFailureUrlCQ extends AbstractConditionQuery { public abstract String keepMyselfInScope(FailureUrlCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -1387,8 +1389,8 @@ public abstract class AbstractBsFailureUrlCQ extends AbstractConditionQuery {
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -1417,6 +1419,11 @@ public abstract class AbstractBsFailureUrlCQ extends AbstractConditionQuery { withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -1425,6 +1432,10 @@ public abstract class AbstractBsFailureUrlCQ extends AbstractConditionQuery { } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return FailureUrlCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFavoriteLogCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFavoriteLogCQ.java index b1222680b..eabf75a06 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFavoriteLogCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFavoriteLogCQ.java @@ -78,7 +78,6 @@ public abstract class AbstractBsFavoriteLogCQ extends AbstractConditionQuery { // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -796,6 +795,9 @@ public abstract class AbstractBsFavoriteLogCQ extends AbstractConditionQuery { public abstract String keepMyselfInScope(FavoriteLogCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -832,8 +834,8 @@ public abstract class AbstractBsFavoriteLogCQ extends AbstractConditionQuery {
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -862,6 +864,11 @@ public abstract class AbstractBsFavoriteLogCQ extends AbstractConditionQuery { withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -870,6 +877,10 @@ public abstract class AbstractBsFavoriteLogCQ extends AbstractConditionQuery { } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return FavoriteLogCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFileAuthenticationCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFileAuthenticationCQ.java index 63da73b19..fe22cab03 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFileAuthenticationCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFileAuthenticationCQ.java @@ -79,7 +79,6 @@ public abstract class AbstractBsFileAuthenticationCQ extends // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -2295,6 +2294,9 @@ public abstract class AbstractBsFileAuthenticationCQ extends public abstract String keepMyselfInScope(FileAuthenticationCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -2331,8 +2333,8 @@ public abstract class AbstractBsFileAuthenticationCQ extends
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -2361,6 +2363,11 @@ public abstract class AbstractBsFileAuthenticationCQ extends withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -2369,6 +2376,10 @@ public abstract class AbstractBsFileAuthenticationCQ extends } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return FileAuthenticationCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFileConfigToLabelTypeMappingCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFileConfigToLabelTypeMappingCQ.java index 152fc33ca..ac13de82d 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFileConfigToLabelTypeMappingCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFileConfigToLabelTypeMappingCQ.java @@ -17,6 +17,7 @@ package jp.sf.fess.db.cbean.cq.bs; import java.util.Collection; +import java.util.Date; import java.util.List; import jp.sf.fess.db.allcommon.DBMetaInstanceHandler; @@ -38,6 +39,7 @@ import org.seasar.dbflute.cbean.chelper.HpSSQOption; import org.seasar.dbflute.cbean.chelper.HpSSQSetupper; import org.seasar.dbflute.cbean.ckey.ConditionKey; import org.seasar.dbflute.cbean.coption.DerivedReferrerOption; +import org.seasar.dbflute.cbean.coption.FromToOption; import org.seasar.dbflute.cbean.coption.LikeSearchOption; import org.seasar.dbflute.cbean.coption.RangeOfOption; import org.seasar.dbflute.cbean.cvalue.ConditionValue; @@ -79,7 +81,6 @@ public abstract class AbstractBsFileConfigToLabelTypeMappingCQ extends // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -764,6 +765,9 @@ public abstract class AbstractBsFileConfigToLabelTypeMappingCQ extends public abstract String keepMyselfInScope(FileConfigToLabelTypeMappingCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -800,8 +804,8 @@ public abstract class AbstractBsFileConfigToLabelTypeMappingCQ extends
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -830,6 +834,11 @@ public abstract class AbstractBsFileConfigToLabelTypeMappingCQ extends withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -838,6 +847,10 @@ public abstract class AbstractBsFileConfigToLabelTypeMappingCQ extends } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return FileConfigToLabelTypeMappingCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFileConfigToRoleTypeMappingCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFileConfigToRoleTypeMappingCQ.java index 2424a62bb..39eebdf35 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFileConfigToRoleTypeMappingCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFileConfigToRoleTypeMappingCQ.java @@ -17,6 +17,7 @@ package jp.sf.fess.db.cbean.cq.bs; import java.util.Collection; +import java.util.Date; import java.util.List; import jp.sf.fess.db.allcommon.DBMetaInstanceHandler; @@ -38,6 +39,7 @@ import org.seasar.dbflute.cbean.chelper.HpSSQOption; import org.seasar.dbflute.cbean.chelper.HpSSQSetupper; import org.seasar.dbflute.cbean.ckey.ConditionKey; import org.seasar.dbflute.cbean.coption.DerivedReferrerOption; +import org.seasar.dbflute.cbean.coption.FromToOption; import org.seasar.dbflute.cbean.coption.LikeSearchOption; import org.seasar.dbflute.cbean.coption.RangeOfOption; import org.seasar.dbflute.cbean.cvalue.ConditionValue; @@ -79,7 +81,6 @@ public abstract class AbstractBsFileConfigToRoleTypeMappingCQ extends // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -761,6 +762,9 @@ public abstract class AbstractBsFileConfigToRoleTypeMappingCQ extends public abstract String keepMyselfInScope(FileConfigToRoleTypeMappingCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -797,8 +801,8 @@ public abstract class AbstractBsFileConfigToRoleTypeMappingCQ extends
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -827,6 +831,11 @@ public abstract class AbstractBsFileConfigToRoleTypeMappingCQ extends withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -835,6 +844,10 @@ public abstract class AbstractBsFileConfigToRoleTypeMappingCQ extends } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return FileConfigToRoleTypeMappingCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFileCrawlingConfigCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFileCrawlingConfigCQ.java index 3f03ea8c5..77b38adb9 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFileCrawlingConfigCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsFileCrawlingConfigCQ.java @@ -84,7 +84,6 @@ public abstract class AbstractBsFileCrawlingConfigCQ extends // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -3746,6 +3745,9 @@ public abstract class AbstractBsFileCrawlingConfigCQ extends public abstract String keepMyselfInScope(FileCrawlingConfigCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -3782,8 +3784,8 @@ public abstract class AbstractBsFileCrawlingConfigCQ extends
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -3812,6 +3814,11 @@ public abstract class AbstractBsFileCrawlingConfigCQ extends withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -3820,6 +3827,10 @@ public abstract class AbstractBsFileCrawlingConfigCQ extends } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return FileCrawlingConfigCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsJobLogCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsJobLogCQ.java index a1ad63b9a..5f98171d5 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsJobLogCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsJobLogCQ.java @@ -76,7 +76,6 @@ public abstract class AbstractBsJobLogCQ extends AbstractConditionQuery { // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -1447,6 +1446,9 @@ public abstract class AbstractBsJobLogCQ extends AbstractConditionQuery { public abstract String keepMyselfInScope(JobLogCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -1483,8 +1485,8 @@ public abstract class AbstractBsJobLogCQ extends AbstractConditionQuery {
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -1513,6 +1515,11 @@ public abstract class AbstractBsJobLogCQ extends AbstractConditionQuery { withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -1521,6 +1528,10 @@ public abstract class AbstractBsJobLogCQ extends AbstractConditionQuery { } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return JobLogCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsKeyMatchCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsKeyMatchCQ.java index 5e5de30e5..d68dfb65e 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsKeyMatchCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsKeyMatchCQ.java @@ -76,7 +76,6 @@ public abstract class AbstractBsKeyMatchCQ extends AbstractConditionQuery { // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -1737,6 +1736,9 @@ public abstract class AbstractBsKeyMatchCQ extends AbstractConditionQuery { public abstract String keepMyselfInScope(KeyMatchCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -1773,8 +1775,8 @@ public abstract class AbstractBsKeyMatchCQ extends AbstractConditionQuery {
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -1803,6 +1805,11 @@ public abstract class AbstractBsKeyMatchCQ extends AbstractConditionQuery { withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -1811,6 +1818,10 @@ public abstract class AbstractBsKeyMatchCQ extends AbstractConditionQuery { } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return KeyMatchCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsLabelTypeCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsLabelTypeCQ.java index 006bf4c43..8788f184a 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsLabelTypeCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsLabelTypeCQ.java @@ -85,7 +85,6 @@ public abstract class AbstractBsLabelTypeCQ extends AbstractConditionQuery { // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -2737,6 +2736,9 @@ public abstract class AbstractBsLabelTypeCQ extends AbstractConditionQuery { public abstract String keepMyselfInScope(LabelTypeCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -2773,8 +2775,8 @@ public abstract class AbstractBsLabelTypeCQ extends AbstractConditionQuery {
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -2803,6 +2805,11 @@ public abstract class AbstractBsLabelTypeCQ extends AbstractConditionQuery { withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -2811,6 +2818,10 @@ public abstract class AbstractBsLabelTypeCQ extends AbstractConditionQuery { } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return LabelTypeCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsLabelTypeToRoleTypeMappingCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsLabelTypeToRoleTypeMappingCQ.java index b3327146b..c7c7c86b5 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsLabelTypeToRoleTypeMappingCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsLabelTypeToRoleTypeMappingCQ.java @@ -17,6 +17,7 @@ package jp.sf.fess.db.cbean.cq.bs; import java.util.Collection; +import java.util.Date; import java.util.List; import jp.sf.fess.db.allcommon.DBMetaInstanceHandler; @@ -38,6 +39,7 @@ import org.seasar.dbflute.cbean.chelper.HpSSQOption; import org.seasar.dbflute.cbean.chelper.HpSSQSetupper; import org.seasar.dbflute.cbean.ckey.ConditionKey; import org.seasar.dbflute.cbean.coption.DerivedReferrerOption; +import org.seasar.dbflute.cbean.coption.FromToOption; import org.seasar.dbflute.cbean.coption.LikeSearchOption; import org.seasar.dbflute.cbean.coption.RangeOfOption; import org.seasar.dbflute.cbean.cvalue.ConditionValue; @@ -79,7 +81,6 @@ public abstract class AbstractBsLabelTypeToRoleTypeMappingCQ extends // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -757,6 +758,9 @@ public abstract class AbstractBsLabelTypeToRoleTypeMappingCQ extends public abstract String keepMyselfInScope(LabelTypeToRoleTypeMappingCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -793,8 +797,8 @@ public abstract class AbstractBsLabelTypeToRoleTypeMappingCQ extends
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -823,6 +827,11 @@ public abstract class AbstractBsLabelTypeToRoleTypeMappingCQ extends withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -831,6 +840,10 @@ public abstract class AbstractBsLabelTypeToRoleTypeMappingCQ extends } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return LabelTypeToRoleTypeMappingCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsOverlappingHostCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsOverlappingHostCQ.java index 1e561eb79..61c43b5e0 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsOverlappingHostCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsOverlappingHostCQ.java @@ -77,7 +77,6 @@ public abstract class AbstractBsOverlappingHostCQ extends // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -1643,6 +1642,9 @@ public abstract class AbstractBsOverlappingHostCQ extends public abstract String keepMyselfInScope(OverlappingHostCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -1679,8 +1681,8 @@ public abstract class AbstractBsOverlappingHostCQ extends
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -1709,6 +1711,11 @@ public abstract class AbstractBsOverlappingHostCQ extends withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -1717,6 +1724,10 @@ public abstract class AbstractBsOverlappingHostCQ extends } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return OverlappingHostCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsPathMappingCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsPathMappingCQ.java index 380ef13f3..b5264c7b0 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsPathMappingCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsPathMappingCQ.java @@ -77,7 +77,6 @@ public abstract class AbstractBsPathMappingCQ extends AbstractConditionQuery { // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -1789,6 +1788,9 @@ public abstract class AbstractBsPathMappingCQ extends AbstractConditionQuery { public abstract String keepMyselfInScope(PathMappingCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -1825,8 +1827,8 @@ public abstract class AbstractBsPathMappingCQ extends AbstractConditionQuery {
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -1855,6 +1857,11 @@ public abstract class AbstractBsPathMappingCQ extends AbstractConditionQuery { withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -1863,6 +1870,10 @@ public abstract class AbstractBsPathMappingCQ extends AbstractConditionQuery { } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return PathMappingCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsRequestHeaderCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsRequestHeaderCQ.java index 34c9a340c..ab3beb445 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsRequestHeaderCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsRequestHeaderCQ.java @@ -78,7 +78,6 @@ public abstract class AbstractBsRequestHeaderCQ extends AbstractConditionQuery { // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -1688,6 +1687,9 @@ public abstract class AbstractBsRequestHeaderCQ extends AbstractConditionQuery { public abstract String keepMyselfInScope(RequestHeaderCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -1724,8 +1726,8 @@ public abstract class AbstractBsRequestHeaderCQ extends AbstractConditionQuery {
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -1754,6 +1756,11 @@ public abstract class AbstractBsRequestHeaderCQ extends AbstractConditionQuery { withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -1762,6 +1769,10 @@ public abstract class AbstractBsRequestHeaderCQ extends AbstractConditionQuery { } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return RequestHeaderCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsRoleTypeCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsRoleTypeCQ.java index 6451abb52..a295ca5cf 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsRoleTypeCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsRoleTypeCQ.java @@ -85,7 +85,6 @@ public abstract class AbstractBsRoleTypeCQ extends AbstractConditionQuery { // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -2419,6 +2418,9 @@ public abstract class AbstractBsRoleTypeCQ extends AbstractConditionQuery { public abstract String keepMyselfInScope(RoleTypeCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -2455,8 +2457,8 @@ public abstract class AbstractBsRoleTypeCQ extends AbstractConditionQuery {
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -2485,6 +2487,11 @@ public abstract class AbstractBsRoleTypeCQ extends AbstractConditionQuery { withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -2493,6 +2500,10 @@ public abstract class AbstractBsRoleTypeCQ extends AbstractConditionQuery { } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return RoleTypeCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsScheduledJobCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsScheduledJobCQ.java index 78e3690c6..8d0bcbe69 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsScheduledJobCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsScheduledJobCQ.java @@ -76,7 +76,6 @@ public abstract class AbstractBsScheduledJobCQ extends AbstractConditionQuery { // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -2442,6 +2441,9 @@ public abstract class AbstractBsScheduledJobCQ extends AbstractConditionQuery { public abstract String keepMyselfInScope(ScheduledJobCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -2478,8 +2480,8 @@ public abstract class AbstractBsScheduledJobCQ extends AbstractConditionQuery {
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -2508,6 +2510,11 @@ public abstract class AbstractBsScheduledJobCQ extends AbstractConditionQuery { withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -2516,6 +2523,10 @@ public abstract class AbstractBsScheduledJobCQ extends AbstractConditionQuery { } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return ScheduledJobCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsSearchFieldLogCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsSearchFieldLogCQ.java index 742cca59e..6c2bbc5eb 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsSearchFieldLogCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsSearchFieldLogCQ.java @@ -17,6 +17,7 @@ package jp.sf.fess.db.cbean.cq.bs; import java.util.Collection; +import java.util.Date; import java.util.List; import jp.sf.fess.db.allcommon.DBMetaInstanceHandler; @@ -36,6 +37,7 @@ import org.seasar.dbflute.cbean.chelper.HpSSQOption; import org.seasar.dbflute.cbean.chelper.HpSSQSetupper; import org.seasar.dbflute.cbean.ckey.ConditionKey; import org.seasar.dbflute.cbean.coption.DerivedReferrerOption; +import org.seasar.dbflute.cbean.coption.FromToOption; import org.seasar.dbflute.cbean.coption.LikeSearchOption; import org.seasar.dbflute.cbean.coption.RangeOfOption; import org.seasar.dbflute.cbean.cvalue.ConditionValue; @@ -76,7 +78,6 @@ public abstract class AbstractBsSearchFieldLogCQ extends AbstractConditionQuery // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -838,6 +839,9 @@ public abstract class AbstractBsSearchFieldLogCQ extends AbstractConditionQuery public abstract String keepMyselfInScope(SearchFieldLogCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -874,8 +878,8 @@ public abstract class AbstractBsSearchFieldLogCQ extends AbstractConditionQuery
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -904,6 +908,11 @@ public abstract class AbstractBsSearchFieldLogCQ extends AbstractConditionQuery withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -912,6 +921,10 @@ public abstract class AbstractBsSearchFieldLogCQ extends AbstractConditionQuery } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return SearchFieldLogCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsSearchLogCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsSearchLogCQ.java index b98187d5f..28d1ef226 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsSearchLogCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsSearchLogCQ.java @@ -84,7 +84,6 @@ public abstract class AbstractBsSearchLogCQ extends AbstractConditionQuery { // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -2460,6 +2459,9 @@ public abstract class AbstractBsSearchLogCQ extends AbstractConditionQuery { public abstract String keepMyselfInScope(SearchLogCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -2496,8 +2498,8 @@ public abstract class AbstractBsSearchLogCQ extends AbstractConditionQuery {
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -2526,6 +2528,11 @@ public abstract class AbstractBsSearchLogCQ extends AbstractConditionQuery { withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -2534,6 +2541,10 @@ public abstract class AbstractBsSearchLogCQ extends AbstractConditionQuery { } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return SearchLogCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsSuggestBadWordCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsSuggestBadWordCQ.java new file mode 100644 index 000000000..8576f1a25 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsSuggestBadWordCQ.java @@ -0,0 +1,1809 @@ +/* + * 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.cbean.cq.bs; + +import java.util.Collection; +import java.util.Date; +import java.util.List; + +import jp.sf.fess.db.allcommon.DBMetaInstanceHandler; +import jp.sf.fess.db.cbean.SuggestBadWordCB; +import jp.sf.fess.db.cbean.cq.SuggestBadWordCQ; + +import org.seasar.dbflute.cbean.AbstractConditionQuery; +import org.seasar.dbflute.cbean.ConditionBean; +import org.seasar.dbflute.cbean.ConditionQuery; +import org.seasar.dbflute.cbean.ManualOrderBean; +import org.seasar.dbflute.cbean.SubQuery; +import org.seasar.dbflute.cbean.chelper.HpQDRFunction; +import org.seasar.dbflute.cbean.chelper.HpSSQFunction; +import org.seasar.dbflute.cbean.chelper.HpSSQOption; +import org.seasar.dbflute.cbean.chelper.HpSSQSetupper; +import org.seasar.dbflute.cbean.ckey.ConditionKey; +import org.seasar.dbflute.cbean.coption.DerivedReferrerOption; +import org.seasar.dbflute.cbean.coption.FromToOption; +import org.seasar.dbflute.cbean.coption.LikeSearchOption; +import org.seasar.dbflute.cbean.coption.RangeOfOption; +import org.seasar.dbflute.cbean.cvalue.ConditionValue; +import org.seasar.dbflute.cbean.sqlclause.SqlClause; +import org.seasar.dbflute.dbmeta.DBMetaProvider; + +/** + * The abstract condition-query of SUGGEST_BAD_WORD. + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsSuggestBadWordCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + public AbstractBsSuggestBadWordCQ(final ConditionQuery referrerQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel) { + super(referrerQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // DBMeta Provider + // =============== + @Override + protected DBMetaProvider xgetDBMetaProvider() { + return DBMetaInstanceHandler.getProvider(); + } + + // =================================================================================== + // Table Name + // ========== + @Override + public String getTableDbName() { + return "SUGGEST_BAD_WORD"; + } + + // =================================================================================== + // Query + // ===== + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as equal. (NullAllowed: if null, no condition) + */ + public void setId_Equal(final Long id) { + doSetId_Equal(id); + } + + protected void doSetId_Equal(final Long id) { + regId(CK_EQ, id); + } + + /** + * NotEqual(<>). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as notEqual. (NullAllowed: if null, no condition) + */ + public void setId_NotEqual(final Long id) { + doSetId_NotEqual(id); + } + + protected void doSetId_NotEqual(final Long id) { + regId(CK_NES, id); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as greaterThan. (NullAllowed: if null, no condition) + */ + public void setId_GreaterThan(final Long id) { + regId(CK_GT, id); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as lessThan. (NullAllowed: if null, no condition) + */ + public void setId_LessThan(final Long id) { + regId(CK_LT, id); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setId_GreaterEqual(final Long id) { + regId(CK_GE, id); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as lessEqual. (NullAllowed: if null, no condition) + */ + public void setId_LessEqual(final Long id) { + regId(CK_LE, id); + } + + /** + * RangeOf with various options. (versatile)
+ * {(default) minNumber <= column <= maxNumber}
+ * And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param minNumber The min number of id. (NullAllowed: if null, no from-condition) + * @param maxNumber The max number of id. (NullAllowed: if null, no to-condition) + * @param rangeOfOption The option of range-of. (NotNull) + */ + public void setId_RangeOf(final Long minNumber, final Long maxNumber, + final RangeOfOption rangeOfOption) { + regROO(minNumber, maxNumber, getCValueId(), "ID", rangeOfOption); + } + + /** + * InScope {in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param idList The collection of id as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setId_InScope(final Collection idList) { + doSetId_InScope(idList); + } + + protected void doSetId_InScope(final Collection idList) { + regINS(CK_INS, cTL(idList), getCValueId(), "ID"); + } + + /** + * NotInScope {not in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param idList The collection of id as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setId_NotInScope(final Collection idList) { + doSetId_NotInScope(idList); + } + + protected void doSetId_NotInScope(final Collection idList) { + regINS(CK_NINS, cTL(idList), getCValueId(), "ID"); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + */ + public void setId_IsNull() { + regId(CK_ISN, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + */ + public void setId_IsNotNull() { + regId(CK_ISNN, DOBJ); + } + + protected void regId(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueId(), "ID"); + } + + protected abstract ConditionValue getCValueId(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWord The value of suggestWord as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_Equal(final String suggestWord) { + doSetSuggestWord_Equal(fRES(suggestWord)); + } + + protected void doSetSuggestWord_Equal(final String suggestWord) { + regSuggestWord(CK_EQ, suggestWord); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWord The value of suggestWord as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_NotEqual(final String suggestWord) { + doSetSuggestWord_NotEqual(fRES(suggestWord)); + } + + protected void doSetSuggestWord_NotEqual(final String suggestWord) { + regSuggestWord(CK_NES, suggestWord); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWord The value of suggestWord as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_GreaterThan(final String suggestWord) { + regSuggestWord(CK_GT, fRES(suggestWord)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWord The value of suggestWord as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_LessThan(final String suggestWord) { + regSuggestWord(CK_LT, fRES(suggestWord)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWord The value of suggestWord as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_GreaterEqual(final String suggestWord) { + regSuggestWord(CK_GE, fRES(suggestWord)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWord The value of suggestWord as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_LessEqual(final String suggestWord) { + regSuggestWord(CK_LE, fRES(suggestWord)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWordList The collection of suggestWord as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_InScope(final Collection suggestWordList) { + doSetSuggestWord_InScope(suggestWordList); + } + + public void doSetSuggestWord_InScope( + final Collection suggestWordList) { + regINS(CK_INS, cTL(suggestWordList), getCValueSuggestWord(), + "SUGGEST_WORD"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWordList The collection of suggestWord as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_NotInScope( + final Collection suggestWordList) { + doSetSuggestWord_NotInScope(suggestWordList); + } + + public void doSetSuggestWord_NotInScope( + final Collection suggestWordList) { + regINS(CK_NINS, cTL(suggestWordList), getCValueSuggestWord(), + "SUGGEST_WORD"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWord The value of suggestWord as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_PrefixSearch(final String suggestWord) { + setSuggestWord_LikeSearch(suggestWord, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)}
+ *
e.g. setSuggestWord_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param suggestWord The value of suggestWord as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setSuggestWord_LikeSearch(final String suggestWord, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(suggestWord), getCValueSuggestWord(), + "SUGGEST_WORD", likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWord The value of suggestWord as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setSuggestWord_NotLikeSearch(final String suggestWord, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(suggestWord), getCValueSuggestWord(), + "SUGGEST_WORD", likeSearchOption); + } + + protected void regSuggestWord(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueSuggestWord(), "SUGGEST_WORD"); + } + + protected abstract ConditionValue getCValueSuggestWord(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRole The value of targetRole as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_Equal(final String targetRole) { + doSetTargetRole_Equal(fRES(targetRole)); + } + + protected void doSetTargetRole_Equal(final String targetRole) { + regTargetRole(CK_EQ, targetRole); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRole The value of targetRole as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_NotEqual(final String targetRole) { + doSetTargetRole_NotEqual(fRES(targetRole)); + } + + protected void doSetTargetRole_NotEqual(final String targetRole) { + regTargetRole(CK_NES, targetRole); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRole The value of targetRole as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_GreaterThan(final String targetRole) { + regTargetRole(CK_GT, fRES(targetRole)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRole The value of targetRole as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_LessThan(final String targetRole) { + regTargetRole(CK_LT, fRES(targetRole)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRole The value of targetRole as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_GreaterEqual(final String targetRole) { + regTargetRole(CK_GE, fRES(targetRole)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRole The value of targetRole as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_LessEqual(final String targetRole) { + regTargetRole(CK_LE, fRES(targetRole)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRoleList The collection of targetRole as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_InScope(final Collection targetRoleList) { + doSetTargetRole_InScope(targetRoleList); + } + + public void doSetTargetRole_InScope(final Collection targetRoleList) { + regINS(CK_INS, cTL(targetRoleList), getCValueTargetRole(), + "TARGET_ROLE"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRoleList The collection of targetRole as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_NotInScope(final Collection targetRoleList) { + doSetTargetRole_NotInScope(targetRoleList); + } + + public void doSetTargetRole_NotInScope( + final Collection targetRoleList) { + regINS(CK_NINS, cTL(targetRoleList), getCValueTargetRole(), + "TARGET_ROLE"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRole The value of targetRole as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_PrefixSearch(final String targetRole) { + setTargetRole_LikeSearch(targetRole, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * TARGET_ROLE: {VARCHAR(255)}
+ *
e.g. setTargetRole_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param targetRole The value of targetRole as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setTargetRole_LikeSearch(final String targetRole, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(targetRole), getCValueTargetRole(), "TARGET_ROLE", + likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRole The value of targetRole as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setTargetRole_NotLikeSearch(final String targetRole, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(targetRole), getCValueTargetRole(), "TARGET_ROLE", + likeSearchOption); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + */ + public void setTargetRole_IsNull() { + regTargetRole(CK_ISN, DOBJ); + } + + /** + * IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + */ + public void setTargetRole_IsNullOrEmpty() { + regTargetRole(CK_ISNOE, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + */ + public void setTargetRole_IsNotNull() { + regTargetRole(CK_ISNN, DOBJ); + } + + protected void regTargetRole(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueTargetRole(), "TARGET_ROLE"); + } + + protected abstract ConditionValue getCValueTargetRole(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabel The value of targetLabel as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_Equal(final String targetLabel) { + doSetTargetLabel_Equal(fRES(targetLabel)); + } + + protected void doSetTargetLabel_Equal(final String targetLabel) { + regTargetLabel(CK_EQ, targetLabel); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabel The value of targetLabel as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_NotEqual(final String targetLabel) { + doSetTargetLabel_NotEqual(fRES(targetLabel)); + } + + protected void doSetTargetLabel_NotEqual(final String targetLabel) { + regTargetLabel(CK_NES, targetLabel); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabel The value of targetLabel as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_GreaterThan(final String targetLabel) { + regTargetLabel(CK_GT, fRES(targetLabel)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabel The value of targetLabel as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_LessThan(final String targetLabel) { + regTargetLabel(CK_LT, fRES(targetLabel)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabel The value of targetLabel as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_GreaterEqual(final String targetLabel) { + regTargetLabel(CK_GE, fRES(targetLabel)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabel The value of targetLabel as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_LessEqual(final String targetLabel) { + regTargetLabel(CK_LE, fRES(targetLabel)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabelList The collection of targetLabel as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_InScope(final Collection targetLabelList) { + doSetTargetLabel_InScope(targetLabelList); + } + + public void doSetTargetLabel_InScope( + final Collection targetLabelList) { + regINS(CK_INS, cTL(targetLabelList), getCValueTargetLabel(), + "TARGET_LABEL"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabelList The collection of targetLabel as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_NotInScope( + final Collection targetLabelList) { + doSetTargetLabel_NotInScope(targetLabelList); + } + + public void doSetTargetLabel_NotInScope( + final Collection targetLabelList) { + regINS(CK_NINS, cTL(targetLabelList), getCValueTargetLabel(), + "TARGET_LABEL"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabel The value of targetLabel as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_PrefixSearch(final String targetLabel) { + setTargetLabel_LikeSearch(targetLabel, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * TARGET_LABEL: {VARCHAR(255)}
+ *
e.g. setTargetLabel_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param targetLabel The value of targetLabel as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setTargetLabel_LikeSearch(final String targetLabel, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(targetLabel), getCValueTargetLabel(), + "TARGET_LABEL", likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabel The value of targetLabel as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setTargetLabel_NotLikeSearch(final String targetLabel, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(targetLabel), getCValueTargetLabel(), + "TARGET_LABEL", likeSearchOption); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + */ + public void setTargetLabel_IsNull() { + regTargetLabel(CK_ISN, DOBJ); + } + + /** + * IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + */ + public void setTargetLabel_IsNullOrEmpty() { + regTargetLabel(CK_ISNOE, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + */ + public void setTargetLabel_IsNotNull() { + regTargetLabel(CK_ISNN, DOBJ); + } + + protected void regTargetLabel(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueTargetLabel(), "TARGET_LABEL"); + } + + protected abstract ConditionValue getCValueTargetLabel(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_Equal(final String createdBy) { + doSetCreatedBy_Equal(fRES(createdBy)); + } + + protected void doSetCreatedBy_Equal(final String createdBy) { + regCreatedBy(CK_EQ, createdBy); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_NotEqual(final String createdBy) { + doSetCreatedBy_NotEqual(fRES(createdBy)); + } + + protected void doSetCreatedBy_NotEqual(final String createdBy) { + regCreatedBy(CK_NES, createdBy); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_GreaterThan(final String createdBy) { + regCreatedBy(CK_GT, fRES(createdBy)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_LessThan(final String createdBy) { + regCreatedBy(CK_LT, fRES(createdBy)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_GreaterEqual(final String createdBy) { + regCreatedBy(CK_GE, fRES(createdBy)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_LessEqual(final String createdBy) { + regCreatedBy(CK_LE, fRES(createdBy)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdByList The collection of createdBy as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_InScope(final Collection createdByList) { + doSetCreatedBy_InScope(createdByList); + } + + public void doSetCreatedBy_InScope(final Collection createdByList) { + regINS(CK_INS, cTL(createdByList), getCValueCreatedBy(), "CREATED_BY"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdByList The collection of createdBy as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_NotInScope(final Collection createdByList) { + doSetCreatedBy_NotInScope(createdByList); + } + + public void doSetCreatedBy_NotInScope(final Collection createdByList) { + regINS(CK_NINS, cTL(createdByList), getCValueCreatedBy(), "CREATED_BY"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_PrefixSearch(final String createdBy) { + setCreatedBy_LikeSearch(createdBy, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)}
+ *
e.g. setCreatedBy_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param createdBy The value of createdBy as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setCreatedBy_LikeSearch(final String createdBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(createdBy), getCValueCreatedBy(), "CREATED_BY", + likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setCreatedBy_NotLikeSearch(final String createdBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(createdBy), getCValueCreatedBy(), "CREATED_BY", + likeSearchOption); + } + + protected void regCreatedBy(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueCreatedBy(), "CREATED_BY"); + } + + protected abstract ConditionValue getCValueCreatedBy(); + + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @param createdTime The value of createdTime as equal. (NullAllowed: if null, no condition) + */ + public void setCreatedTime_Equal(final java.sql.Timestamp createdTime) { + regCreatedTime(CK_EQ, createdTime); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @param createdTime The value of createdTime as greaterThan. (NullAllowed: if null, no condition) + */ + public void setCreatedTime_GreaterThan(final java.sql.Timestamp createdTime) { + regCreatedTime(CK_GT, createdTime); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @param createdTime The value of createdTime as lessThan. (NullAllowed: if null, no condition) + */ + public void setCreatedTime_LessThan(final java.sql.Timestamp createdTime) { + regCreatedTime(CK_LT, createdTime); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @param createdTime The value of createdTime as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setCreatedTime_GreaterEqual(final java.sql.Timestamp createdTime) { + regCreatedTime(CK_GE, createdTime); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @param createdTime The value of createdTime as lessEqual. (NullAllowed: if null, no condition) + */ + public void setCreatedTime_LessEqual(final java.sql.Timestamp createdTime) { + regCreatedTime(CK_LE, createdTime); + } + + /** + * FromTo with various options. (versatile) {(default) fromDatetime <= column <= toDatetime}
+ * And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + *
e.g. setCreatedTime_FromTo(fromDate, toDate, new FromToOption().compareAsDate());
+ * @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of createdTime. (NullAllowed: if null, no from-condition) + * @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of createdTime. (NullAllowed: if null, no to-condition) + * @param fromToOption The option of from-to. (NotNull) + */ + public void setCreatedTime_FromTo(final Date fromDatetime, + final Date toDatetime, final FromToOption fromToOption) { + regFTQ(fromDatetime != null ? new java.sql.Timestamp( + fromDatetime.getTime()) : null, + toDatetime != null ? new java.sql.Timestamp(toDatetime + .getTime()) : null, getCValueCreatedTime(), + "CREATED_TIME", fromToOption); + } + + /** + * DateFromTo. (Date means yyyy/MM/dd) {fromDate <= column < toDate + 1 day}
+ * And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + *
+     * e.g. from:{2007/04/10 08:24:53} to:{2007/04/16 14:36:29}
+     *  column >= '2007/04/10 00:00:00' and column < '2007/04/17 00:00:00'
+     * 
+ * @param fromDate The from-date(yyyy/MM/dd) of createdTime. (NullAllowed: if null, no from-condition) + * @param toDate The to-date(yyyy/MM/dd) of createdTime. (NullAllowed: if null, no to-condition) + */ + public void setCreatedTime_DateFromTo(final Date fromDate, final Date toDate) { + setCreatedTime_FromTo(fromDate, toDate, + new FromToOption().compareAsDate()); + } + + protected void regCreatedTime(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueCreatedTime(), "CREATED_TIME"); + } + + protected abstract ConditionValue getCValueCreatedTime(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_Equal(final String updatedBy) { + doSetUpdatedBy_Equal(fRES(updatedBy)); + } + + protected void doSetUpdatedBy_Equal(final String updatedBy) { + regUpdatedBy(CK_EQ, updatedBy); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_NotEqual(final String updatedBy) { + doSetUpdatedBy_NotEqual(fRES(updatedBy)); + } + + protected void doSetUpdatedBy_NotEqual(final String updatedBy) { + regUpdatedBy(CK_NES, updatedBy); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_GreaterThan(final String updatedBy) { + regUpdatedBy(CK_GT, fRES(updatedBy)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_LessThan(final String updatedBy) { + regUpdatedBy(CK_LT, fRES(updatedBy)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_GreaterEqual(final String updatedBy) { + regUpdatedBy(CK_GE, fRES(updatedBy)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_LessEqual(final String updatedBy) { + regUpdatedBy(CK_LE, fRES(updatedBy)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedByList The collection of updatedBy as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_InScope(final Collection updatedByList) { + doSetUpdatedBy_InScope(updatedByList); + } + + public void doSetUpdatedBy_InScope(final Collection updatedByList) { + regINS(CK_INS, cTL(updatedByList), getCValueUpdatedBy(), "UPDATED_BY"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedByList The collection of updatedBy as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_NotInScope(final Collection updatedByList) { + doSetUpdatedBy_NotInScope(updatedByList); + } + + public void doSetUpdatedBy_NotInScope(final Collection updatedByList) { + regINS(CK_NINS, cTL(updatedByList), getCValueUpdatedBy(), "UPDATED_BY"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_PrefixSearch(final String updatedBy) { + setUpdatedBy_LikeSearch(updatedBy, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * UPDATED_BY: {VARCHAR(255)}
+ *
e.g. setUpdatedBy_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param updatedBy The value of updatedBy as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setUpdatedBy_LikeSearch(final String updatedBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(updatedBy), getCValueUpdatedBy(), "UPDATED_BY", + likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setUpdatedBy_NotLikeSearch(final String updatedBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(updatedBy), getCValueUpdatedBy(), "UPDATED_BY", + likeSearchOption); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + */ + public void setUpdatedBy_IsNull() { + regUpdatedBy(CK_ISN, DOBJ); + } + + /** + * IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + */ + public void setUpdatedBy_IsNullOrEmpty() { + regUpdatedBy(CK_ISNOE, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + */ + public void setUpdatedBy_IsNotNull() { + regUpdatedBy(CK_ISNN, DOBJ); + } + + protected void regUpdatedBy(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueUpdatedBy(), "UPDATED_BY"); + } + + protected abstract ConditionValue getCValueUpdatedBy(); + + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @param updatedTime The value of updatedTime as equal. (NullAllowed: if null, no condition) + */ + public void setUpdatedTime_Equal(final java.sql.Timestamp updatedTime) { + regUpdatedTime(CK_EQ, updatedTime); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @param updatedTime The value of updatedTime as greaterThan. (NullAllowed: if null, no condition) + */ + public void setUpdatedTime_GreaterThan(final java.sql.Timestamp updatedTime) { + regUpdatedTime(CK_GT, updatedTime); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @param updatedTime The value of updatedTime as lessThan. (NullAllowed: if null, no condition) + */ + public void setUpdatedTime_LessThan(final java.sql.Timestamp updatedTime) { + regUpdatedTime(CK_LT, updatedTime); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @param updatedTime The value of updatedTime as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setUpdatedTime_GreaterEqual(final java.sql.Timestamp updatedTime) { + regUpdatedTime(CK_GE, updatedTime); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @param updatedTime The value of updatedTime as lessEqual. (NullAllowed: if null, no condition) + */ + public void setUpdatedTime_LessEqual(final java.sql.Timestamp updatedTime) { + regUpdatedTime(CK_LE, updatedTime); + } + + /** + * FromTo with various options. (versatile) {(default) fromDatetime <= column <= toDatetime}
+ * And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + *
e.g. setUpdatedTime_FromTo(fromDate, toDate, new FromToOption().compareAsDate());
+ * @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of updatedTime. (NullAllowed: if null, no from-condition) + * @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of updatedTime. (NullAllowed: if null, no to-condition) + * @param fromToOption The option of from-to. (NotNull) + */ + public void setUpdatedTime_FromTo(final Date fromDatetime, + final Date toDatetime, final FromToOption fromToOption) { + regFTQ(fromDatetime != null ? new java.sql.Timestamp( + fromDatetime.getTime()) : null, + toDatetime != null ? new java.sql.Timestamp(toDatetime + .getTime()) : null, getCValueUpdatedTime(), + "UPDATED_TIME", fromToOption); + } + + /** + * DateFromTo. (Date means yyyy/MM/dd) {fromDate <= column < toDate + 1 day}
+ * And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + *
+     * e.g. from:{2007/04/10 08:24:53} to:{2007/04/16 14:36:29}
+     *  column >= '2007/04/10 00:00:00' and column < '2007/04/17 00:00:00'
+     * 
+ * @param fromDate The from-date(yyyy/MM/dd) of updatedTime. (NullAllowed: if null, no from-condition) + * @param toDate The to-date(yyyy/MM/dd) of updatedTime. (NullAllowed: if null, no to-condition) + */ + public void setUpdatedTime_DateFromTo(final Date fromDate, final Date toDate) { + setUpdatedTime_FromTo(fromDate, toDate, + new FromToOption().compareAsDate()); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + */ + public void setUpdatedTime_IsNull() { + regUpdatedTime(CK_ISN, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + */ + public void setUpdatedTime_IsNotNull() { + regUpdatedTime(CK_ISNN, DOBJ); + } + + protected void regUpdatedTime(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueUpdatedTime(), "UPDATED_TIME"); + } + + protected abstract ConditionValue getCValueUpdatedTime(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_Equal(final String deletedBy) { + doSetDeletedBy_Equal(fRES(deletedBy)); + } + + protected void doSetDeletedBy_Equal(final String deletedBy) { + regDeletedBy(CK_EQ, deletedBy); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_NotEqual(final String deletedBy) { + doSetDeletedBy_NotEqual(fRES(deletedBy)); + } + + protected void doSetDeletedBy_NotEqual(final String deletedBy) { + regDeletedBy(CK_NES, deletedBy); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_GreaterThan(final String deletedBy) { + regDeletedBy(CK_GT, fRES(deletedBy)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_LessThan(final String deletedBy) { + regDeletedBy(CK_LT, fRES(deletedBy)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_GreaterEqual(final String deletedBy) { + regDeletedBy(CK_GE, fRES(deletedBy)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_LessEqual(final String deletedBy) { + regDeletedBy(CK_LE, fRES(deletedBy)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedByList The collection of deletedBy as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_InScope(final Collection deletedByList) { + doSetDeletedBy_InScope(deletedByList); + } + + public void doSetDeletedBy_InScope(final Collection deletedByList) { + regINS(CK_INS, cTL(deletedByList), getCValueDeletedBy(), "DELETED_BY"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedByList The collection of deletedBy as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_NotInScope(final Collection deletedByList) { + doSetDeletedBy_NotInScope(deletedByList); + } + + public void doSetDeletedBy_NotInScope(final Collection deletedByList) { + regINS(CK_NINS, cTL(deletedByList), getCValueDeletedBy(), "DELETED_BY"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_PrefixSearch(final String deletedBy) { + setDeletedBy_LikeSearch(deletedBy, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * DELETED_BY: {VARCHAR(255)}
+ *
e.g. setDeletedBy_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param deletedBy The value of deletedBy as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setDeletedBy_LikeSearch(final String deletedBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(deletedBy), getCValueDeletedBy(), "DELETED_BY", + likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setDeletedBy_NotLikeSearch(final String deletedBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(deletedBy), getCValueDeletedBy(), "DELETED_BY", + likeSearchOption); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + */ + public void setDeletedBy_IsNull() { + regDeletedBy(CK_ISN, DOBJ); + } + + /** + * IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + */ + public void setDeletedBy_IsNullOrEmpty() { + regDeletedBy(CK_ISNOE, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + */ + public void setDeletedBy_IsNotNull() { + regDeletedBy(CK_ISNN, DOBJ); + } + + protected void regDeletedBy(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueDeletedBy(), "DELETED_BY"); + } + + protected abstract ConditionValue getCValueDeletedBy(); + + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @param deletedTime The value of deletedTime as equal. (NullAllowed: if null, no condition) + */ + public void setDeletedTime_Equal(final java.sql.Timestamp deletedTime) { + regDeletedTime(CK_EQ, deletedTime); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @param deletedTime The value of deletedTime as greaterThan. (NullAllowed: if null, no condition) + */ + public void setDeletedTime_GreaterThan(final java.sql.Timestamp deletedTime) { + regDeletedTime(CK_GT, deletedTime); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @param deletedTime The value of deletedTime as lessThan. (NullAllowed: if null, no condition) + */ + public void setDeletedTime_LessThan(final java.sql.Timestamp deletedTime) { + regDeletedTime(CK_LT, deletedTime); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @param deletedTime The value of deletedTime as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setDeletedTime_GreaterEqual(final java.sql.Timestamp deletedTime) { + regDeletedTime(CK_GE, deletedTime); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @param deletedTime The value of deletedTime as lessEqual. (NullAllowed: if null, no condition) + */ + public void setDeletedTime_LessEqual(final java.sql.Timestamp deletedTime) { + regDeletedTime(CK_LE, deletedTime); + } + + /** + * FromTo with various options. (versatile) {(default) fromDatetime <= column <= toDatetime}
+ * And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + *
e.g. setDeletedTime_FromTo(fromDate, toDate, new FromToOption().compareAsDate());
+ * @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of deletedTime. (NullAllowed: if null, no from-condition) + * @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of deletedTime. (NullAllowed: if null, no to-condition) + * @param fromToOption The option of from-to. (NotNull) + */ + public void setDeletedTime_FromTo(final Date fromDatetime, + final Date toDatetime, final FromToOption fromToOption) { + regFTQ(fromDatetime != null ? new java.sql.Timestamp( + fromDatetime.getTime()) : null, + toDatetime != null ? new java.sql.Timestamp(toDatetime + .getTime()) : null, getCValueDeletedTime(), + "DELETED_TIME", fromToOption); + } + + /** + * DateFromTo. (Date means yyyy/MM/dd) {fromDate <= column < toDate + 1 day}
+ * And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + *
+     * e.g. from:{2007/04/10 08:24:53} to:{2007/04/16 14:36:29}
+     *  column >= '2007/04/10 00:00:00' and column < '2007/04/17 00:00:00'
+     * 
+ * @param fromDate The from-date(yyyy/MM/dd) of deletedTime. (NullAllowed: if null, no from-condition) + * @param toDate The to-date(yyyy/MM/dd) of deletedTime. (NullAllowed: if null, no to-condition) + */ + public void setDeletedTime_DateFromTo(final Date fromDate, final Date toDate) { + setDeletedTime_FromTo(fromDate, toDate, + new FromToOption().compareAsDate()); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + */ + public void setDeletedTime_IsNull() { + regDeletedTime(CK_ISN, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + */ + public void setDeletedTime_IsNotNull() { + regDeletedTime(CK_ISNN, DOBJ); + } + + protected void regDeletedTime(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueDeletedTime(), "DELETED_TIME"); + } + + protected abstract ConditionValue getCValueDeletedTime(); + + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as equal. (NullAllowed: if null, no condition) + */ + public void setVersionNo_Equal(final Integer versionNo) { + doSetVersionNo_Equal(versionNo); + } + + protected void doSetVersionNo_Equal(final Integer versionNo) { + regVersionNo(CK_EQ, versionNo); + } + + /** + * NotEqual(<>). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as notEqual. (NullAllowed: if null, no condition) + */ + public void setVersionNo_NotEqual(final Integer versionNo) { + doSetVersionNo_NotEqual(versionNo); + } + + protected void doSetVersionNo_NotEqual(final Integer versionNo) { + regVersionNo(CK_NES, versionNo); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as greaterThan. (NullAllowed: if null, no condition) + */ + public void setVersionNo_GreaterThan(final Integer versionNo) { + regVersionNo(CK_GT, versionNo); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as lessThan. (NullAllowed: if null, no condition) + */ + public void setVersionNo_LessThan(final Integer versionNo) { + regVersionNo(CK_LT, versionNo); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setVersionNo_GreaterEqual(final Integer versionNo) { + regVersionNo(CK_GE, versionNo); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as lessEqual. (NullAllowed: if null, no condition) + */ + public void setVersionNo_LessEqual(final Integer versionNo) { + regVersionNo(CK_LE, versionNo); + } + + /** + * RangeOf with various options. (versatile)
+ * {(default) minNumber <= column <= maxNumber}
+ * And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param minNumber The min number of versionNo. (NullAllowed: if null, no from-condition) + * @param maxNumber The max number of versionNo. (NullAllowed: if null, no to-condition) + * @param rangeOfOption The option of range-of. (NotNull) + */ + public void setVersionNo_RangeOf(final Integer minNumber, + final Integer maxNumber, final RangeOfOption rangeOfOption) { + regROO(minNumber, maxNumber, getCValueVersionNo(), "VERSION_NO", + rangeOfOption); + } + + /** + * InScope {in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNoList The collection of versionNo as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setVersionNo_InScope(final Collection versionNoList) { + doSetVersionNo_InScope(versionNoList); + } + + protected void doSetVersionNo_InScope( + final Collection versionNoList) { + regINS(CK_INS, cTL(versionNoList), getCValueVersionNo(), "VERSION_NO"); + } + + /** + * NotInScope {not in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNoList The collection of versionNo as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setVersionNo_NotInScope(final Collection versionNoList) { + doSetVersionNo_NotInScope(versionNoList); + } + + protected void doSetVersionNo_NotInScope( + final Collection versionNoList) { + regINS(CK_NINS, cTL(versionNoList), getCValueVersionNo(), "VERSION_NO"); + } + + protected void regVersionNo(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueVersionNo(), "VERSION_NO"); + } + + protected abstract ConditionValue getCValueVersionNo(); + + // =================================================================================== + // ScalarCondition + // =============== + /** + * Prepare ScalarCondition as equal.
+ * {where FOO = (select max(BAR) from ...) + *
+     * cb.query().scalar_Equal().max(new SubQuery<SuggestBadWordCB>() {
+     *     public void query(SuggestBadWordCB subCB) {
+     *         subCB.specify().setXxx... // derived column for function
+     *         subCB.query().setYyy...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_Equal() { + return xcreateSSQFunction(CK_EQ, SuggestBadWordCB.class); + } + + /** + * Prepare ScalarCondition as equal.
+ * {where FOO <> (select max(BAR) from ...) + *
+     * cb.query().scalar_NotEqual().max(new SubQuery<SuggestBadWordCB>() {
+     *     public void query(SuggestBadWordCB subCB) {
+     *         subCB.specify().setXxx... // derived column for function
+     *         subCB.query().setYyy...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_NotEqual() { + return xcreateSSQFunction(CK_NES, SuggestBadWordCB.class); + } + + /** + * Prepare ScalarCondition as greaterThan.
+ * {where FOO > (select max(BAR) from ...) + *
+     * cb.query().scalar_GreaterThan().max(new SubQuery<SuggestBadWordCB>() {
+     *     public void query(SuggestBadWordCB subCB) {
+     *         subCB.specify().setFoo... // derived column for function
+     *         subCB.query().setBar...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_GreaterThan() { + return xcreateSSQFunction(CK_GT, SuggestBadWordCB.class); + } + + /** + * Prepare ScalarCondition as lessThan.
+ * {where FOO < (select max(BAR) from ...) + *
+     * cb.query().scalar_LessThan().max(new SubQuery<SuggestBadWordCB>() {
+     *     public void query(SuggestBadWordCB subCB) {
+     *         subCB.specify().setFoo... // derived column for function
+     *         subCB.query().setBar...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_LessThan() { + return xcreateSSQFunction(CK_LT, SuggestBadWordCB.class); + } + + /** + * Prepare ScalarCondition as greaterEqual.
+ * {where FOO >= (select max(BAR) from ...) + *
+     * cb.query().scalar_GreaterEqual().max(new SubQuery<SuggestBadWordCB>() {
+     *     public void query(SuggestBadWordCB subCB) {
+     *         subCB.specify().setFoo... // derived column for function
+     *         subCB.query().setBar...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_GreaterEqual() { + return xcreateSSQFunction(CK_GE, SuggestBadWordCB.class); + } + + /** + * Prepare ScalarCondition as lessEqual.
+ * {where FOO <= (select max(BAR) from ...) + *
+     * cb.query().scalar_LessEqual().max(new SubQuery<SuggestBadWordCB>() {
+     *     public void query(SuggestBadWordCB subCB) {
+     *         subCB.specify().setFoo... // derived column for function
+     *         subCB.query().setBar...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_LessEqual() { + return xcreateSSQFunction(CK_LE, SuggestBadWordCB.class); + } + + @Override + @SuppressWarnings("unchecked") + protected void xscalarCondition(final String fn, + final SubQuery sq, final String rd, final HpSSQOption op) { + assertObjectNotNull("subQuery", sq); + final SuggestBadWordCB cb = xcreateScalarConditionCB(); + sq.query((CB) cb); + final String pp = keepScalarCondition(cb.query()); // for saving query-value + op.setPartitionByCBean((CB) xcreateScalarConditionPartitionByCB()); // for using partition-by + registerScalarCondition(fn, cb.query(), pp, rd, op); + } + + public abstract String keepScalarCondition(SuggestBadWordCQ sq); + + protected SuggestBadWordCB xcreateScalarConditionCB() { + final SuggestBadWordCB cb = newMyCB(); + cb.xsetupForScalarCondition(this); + return cb; + } + + protected SuggestBadWordCB xcreateScalarConditionPartitionByCB() { + final SuggestBadWordCB cb = newMyCB(); + cb.xsetupForScalarConditionPartitionBy(this); + return cb; + } + + // =================================================================================== + // MyselfDerived + // ============= + public void xsmyselfDerive(final String fn, + final SubQuery sq, final String al, + final DerivedReferrerOption op) { + assertObjectNotNull("subQuery", sq); + final SuggestBadWordCB cb = new SuggestBadWordCB(); + cb.xsetupForDerivedReferrer(this); + try { + lock(); + sq.query(cb); + } finally { + unlock(); + } + final String pp = keepSpecifyMyselfDerived(cb.query()); + final String pk = "ID"; + registerSpecifyMyselfDerived(fn, cb.query(), pk, pk, pp, + "myselfDerived", al, op); + } + + public abstract String keepSpecifyMyselfDerived(SuggestBadWordCQ sq); + + /** + * Prepare for (Query)MyselfDerived (correlated sub-query). + * @return The object to set up a function for myself table. (NotNull) + */ + public HpQDRFunction myselfDerived() { + return xcreateQDRFunctionMyselfDerived(SuggestBadWordCB.class); + } + + @Override + @SuppressWarnings("unchecked") + protected void xqderiveMyselfDerived( + final String fn, final SubQuery sq, final String rd, + final Object vl, final DerivedReferrerOption op) { + assertObjectNotNull("subQuery", sq); + final SuggestBadWordCB cb = new SuggestBadWordCB(); + cb.xsetupForDerivedReferrer(this); + sq.query((CB) cb); + final String pk = "ID"; + final String sqpp = keepQueryMyselfDerived(cb.query()); // for saving query-value. + final String prpp = keepQueryMyselfDerivedParameter(vl); + registerQueryMyselfDerived(fn, cb.query(), pk, pk, sqpp, + "myselfDerived", rd, vl, prpp, op); + } + + public abstract String keepQueryMyselfDerived(SuggestBadWordCQ sq); + + public abstract String keepQueryMyselfDerivedParameter(Object vl); + + // =================================================================================== + // MyselfExists + // ============ + /** + * Prepare for MyselfExists (correlated sub-query). + * @param subQuery The implementation of sub-query. (NotNull) + */ + public void myselfExists(final SubQuery subQuery) { + assertObjectNotNull("subQuery", subQuery); + final SuggestBadWordCB cb = new SuggestBadWordCB(); + cb.xsetupForMyselfExists(this); + try { + lock(); + subQuery.query(cb); + } finally { + unlock(); + } + final String pp = keepMyselfExists(cb.query()); + registerMyselfExists(cb.query(), pp); + } + + public abstract String keepMyselfExists(SuggestBadWordCQ sq); + + // =================================================================================== + // MyselfInScope + // ============= + /** + * Prepare for MyselfInScope (sub-query). + * @param subQuery The implementation of sub-query. (NotNull) + */ + public void myselfInScope(final SubQuery subQuery) { + assertObjectNotNull("subQuery", subQuery); + final SuggestBadWordCB cb = new SuggestBadWordCB(); + cb.xsetupForMyselfInScope(this); + try { + lock(); + subQuery.query(cb); + } finally { + unlock(); + } + final String pp = keepMyselfInScope(cb.query()); + registerMyselfInScope(cb.query(), pp); + } + + public abstract String keepMyselfInScope(SuggestBadWordCQ sq); + + // =================================================================================== + // Manual Order + // ============ + /** + * Order along manual ordering information. + *
+     * MemberCB cb = new MemberCB();
+     * ManualOrderBean mob = new ManualOrderBean();
+     * mob.when_GreaterEqual(priorityDate); // e.g. 2000/01/01
+     * cb.query().addOrderBy_Birthdate_Asc().withManualOrder(mob);
+     * // order by 
+     * //   case
+     * //     when BIRTHDATE >= '2000/01/01' then 0
+     * //     else 1
+     * //   end asc, ...
+     *
+     * MemberCB cb = new MemberCB();
+     * ManualOrderBean mob = new ManualOrderBean();
+     * mob.when_Equal(CDef.MemberStatus.Withdrawal);
+     * mob.when_Equal(CDef.MemberStatus.Formalized);
+     * mob.when_Equal(CDef.MemberStatus.Provisional);
+     * cb.query().addOrderBy_MemberStatusCode_Asc().withManualOrder(mob);
+     * // order by 
+     * //   case
+     * //     when MEMBER_STATUS_CODE = 'WDL' then 0
+     * //     when MEMBER_STATUS_CODE = 'FML' then 1
+     * //     when MEMBER_STATUS_CODE = 'PRV' then 2
+     * //     else 3
+     * //   end asc, ...
+     * 
+ *

This function with Union is unsupported!

+ *

The order values are bound (treated as bind parameter).

+ * @param mob The bean of manual order containing order values. (NotNull) + */ + public void withManualOrder(final ManualOrderBean mob) { // is user public! + xdoWithManualOrder(mob); + } + + // =================================================================================== + // Small Adjustment + // ================ + /** + * Order along the list of manual values. #beforejava8
+ * This function with Union is unsupported!
+ * The order values are bound (treated as bind parameter). + *
+     * MemberCB cb = new MemberCB();
+     * List<CDef.MemberStatus> orderValueList = new ArrayList<CDef.MemberStatus>();
+     * orderValueList.add(CDef.MemberStatus.Withdrawal);
+     * orderValueList.add(CDef.MemberStatus.Formalized);
+     * orderValueList.add(CDef.MemberStatus.Provisional);
+     * cb.query().addOrderBy_MemberStatusCode_Asc().withManualOrder(orderValueList);
+     * // order by 
+     * //   case
+     * //     when MEMBER_STATUS_CODE = 'WDL' then 0
+     * //     when MEMBER_STATUS_CODE = 'FML' then 1
+     * //     when MEMBER_STATUS_CODE = 'PRV' then 2
+     * //     else 3
+     * //   end asc, ...
+     * 
+ * @param orderValueList The list of order values for manual ordering. (NotNull) + */ + public void withManualOrder(final List orderValueList) { // is user public! + assertObjectNotNull("withManualOrder(orderValueList)", orderValueList); + final ManualOrderBean manualOrderBean = new ManualOrderBean(); + manualOrderBean.acceptOrderValueList(orderValueList); + withManualOrder(manualOrderBean); + } + + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + + // =================================================================================== + // Very Internal + // ============= + protected SuggestBadWordCB newMyCB() { + return new SuggestBadWordCB(); + } + + // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + + protected String xabCQ() { + return SuggestBadWordCQ.class.getName(); + } + + protected String xabLSO() { + return LikeSearchOption.class.getName(); + } + + protected String xabSSQS() { + return HpSSQSetupper.class.getName(); + } +} diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsSuggestElevateWordCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsSuggestElevateWordCQ.java new file mode 100644 index 000000000..544cbe276 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsSuggestElevateWordCQ.java @@ -0,0 +1,2076 @@ +/* + * 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.cbean.cq.bs; + +import java.util.Collection; +import java.util.Date; +import java.util.List; + +import jp.sf.fess.db.allcommon.DBMetaInstanceHandler; +import jp.sf.fess.db.cbean.SuggestElevateWordCB; +import jp.sf.fess.db.cbean.cq.SuggestElevateWordCQ; + +import org.seasar.dbflute.cbean.AbstractConditionQuery; +import org.seasar.dbflute.cbean.ConditionBean; +import org.seasar.dbflute.cbean.ConditionQuery; +import org.seasar.dbflute.cbean.ManualOrderBean; +import org.seasar.dbflute.cbean.SubQuery; +import org.seasar.dbflute.cbean.chelper.HpQDRFunction; +import org.seasar.dbflute.cbean.chelper.HpSSQFunction; +import org.seasar.dbflute.cbean.chelper.HpSSQOption; +import org.seasar.dbflute.cbean.chelper.HpSSQSetupper; +import org.seasar.dbflute.cbean.ckey.ConditionKey; +import org.seasar.dbflute.cbean.coption.DerivedReferrerOption; +import org.seasar.dbflute.cbean.coption.FromToOption; +import org.seasar.dbflute.cbean.coption.LikeSearchOption; +import org.seasar.dbflute.cbean.coption.RangeOfOption; +import org.seasar.dbflute.cbean.cvalue.ConditionValue; +import org.seasar.dbflute.cbean.sqlclause.SqlClause; +import org.seasar.dbflute.dbmeta.DBMetaProvider; + +/** + * The abstract condition-query of SUGGEST_ELEVATE_WORD. + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsSuggestElevateWordCQ extends + AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + public AbstractBsSuggestElevateWordCQ(final ConditionQuery referrerQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel) { + super(referrerQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // DBMeta Provider + // =============== + @Override + protected DBMetaProvider xgetDBMetaProvider() { + return DBMetaInstanceHandler.getProvider(); + } + + // =================================================================================== + // Table Name + // ========== + @Override + public String getTableDbName() { + return "SUGGEST_ELEVATE_WORD"; + } + + // =================================================================================== + // Query + // ===== + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as equal. (NullAllowed: if null, no condition) + */ + public void setId_Equal(final Long id) { + doSetId_Equal(id); + } + + protected void doSetId_Equal(final Long id) { + regId(CK_EQ, id); + } + + /** + * NotEqual(<>). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as notEqual. (NullAllowed: if null, no condition) + */ + public void setId_NotEqual(final Long id) { + doSetId_NotEqual(id); + } + + protected void doSetId_NotEqual(final Long id) { + regId(CK_NES, id); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as greaterThan. (NullAllowed: if null, no condition) + */ + public void setId_GreaterThan(final Long id) { + regId(CK_GT, id); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as lessThan. (NullAllowed: if null, no condition) + */ + public void setId_LessThan(final Long id) { + regId(CK_LT, id); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setId_GreaterEqual(final Long id) { + regId(CK_GE, id); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param id The value of id as lessEqual. (NullAllowed: if null, no condition) + */ + public void setId_LessEqual(final Long id) { + regId(CK_LE, id); + } + + /** + * RangeOf with various options. (versatile)
+ * {(default) minNumber <= column <= maxNumber}
+ * And NullIgnored, OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param minNumber The min number of id. (NullAllowed: if null, no from-condition) + * @param maxNumber The max number of id. (NullAllowed: if null, no to-condition) + * @param rangeOfOption The option of range-of. (NotNull) + */ + public void setId_RangeOf(final Long minNumber, final Long maxNumber, + final RangeOfOption rangeOfOption) { + regROO(minNumber, maxNumber, getCValueId(), "ID", rangeOfOption); + } + + /** + * InScope {in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param idList The collection of id as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setId_InScope(final Collection idList) { + doSetId_InScope(idList); + } + + protected void doSetId_InScope(final Collection idList) { + regINS(CK_INS, cTL(idList), getCValueId(), "ID"); + } + + /** + * NotInScope {not in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @param idList The collection of id as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setId_NotInScope(final Collection idList) { + doSetId_NotInScope(idList); + } + + protected void doSetId_NotInScope(final Collection idList) { + regINS(CK_NINS, cTL(idList), getCValueId(), "ID"); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + */ + public void setId_IsNull() { + regId(CK_ISN, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + */ + public void setId_IsNotNull() { + regId(CK_ISNN, DOBJ); + } + + protected void regId(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueId(), "ID"); + } + + protected abstract ConditionValue getCValueId(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWord The value of suggestWord as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_Equal(final String suggestWord) { + doSetSuggestWord_Equal(fRES(suggestWord)); + } + + protected void doSetSuggestWord_Equal(final String suggestWord) { + regSuggestWord(CK_EQ, suggestWord); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWord The value of suggestWord as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_NotEqual(final String suggestWord) { + doSetSuggestWord_NotEqual(fRES(suggestWord)); + } + + protected void doSetSuggestWord_NotEqual(final String suggestWord) { + regSuggestWord(CK_NES, suggestWord); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWord The value of suggestWord as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_GreaterThan(final String suggestWord) { + regSuggestWord(CK_GT, fRES(suggestWord)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWord The value of suggestWord as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_LessThan(final String suggestWord) { + regSuggestWord(CK_LT, fRES(suggestWord)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWord The value of suggestWord as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_GreaterEqual(final String suggestWord) { + regSuggestWord(CK_GE, fRES(suggestWord)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWord The value of suggestWord as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_LessEqual(final String suggestWord) { + regSuggestWord(CK_LE, fRES(suggestWord)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWordList The collection of suggestWord as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_InScope(final Collection suggestWordList) { + doSetSuggestWord_InScope(suggestWordList); + } + + public void doSetSuggestWord_InScope( + final Collection suggestWordList) { + regINS(CK_INS, cTL(suggestWordList), getCValueSuggestWord(), + "SUGGEST_WORD"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWordList The collection of suggestWord as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_NotInScope( + final Collection suggestWordList) { + doSetSuggestWord_NotInScope(suggestWordList); + } + + public void doSetSuggestWord_NotInScope( + final Collection suggestWordList) { + regINS(CK_NINS, cTL(suggestWordList), getCValueSuggestWord(), + "SUGGEST_WORD"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWord The value of suggestWord as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setSuggestWord_PrefixSearch(final String suggestWord) { + setSuggestWord_LikeSearch(suggestWord, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)}
+ *
e.g. setSuggestWord_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param suggestWord The value of suggestWord as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setSuggestWord_LikeSearch(final String suggestWord, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(suggestWord), getCValueSuggestWord(), + "SUGGEST_WORD", likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @param suggestWord The value of suggestWord as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setSuggestWord_NotLikeSearch(final String suggestWord, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(suggestWord), getCValueSuggestWord(), + "SUGGEST_WORD", likeSearchOption); + } + + protected void regSuggestWord(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueSuggestWord(), "SUGGEST_WORD"); + } + + protected abstract ConditionValue getCValueSuggestWord(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * READING: {VARCHAR(255)} + * @param reading The value of reading as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setReading_Equal(final String reading) { + doSetReading_Equal(fRES(reading)); + } + + protected void doSetReading_Equal(final String reading) { + regReading(CK_EQ, reading); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * READING: {VARCHAR(255)} + * @param reading The value of reading as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setReading_NotEqual(final String reading) { + doSetReading_NotEqual(fRES(reading)); + } + + protected void doSetReading_NotEqual(final String reading) { + regReading(CK_NES, reading); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * READING: {VARCHAR(255)} + * @param reading The value of reading as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setReading_GreaterThan(final String reading) { + regReading(CK_GT, fRES(reading)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * READING: {VARCHAR(255)} + * @param reading The value of reading as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setReading_LessThan(final String reading) { + regReading(CK_LT, fRES(reading)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * READING: {VARCHAR(255)} + * @param reading The value of reading as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setReading_GreaterEqual(final String reading) { + regReading(CK_GE, fRES(reading)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * READING: {VARCHAR(255)} + * @param reading The value of reading as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setReading_LessEqual(final String reading) { + regReading(CK_LE, fRES(reading)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * READING: {VARCHAR(255)} + * @param readingList The collection of reading as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setReading_InScope(final Collection readingList) { + doSetReading_InScope(readingList); + } + + public void doSetReading_InScope(final Collection readingList) { + regINS(CK_INS, cTL(readingList), getCValueReading(), "READING"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * READING: {VARCHAR(255)} + * @param readingList The collection of reading as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setReading_NotInScope(final Collection readingList) { + doSetReading_NotInScope(readingList); + } + + public void doSetReading_NotInScope(final Collection readingList) { + regINS(CK_NINS, cTL(readingList), getCValueReading(), "READING"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * READING: {VARCHAR(255)} + * @param reading The value of reading as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setReading_PrefixSearch(final String reading) { + setReading_LikeSearch(reading, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * READING: {VARCHAR(255)}
+ *
e.g. setReading_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param reading The value of reading as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setReading_LikeSearch(final String reading, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(reading), getCValueReading(), "READING", + likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * READING: {VARCHAR(255)} + * @param reading The value of reading as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setReading_NotLikeSearch(final String reading, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(reading), getCValueReading(), "READING", + likeSearchOption); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * READING: {VARCHAR(255)} + */ + public void setReading_IsNull() { + regReading(CK_ISN, DOBJ); + } + + /** + * IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered.
+ * READING: {VARCHAR(255)} + */ + public void setReading_IsNullOrEmpty() { + regReading(CK_ISNOE, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * READING: {VARCHAR(255)} + */ + public void setReading_IsNotNull() { + regReading(CK_ISNN, DOBJ); + } + + protected void regReading(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueReading(), "READING"); + } + + protected abstract ConditionValue getCValueReading(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRole The value of targetRole as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_Equal(final String targetRole) { + doSetTargetRole_Equal(fRES(targetRole)); + } + + protected void doSetTargetRole_Equal(final String targetRole) { + regTargetRole(CK_EQ, targetRole); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRole The value of targetRole as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_NotEqual(final String targetRole) { + doSetTargetRole_NotEqual(fRES(targetRole)); + } + + protected void doSetTargetRole_NotEqual(final String targetRole) { + regTargetRole(CK_NES, targetRole); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRole The value of targetRole as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_GreaterThan(final String targetRole) { + regTargetRole(CK_GT, fRES(targetRole)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRole The value of targetRole as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_LessThan(final String targetRole) { + regTargetRole(CK_LT, fRES(targetRole)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRole The value of targetRole as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_GreaterEqual(final String targetRole) { + regTargetRole(CK_GE, fRES(targetRole)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRole The value of targetRole as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_LessEqual(final String targetRole) { + regTargetRole(CK_LE, fRES(targetRole)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRoleList The collection of targetRole as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_InScope(final Collection targetRoleList) { + doSetTargetRole_InScope(targetRoleList); + } + + public void doSetTargetRole_InScope(final Collection targetRoleList) { + regINS(CK_INS, cTL(targetRoleList), getCValueTargetRole(), + "TARGET_ROLE"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRoleList The collection of targetRole as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_NotInScope(final Collection targetRoleList) { + doSetTargetRole_NotInScope(targetRoleList); + } + + public void doSetTargetRole_NotInScope( + final Collection targetRoleList) { + regINS(CK_NINS, cTL(targetRoleList), getCValueTargetRole(), + "TARGET_ROLE"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRole The value of targetRole as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetRole_PrefixSearch(final String targetRole) { + setTargetRole_LikeSearch(targetRole, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * TARGET_ROLE: {VARCHAR(255)}
+ *
e.g. setTargetRole_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param targetRole The value of targetRole as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setTargetRole_LikeSearch(final String targetRole, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(targetRole), getCValueTargetRole(), "TARGET_ROLE", + likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + * @param targetRole The value of targetRole as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setTargetRole_NotLikeSearch(final String targetRole, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(targetRole), getCValueTargetRole(), "TARGET_ROLE", + likeSearchOption); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + */ + public void setTargetRole_IsNull() { + regTargetRole(CK_ISN, DOBJ); + } + + /** + * IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + */ + public void setTargetRole_IsNullOrEmpty() { + regTargetRole(CK_ISNOE, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * TARGET_ROLE: {VARCHAR(255)} + */ + public void setTargetRole_IsNotNull() { + regTargetRole(CK_ISNN, DOBJ); + } + + protected void regTargetRole(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueTargetRole(), "TARGET_ROLE"); + } + + protected abstract ConditionValue getCValueTargetRole(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabel The value of targetLabel as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_Equal(final String targetLabel) { + doSetTargetLabel_Equal(fRES(targetLabel)); + } + + protected void doSetTargetLabel_Equal(final String targetLabel) { + regTargetLabel(CK_EQ, targetLabel); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabel The value of targetLabel as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_NotEqual(final String targetLabel) { + doSetTargetLabel_NotEqual(fRES(targetLabel)); + } + + protected void doSetTargetLabel_NotEqual(final String targetLabel) { + regTargetLabel(CK_NES, targetLabel); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabel The value of targetLabel as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_GreaterThan(final String targetLabel) { + regTargetLabel(CK_GT, fRES(targetLabel)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabel The value of targetLabel as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_LessThan(final String targetLabel) { + regTargetLabel(CK_LT, fRES(targetLabel)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabel The value of targetLabel as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_GreaterEqual(final String targetLabel) { + regTargetLabel(CK_GE, fRES(targetLabel)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabel The value of targetLabel as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_LessEqual(final String targetLabel) { + regTargetLabel(CK_LE, fRES(targetLabel)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabelList The collection of targetLabel as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_InScope(final Collection targetLabelList) { + doSetTargetLabel_InScope(targetLabelList); + } + + public void doSetTargetLabel_InScope( + final Collection targetLabelList) { + regINS(CK_INS, cTL(targetLabelList), getCValueTargetLabel(), + "TARGET_LABEL"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabelList The collection of targetLabel as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_NotInScope( + final Collection targetLabelList) { + doSetTargetLabel_NotInScope(targetLabelList); + } + + public void doSetTargetLabel_NotInScope( + final Collection targetLabelList) { + regINS(CK_NINS, cTL(targetLabelList), getCValueTargetLabel(), + "TARGET_LABEL"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabel The value of targetLabel as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setTargetLabel_PrefixSearch(final String targetLabel) { + setTargetLabel_LikeSearch(targetLabel, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * TARGET_LABEL: {VARCHAR(255)}
+ *
e.g. setTargetLabel_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param targetLabel The value of targetLabel as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setTargetLabel_LikeSearch(final String targetLabel, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(targetLabel), getCValueTargetLabel(), + "TARGET_LABEL", likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + * @param targetLabel The value of targetLabel as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setTargetLabel_NotLikeSearch(final String targetLabel, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(targetLabel), getCValueTargetLabel(), + "TARGET_LABEL", likeSearchOption); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + */ + public void setTargetLabel_IsNull() { + regTargetLabel(CK_ISN, DOBJ); + } + + /** + * IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + */ + public void setTargetLabel_IsNullOrEmpty() { + regTargetLabel(CK_ISNOE, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * TARGET_LABEL: {VARCHAR(255)} + */ + public void setTargetLabel_IsNotNull() { + regTargetLabel(CK_ISNN, DOBJ); + } + + protected void regTargetLabel(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueTargetLabel(), "TARGET_LABEL"); + } + + protected abstract ConditionValue getCValueTargetLabel(); + + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * BOOST: {NotNull, DOUBLE(17)} + * @param boost The value of boost as equal. (NullAllowed: if null, no condition) + */ + public void setBoost_Equal(final java.math.BigDecimal boost) { + doSetBoost_Equal(boost); + } + + protected void doSetBoost_Equal(final java.math.BigDecimal boost) { + regBoost(CK_EQ, boost); + } + + /** + * NotEqual(<>). And NullIgnored, OnlyOnceRegistered.
+ * BOOST: {NotNull, DOUBLE(17)} + * @param boost The value of boost as notEqual. (NullAllowed: if null, no condition) + */ + public void setBoost_NotEqual(final java.math.BigDecimal boost) { + doSetBoost_NotEqual(boost); + } + + protected void doSetBoost_NotEqual(final java.math.BigDecimal boost) { + regBoost(CK_NES, boost); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * BOOST: {NotNull, DOUBLE(17)} + * @param boost The value of boost as greaterThan. (NullAllowed: if null, no condition) + */ + public void setBoost_GreaterThan(final java.math.BigDecimal boost) { + regBoost(CK_GT, boost); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * BOOST: {NotNull, DOUBLE(17)} + * @param boost The value of boost as lessThan. (NullAllowed: if null, no condition) + */ + public void setBoost_LessThan(final java.math.BigDecimal boost) { + regBoost(CK_LT, boost); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * BOOST: {NotNull, DOUBLE(17)} + * @param boost The value of boost as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setBoost_GreaterEqual(final java.math.BigDecimal boost) { + regBoost(CK_GE, boost); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * BOOST: {NotNull, DOUBLE(17)} + * @param boost The value of boost as lessEqual. (NullAllowed: if null, no condition) + */ + public void setBoost_LessEqual(final java.math.BigDecimal boost) { + regBoost(CK_LE, boost); + } + + /** + * RangeOf with various options. (versatile)
+ * {(default) minNumber <= column <= maxNumber}
+ * And NullIgnored, OnlyOnceRegistered.
+ * BOOST: {NotNull, DOUBLE(17)} + * @param minNumber The min number of boost. (NullAllowed: if null, no from-condition) + * @param maxNumber The max number of boost. (NullAllowed: if null, no to-condition) + * @param rangeOfOption The option of range-of. (NotNull) + */ + public void setBoost_RangeOf(final java.math.BigDecimal minNumber, + final java.math.BigDecimal maxNumber, + final RangeOfOption rangeOfOption) { + regROO(minNumber, maxNumber, getCValueBoost(), "BOOST", rangeOfOption); + } + + /** + * InScope {in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered.
+ * BOOST: {NotNull, DOUBLE(17)} + * @param boostList The collection of boost as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setBoost_InScope( + final Collection boostList) { + doSetBoost_InScope(boostList); + } + + protected void doSetBoost_InScope( + final Collection boostList) { + regINS(CK_INS, cTL(boostList), getCValueBoost(), "BOOST"); + } + + /** + * NotInScope {not in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered.
+ * BOOST: {NotNull, DOUBLE(17)} + * @param boostList The collection of boost as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setBoost_NotInScope( + final Collection boostList) { + doSetBoost_NotInScope(boostList); + } + + protected void doSetBoost_NotInScope( + final Collection boostList) { + regINS(CK_NINS, cTL(boostList), getCValueBoost(), "BOOST"); + } + + protected void regBoost(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueBoost(), "BOOST"); + } + + protected abstract ConditionValue getCValueBoost(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_Equal(final String createdBy) { + doSetCreatedBy_Equal(fRES(createdBy)); + } + + protected void doSetCreatedBy_Equal(final String createdBy) { + regCreatedBy(CK_EQ, createdBy); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_NotEqual(final String createdBy) { + doSetCreatedBy_NotEqual(fRES(createdBy)); + } + + protected void doSetCreatedBy_NotEqual(final String createdBy) { + regCreatedBy(CK_NES, createdBy); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_GreaterThan(final String createdBy) { + regCreatedBy(CK_GT, fRES(createdBy)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_LessThan(final String createdBy) { + regCreatedBy(CK_LT, fRES(createdBy)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_GreaterEqual(final String createdBy) { + regCreatedBy(CK_GE, fRES(createdBy)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_LessEqual(final String createdBy) { + regCreatedBy(CK_LE, fRES(createdBy)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdByList The collection of createdBy as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_InScope(final Collection createdByList) { + doSetCreatedBy_InScope(createdByList); + } + + public void doSetCreatedBy_InScope(final Collection createdByList) { + regINS(CK_INS, cTL(createdByList), getCValueCreatedBy(), "CREATED_BY"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdByList The collection of createdBy as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_NotInScope(final Collection createdByList) { + doSetCreatedBy_NotInScope(createdByList); + } + + public void doSetCreatedBy_NotInScope(final Collection createdByList) { + regINS(CK_NINS, cTL(createdByList), getCValueCreatedBy(), "CREATED_BY"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setCreatedBy_PrefixSearch(final String createdBy) { + setCreatedBy_LikeSearch(createdBy, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)}
+ *
e.g. setCreatedBy_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param createdBy The value of createdBy as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setCreatedBy_LikeSearch(final String createdBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(createdBy), getCValueCreatedBy(), "CREATED_BY", + likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @param createdBy The value of createdBy as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setCreatedBy_NotLikeSearch(final String createdBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(createdBy), getCValueCreatedBy(), "CREATED_BY", + likeSearchOption); + } + + protected void regCreatedBy(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueCreatedBy(), "CREATED_BY"); + } + + protected abstract ConditionValue getCValueCreatedBy(); + + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @param createdTime The value of createdTime as equal. (NullAllowed: if null, no condition) + */ + public void setCreatedTime_Equal(final java.sql.Timestamp createdTime) { + regCreatedTime(CK_EQ, createdTime); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @param createdTime The value of createdTime as greaterThan. (NullAllowed: if null, no condition) + */ + public void setCreatedTime_GreaterThan(final java.sql.Timestamp createdTime) { + regCreatedTime(CK_GT, createdTime); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @param createdTime The value of createdTime as lessThan. (NullAllowed: if null, no condition) + */ + public void setCreatedTime_LessThan(final java.sql.Timestamp createdTime) { + regCreatedTime(CK_LT, createdTime); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @param createdTime The value of createdTime as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setCreatedTime_GreaterEqual(final java.sql.Timestamp createdTime) { + regCreatedTime(CK_GE, createdTime); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @param createdTime The value of createdTime as lessEqual. (NullAllowed: if null, no condition) + */ + public void setCreatedTime_LessEqual(final java.sql.Timestamp createdTime) { + regCreatedTime(CK_LE, createdTime); + } + + /** + * FromTo with various options. (versatile) {(default) fromDatetime <= column <= toDatetime}
+ * And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + *
e.g. setCreatedTime_FromTo(fromDate, toDate, new FromToOption().compareAsDate());
+ * @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of createdTime. (NullAllowed: if null, no from-condition) + * @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of createdTime. (NullAllowed: if null, no to-condition) + * @param fromToOption The option of from-to. (NotNull) + */ + public void setCreatedTime_FromTo(final Date fromDatetime, + final Date toDatetime, final FromToOption fromToOption) { + regFTQ(fromDatetime != null ? new java.sql.Timestamp( + fromDatetime.getTime()) : null, + toDatetime != null ? new java.sql.Timestamp(toDatetime + .getTime()) : null, getCValueCreatedTime(), + "CREATED_TIME", fromToOption); + } + + /** + * DateFromTo. (Date means yyyy/MM/dd) {fromDate <= column < toDate + 1 day}
+ * And NullIgnored, OnlyOnceRegistered.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + *
+     * e.g. from:{2007/04/10 08:24:53} to:{2007/04/16 14:36:29}
+     *  column >= '2007/04/10 00:00:00' and column < '2007/04/17 00:00:00'
+     * 
+ * @param fromDate The from-date(yyyy/MM/dd) of createdTime. (NullAllowed: if null, no from-condition) + * @param toDate The to-date(yyyy/MM/dd) of createdTime. (NullAllowed: if null, no to-condition) + */ + public void setCreatedTime_DateFromTo(final Date fromDate, final Date toDate) { + setCreatedTime_FromTo(fromDate, toDate, + new FromToOption().compareAsDate()); + } + + protected void regCreatedTime(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueCreatedTime(), "CREATED_TIME"); + } + + protected abstract ConditionValue getCValueCreatedTime(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_Equal(final String updatedBy) { + doSetUpdatedBy_Equal(fRES(updatedBy)); + } + + protected void doSetUpdatedBy_Equal(final String updatedBy) { + regUpdatedBy(CK_EQ, updatedBy); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_NotEqual(final String updatedBy) { + doSetUpdatedBy_NotEqual(fRES(updatedBy)); + } + + protected void doSetUpdatedBy_NotEqual(final String updatedBy) { + regUpdatedBy(CK_NES, updatedBy); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_GreaterThan(final String updatedBy) { + regUpdatedBy(CK_GT, fRES(updatedBy)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_LessThan(final String updatedBy) { + regUpdatedBy(CK_LT, fRES(updatedBy)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_GreaterEqual(final String updatedBy) { + regUpdatedBy(CK_GE, fRES(updatedBy)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_LessEqual(final String updatedBy) { + regUpdatedBy(CK_LE, fRES(updatedBy)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedByList The collection of updatedBy as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_InScope(final Collection updatedByList) { + doSetUpdatedBy_InScope(updatedByList); + } + + public void doSetUpdatedBy_InScope(final Collection updatedByList) { + regINS(CK_INS, cTL(updatedByList), getCValueUpdatedBy(), "UPDATED_BY"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedByList The collection of updatedBy as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_NotInScope(final Collection updatedByList) { + doSetUpdatedBy_NotInScope(updatedByList); + } + + public void doSetUpdatedBy_NotInScope(final Collection updatedByList) { + regINS(CK_NINS, cTL(updatedByList), getCValueUpdatedBy(), "UPDATED_BY"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setUpdatedBy_PrefixSearch(final String updatedBy) { + setUpdatedBy_LikeSearch(updatedBy, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * UPDATED_BY: {VARCHAR(255)}
+ *
e.g. setUpdatedBy_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param updatedBy The value of updatedBy as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setUpdatedBy_LikeSearch(final String updatedBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(updatedBy), getCValueUpdatedBy(), "UPDATED_BY", + likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + * @param updatedBy The value of updatedBy as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setUpdatedBy_NotLikeSearch(final String updatedBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(updatedBy), getCValueUpdatedBy(), "UPDATED_BY", + likeSearchOption); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + */ + public void setUpdatedBy_IsNull() { + regUpdatedBy(CK_ISN, DOBJ); + } + + /** + * IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + */ + public void setUpdatedBy_IsNullOrEmpty() { + regUpdatedBy(CK_ISNOE, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * UPDATED_BY: {VARCHAR(255)} + */ + public void setUpdatedBy_IsNotNull() { + regUpdatedBy(CK_ISNN, DOBJ); + } + + protected void regUpdatedBy(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueUpdatedBy(), "UPDATED_BY"); + } + + protected abstract ConditionValue getCValueUpdatedBy(); + + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @param updatedTime The value of updatedTime as equal. (NullAllowed: if null, no condition) + */ + public void setUpdatedTime_Equal(final java.sql.Timestamp updatedTime) { + regUpdatedTime(CK_EQ, updatedTime); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @param updatedTime The value of updatedTime as greaterThan. (NullAllowed: if null, no condition) + */ + public void setUpdatedTime_GreaterThan(final java.sql.Timestamp updatedTime) { + regUpdatedTime(CK_GT, updatedTime); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @param updatedTime The value of updatedTime as lessThan. (NullAllowed: if null, no condition) + */ + public void setUpdatedTime_LessThan(final java.sql.Timestamp updatedTime) { + regUpdatedTime(CK_LT, updatedTime); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @param updatedTime The value of updatedTime as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setUpdatedTime_GreaterEqual(final java.sql.Timestamp updatedTime) { + regUpdatedTime(CK_GE, updatedTime); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @param updatedTime The value of updatedTime as lessEqual. (NullAllowed: if null, no condition) + */ + public void setUpdatedTime_LessEqual(final java.sql.Timestamp updatedTime) { + regUpdatedTime(CK_LE, updatedTime); + } + + /** + * FromTo with various options. (versatile) {(default) fromDatetime <= column <= toDatetime}
+ * And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + *
e.g. setUpdatedTime_FromTo(fromDate, toDate, new FromToOption().compareAsDate());
+ * @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of updatedTime. (NullAllowed: if null, no from-condition) + * @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of updatedTime. (NullAllowed: if null, no to-condition) + * @param fromToOption The option of from-to. (NotNull) + */ + public void setUpdatedTime_FromTo(final Date fromDatetime, + final Date toDatetime, final FromToOption fromToOption) { + regFTQ(fromDatetime != null ? new java.sql.Timestamp( + fromDatetime.getTime()) : null, + toDatetime != null ? new java.sql.Timestamp(toDatetime + .getTime()) : null, getCValueUpdatedTime(), + "UPDATED_TIME", fromToOption); + } + + /** + * DateFromTo. (Date means yyyy/MM/dd) {fromDate <= column < toDate + 1 day}
+ * And NullIgnored, OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + *
+     * e.g. from:{2007/04/10 08:24:53} to:{2007/04/16 14:36:29}
+     *  column >= '2007/04/10 00:00:00' and column < '2007/04/17 00:00:00'
+     * 
+ * @param fromDate The from-date(yyyy/MM/dd) of updatedTime. (NullAllowed: if null, no from-condition) + * @param toDate The to-date(yyyy/MM/dd) of updatedTime. (NullAllowed: if null, no to-condition) + */ + public void setUpdatedTime_DateFromTo(final Date fromDate, final Date toDate) { + setUpdatedTime_FromTo(fromDate, toDate, + new FromToOption().compareAsDate()); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + */ + public void setUpdatedTime_IsNull() { + regUpdatedTime(CK_ISN, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + */ + public void setUpdatedTime_IsNotNull() { + regUpdatedTime(CK_ISNN, DOBJ); + } + + protected void regUpdatedTime(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueUpdatedTime(), "UPDATED_TIME"); + } + + protected abstract ConditionValue getCValueUpdatedTime(); + + /** + * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as equal. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_Equal(final String deletedBy) { + doSetDeletedBy_Equal(fRES(deletedBy)); + } + + protected void doSetDeletedBy_Equal(final String deletedBy) { + regDeletedBy(CK_EQ, deletedBy); + } + + /** + * NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as notEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_NotEqual(final String deletedBy) { + doSetDeletedBy_NotEqual(fRES(deletedBy)); + } + + protected void doSetDeletedBy_NotEqual(final String deletedBy) { + regDeletedBy(CK_NES, deletedBy); + } + + /** + * GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as greaterThan. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_GreaterThan(final String deletedBy) { + regDeletedBy(CK_GT, fRES(deletedBy)); + } + + /** + * LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as lessThan. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_LessThan(final String deletedBy) { + regDeletedBy(CK_LT, fRES(deletedBy)); + } + + /** + * GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as greaterEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_GreaterEqual(final String deletedBy) { + regDeletedBy(CK_GE, fRES(deletedBy)); + } + + /** + * LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as lessEqual. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_LessEqual(final String deletedBy) { + regDeletedBy(CK_LE, fRES(deletedBy)); + } + + /** + * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedByList The collection of deletedBy as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_InScope(final Collection deletedByList) { + doSetDeletedBy_InScope(deletedByList); + } + + public void doSetDeletedBy_InScope(final Collection deletedByList) { + regINS(CK_INS, cTL(deletedByList), getCValueDeletedBy(), "DELETED_BY"); + } + + /** + * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedByList The collection of deletedBy as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_NotInScope(final Collection deletedByList) { + doSetDeletedBy_NotInScope(deletedByList); + } + + public void doSetDeletedBy_NotInScope(final Collection deletedByList) { + regINS(CK_NINS, cTL(deletedByList), getCValueDeletedBy(), "DELETED_BY"); + } + + /** + * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as prefixSearch. (NullAllowed: if null (or empty), no condition) + */ + public void setDeletedBy_PrefixSearch(final String deletedBy) { + setDeletedBy_LikeSearch(deletedBy, cLSOP()); + } + + /** + * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered.
+ * DELETED_BY: {VARCHAR(255)}
+ *
e.g. setDeletedBy_LikeSearch("xxx", new LikeSearchOption().likeContain());
+ * @param deletedBy The value of deletedBy as likeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of like-search. (NotNull) + */ + public void setDeletedBy_LikeSearch(final String deletedBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_LS, fRES(deletedBy), getCValueDeletedBy(), "DELETED_BY", + likeSearchOption); + } + + /** + * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...}
+ * And NullOrEmptyIgnored, SeveralRegistered.
+ * DELETED_BY: {VARCHAR(255)} + * @param deletedBy The value of deletedBy as notLikeSearch. (NullAllowed: if null (or empty), no condition) + * @param likeSearchOption The option of not-like-search. (NotNull) + */ + public void setDeletedBy_NotLikeSearch(final String deletedBy, + final LikeSearchOption likeSearchOption) { + regLSQ(CK_NLS, fRES(deletedBy), getCValueDeletedBy(), "DELETED_BY", + likeSearchOption); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + */ + public void setDeletedBy_IsNull() { + regDeletedBy(CK_ISN, DOBJ); + } + + /** + * IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + */ + public void setDeletedBy_IsNullOrEmpty() { + regDeletedBy(CK_ISNOE, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * DELETED_BY: {VARCHAR(255)} + */ + public void setDeletedBy_IsNotNull() { + regDeletedBy(CK_ISNN, DOBJ); + } + + protected void regDeletedBy(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueDeletedBy(), "DELETED_BY"); + } + + protected abstract ConditionValue getCValueDeletedBy(); + + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @param deletedTime The value of deletedTime as equal. (NullAllowed: if null, no condition) + */ + public void setDeletedTime_Equal(final java.sql.Timestamp deletedTime) { + regDeletedTime(CK_EQ, deletedTime); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @param deletedTime The value of deletedTime as greaterThan. (NullAllowed: if null, no condition) + */ + public void setDeletedTime_GreaterThan(final java.sql.Timestamp deletedTime) { + regDeletedTime(CK_GT, deletedTime); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @param deletedTime The value of deletedTime as lessThan. (NullAllowed: if null, no condition) + */ + public void setDeletedTime_LessThan(final java.sql.Timestamp deletedTime) { + regDeletedTime(CK_LT, deletedTime); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @param deletedTime The value of deletedTime as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setDeletedTime_GreaterEqual(final java.sql.Timestamp deletedTime) { + regDeletedTime(CK_GE, deletedTime); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @param deletedTime The value of deletedTime as lessEqual. (NullAllowed: if null, no condition) + */ + public void setDeletedTime_LessEqual(final java.sql.Timestamp deletedTime) { + regDeletedTime(CK_LE, deletedTime); + } + + /** + * FromTo with various options. (versatile) {(default) fromDatetime <= column <= toDatetime}
+ * And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + *
e.g. setDeletedTime_FromTo(fromDate, toDate, new FromToOption().compareAsDate());
+ * @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of deletedTime. (NullAllowed: if null, no from-condition) + * @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of deletedTime. (NullAllowed: if null, no to-condition) + * @param fromToOption The option of from-to. (NotNull) + */ + public void setDeletedTime_FromTo(final Date fromDatetime, + final Date toDatetime, final FromToOption fromToOption) { + regFTQ(fromDatetime != null ? new java.sql.Timestamp( + fromDatetime.getTime()) : null, + toDatetime != null ? new java.sql.Timestamp(toDatetime + .getTime()) : null, getCValueDeletedTime(), + "DELETED_TIME", fromToOption); + } + + /** + * DateFromTo. (Date means yyyy/MM/dd) {fromDate <= column < toDate + 1 day}
+ * And NullIgnored, OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + *
+     * e.g. from:{2007/04/10 08:24:53} to:{2007/04/16 14:36:29}
+     *  column >= '2007/04/10 00:00:00' and column < '2007/04/17 00:00:00'
+     * 
+ * @param fromDate The from-date(yyyy/MM/dd) of deletedTime. (NullAllowed: if null, no from-condition) + * @param toDate The to-date(yyyy/MM/dd) of deletedTime. (NullAllowed: if null, no to-condition) + */ + public void setDeletedTime_DateFromTo(final Date fromDate, final Date toDate) { + setDeletedTime_FromTo(fromDate, toDate, + new FromToOption().compareAsDate()); + } + + /** + * IsNull {is null}. And OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + */ + public void setDeletedTime_IsNull() { + regDeletedTime(CK_ISN, DOBJ); + } + + /** + * IsNotNull {is not null}. And OnlyOnceRegistered.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + */ + public void setDeletedTime_IsNotNull() { + regDeletedTime(CK_ISNN, DOBJ); + } + + protected void regDeletedTime(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueDeletedTime(), "DELETED_TIME"); + } + + protected abstract ConditionValue getCValueDeletedTime(); + + /** + * Equal(=). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as equal. (NullAllowed: if null, no condition) + */ + public void setVersionNo_Equal(final Integer versionNo) { + doSetVersionNo_Equal(versionNo); + } + + protected void doSetVersionNo_Equal(final Integer versionNo) { + regVersionNo(CK_EQ, versionNo); + } + + /** + * NotEqual(<>). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as notEqual. (NullAllowed: if null, no condition) + */ + public void setVersionNo_NotEqual(final Integer versionNo) { + doSetVersionNo_NotEqual(versionNo); + } + + protected void doSetVersionNo_NotEqual(final Integer versionNo) { + regVersionNo(CK_NES, versionNo); + } + + /** + * GreaterThan(>). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as greaterThan. (NullAllowed: if null, no condition) + */ + public void setVersionNo_GreaterThan(final Integer versionNo) { + regVersionNo(CK_GT, versionNo); + } + + /** + * LessThan(<). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as lessThan. (NullAllowed: if null, no condition) + */ + public void setVersionNo_LessThan(final Integer versionNo) { + regVersionNo(CK_LT, versionNo); + } + + /** + * GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as greaterEqual. (NullAllowed: if null, no condition) + */ + public void setVersionNo_GreaterEqual(final Integer versionNo) { + regVersionNo(CK_GE, versionNo); + } + + /** + * LessEqual(<=). And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNo The value of versionNo as lessEqual. (NullAllowed: if null, no condition) + */ + public void setVersionNo_LessEqual(final Integer versionNo) { + regVersionNo(CK_LE, versionNo); + } + + /** + * RangeOf with various options. (versatile)
+ * {(default) minNumber <= column <= maxNumber}
+ * And NullIgnored, OnlyOnceRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param minNumber The min number of versionNo. (NullAllowed: if null, no from-condition) + * @param maxNumber The max number of versionNo. (NullAllowed: if null, no to-condition) + * @param rangeOfOption The option of range-of. (NotNull) + */ + public void setVersionNo_RangeOf(final Integer minNumber, + final Integer maxNumber, final RangeOfOption rangeOfOption) { + regROO(minNumber, maxNumber, getCValueVersionNo(), "VERSION_NO", + rangeOfOption); + } + + /** + * InScope {in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNoList The collection of versionNo as inScope. (NullAllowed: if null (or empty), no condition) + */ + public void setVersionNo_InScope(final Collection versionNoList) { + doSetVersionNo_InScope(versionNoList); + } + + protected void doSetVersionNo_InScope( + final Collection versionNoList) { + regINS(CK_INS, cTL(versionNoList), getCValueVersionNo(), "VERSION_NO"); + } + + /** + * NotInScope {not in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @param versionNoList The collection of versionNo as notInScope. (NullAllowed: if null (or empty), no condition) + */ + public void setVersionNo_NotInScope(final Collection versionNoList) { + doSetVersionNo_NotInScope(versionNoList); + } + + protected void doSetVersionNo_NotInScope( + final Collection versionNoList) { + regINS(CK_NINS, cTL(versionNoList), getCValueVersionNo(), "VERSION_NO"); + } + + protected void regVersionNo(final ConditionKey ky, final Object vl) { + regQ(ky, vl, getCValueVersionNo(), "VERSION_NO"); + } + + protected abstract ConditionValue getCValueVersionNo(); + + // =================================================================================== + // ScalarCondition + // =============== + /** + * Prepare ScalarCondition as equal.
+ * {where FOO = (select max(BAR) from ...) + *
+     * cb.query().scalar_Equal().max(new SubQuery<SuggestElevateWordCB>() {
+     *     public void query(SuggestElevateWordCB subCB) {
+     *         subCB.specify().setXxx... // derived column for function
+     *         subCB.query().setYyy...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_Equal() { + return xcreateSSQFunction(CK_EQ, SuggestElevateWordCB.class); + } + + /** + * Prepare ScalarCondition as equal.
+ * {where FOO <> (select max(BAR) from ...) + *
+     * cb.query().scalar_NotEqual().max(new SubQuery<SuggestElevateWordCB>() {
+     *     public void query(SuggestElevateWordCB subCB) {
+     *         subCB.specify().setXxx... // derived column for function
+     *         subCB.query().setYyy...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_NotEqual() { + return xcreateSSQFunction(CK_NES, SuggestElevateWordCB.class); + } + + /** + * Prepare ScalarCondition as greaterThan.
+ * {where FOO > (select max(BAR) from ...) + *
+     * cb.query().scalar_GreaterThan().max(new SubQuery<SuggestElevateWordCB>() {
+     *     public void query(SuggestElevateWordCB subCB) {
+     *         subCB.specify().setFoo... // derived column for function
+     *         subCB.query().setBar...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_GreaterThan() { + return xcreateSSQFunction(CK_GT, SuggestElevateWordCB.class); + } + + /** + * Prepare ScalarCondition as lessThan.
+ * {where FOO < (select max(BAR) from ...) + *
+     * cb.query().scalar_LessThan().max(new SubQuery<SuggestElevateWordCB>() {
+     *     public void query(SuggestElevateWordCB subCB) {
+     *         subCB.specify().setFoo... // derived column for function
+     *         subCB.query().setBar...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_LessThan() { + return xcreateSSQFunction(CK_LT, SuggestElevateWordCB.class); + } + + /** + * Prepare ScalarCondition as greaterEqual.
+ * {where FOO >= (select max(BAR) from ...) + *
+     * cb.query().scalar_GreaterEqual().max(new SubQuery<SuggestElevateWordCB>() {
+     *     public void query(SuggestElevateWordCB subCB) {
+     *         subCB.specify().setFoo... // derived column for function
+     *         subCB.query().setBar...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_GreaterEqual() { + return xcreateSSQFunction(CK_GE, SuggestElevateWordCB.class); + } + + /** + * Prepare ScalarCondition as lessEqual.
+ * {where FOO <= (select max(BAR) from ...) + *
+     * cb.query().scalar_LessEqual().max(new SubQuery<SuggestElevateWordCB>() {
+     *     public void query(SuggestElevateWordCB subCB) {
+     *         subCB.specify().setFoo... // derived column for function
+     *         subCB.query().setBar...
+     *     }
+     * });
+     * 
+ * @return The object to set up a function. (NotNull) + */ + public HpSSQFunction scalar_LessEqual() { + return xcreateSSQFunction(CK_LE, SuggestElevateWordCB.class); + } + + @Override + @SuppressWarnings("unchecked") + protected void xscalarCondition(final String fn, + final SubQuery sq, final String rd, final HpSSQOption op) { + assertObjectNotNull("subQuery", sq); + final SuggestElevateWordCB cb = xcreateScalarConditionCB(); + sq.query((CB) cb); + final String pp = keepScalarCondition(cb.query()); // for saving query-value + op.setPartitionByCBean((CB) xcreateScalarConditionPartitionByCB()); // for using partition-by + registerScalarCondition(fn, cb.query(), pp, rd, op); + } + + public abstract String keepScalarCondition(SuggestElevateWordCQ sq); + + protected SuggestElevateWordCB xcreateScalarConditionCB() { + final SuggestElevateWordCB cb = newMyCB(); + cb.xsetupForScalarCondition(this); + return cb; + } + + protected SuggestElevateWordCB xcreateScalarConditionPartitionByCB() { + final SuggestElevateWordCB cb = newMyCB(); + cb.xsetupForScalarConditionPartitionBy(this); + return cb; + } + + // =================================================================================== + // MyselfDerived + // ============= + public void xsmyselfDerive(final String fn, + final SubQuery sq, final String al, + final DerivedReferrerOption op) { + assertObjectNotNull("subQuery", sq); + final SuggestElevateWordCB cb = new SuggestElevateWordCB(); + cb.xsetupForDerivedReferrer(this); + try { + lock(); + sq.query(cb); + } finally { + unlock(); + } + final String pp = keepSpecifyMyselfDerived(cb.query()); + final String pk = "ID"; + registerSpecifyMyselfDerived(fn, cb.query(), pk, pk, pp, + "myselfDerived", al, op); + } + + public abstract String keepSpecifyMyselfDerived(SuggestElevateWordCQ sq); + + /** + * Prepare for (Query)MyselfDerived (correlated sub-query). + * @return The object to set up a function for myself table. (NotNull) + */ + public HpQDRFunction myselfDerived() { + return xcreateQDRFunctionMyselfDerived(SuggestElevateWordCB.class); + } + + @Override + @SuppressWarnings("unchecked") + protected void xqderiveMyselfDerived( + final String fn, final SubQuery sq, final String rd, + final Object vl, final DerivedReferrerOption op) { + assertObjectNotNull("subQuery", sq); + final SuggestElevateWordCB cb = new SuggestElevateWordCB(); + cb.xsetupForDerivedReferrer(this); + sq.query((CB) cb); + final String pk = "ID"; + final String sqpp = keepQueryMyselfDerived(cb.query()); // for saving query-value. + final String prpp = keepQueryMyselfDerivedParameter(vl); + registerQueryMyselfDerived(fn, cb.query(), pk, pk, sqpp, + "myselfDerived", rd, vl, prpp, op); + } + + public abstract String keepQueryMyselfDerived(SuggestElevateWordCQ sq); + + public abstract String keepQueryMyselfDerivedParameter(Object vl); + + // =================================================================================== + // MyselfExists + // ============ + /** + * Prepare for MyselfExists (correlated sub-query). + * @param subQuery The implementation of sub-query. (NotNull) + */ + public void myselfExists(final SubQuery subQuery) { + assertObjectNotNull("subQuery", subQuery); + final SuggestElevateWordCB cb = new SuggestElevateWordCB(); + cb.xsetupForMyselfExists(this); + try { + lock(); + subQuery.query(cb); + } finally { + unlock(); + } + final String pp = keepMyselfExists(cb.query()); + registerMyselfExists(cb.query(), pp); + } + + public abstract String keepMyselfExists(SuggestElevateWordCQ sq); + + // =================================================================================== + // MyselfInScope + // ============= + /** + * Prepare for MyselfInScope (sub-query). + * @param subQuery The implementation of sub-query. (NotNull) + */ + public void myselfInScope(final SubQuery subQuery) { + assertObjectNotNull("subQuery", subQuery); + final SuggestElevateWordCB cb = new SuggestElevateWordCB(); + cb.xsetupForMyselfInScope(this); + try { + lock(); + subQuery.query(cb); + } finally { + unlock(); + } + final String pp = keepMyselfInScope(cb.query()); + registerMyselfInScope(cb.query(), pp); + } + + public abstract String keepMyselfInScope(SuggestElevateWordCQ sq); + + // =================================================================================== + // Manual Order + // ============ + /** + * Order along manual ordering information. + *
+     * MemberCB cb = new MemberCB();
+     * ManualOrderBean mob = new ManualOrderBean();
+     * mob.when_GreaterEqual(priorityDate); // e.g. 2000/01/01
+     * cb.query().addOrderBy_Birthdate_Asc().withManualOrder(mob);
+     * // order by 
+     * //   case
+     * //     when BIRTHDATE >= '2000/01/01' then 0
+     * //     else 1
+     * //   end asc, ...
+     *
+     * MemberCB cb = new MemberCB();
+     * ManualOrderBean mob = new ManualOrderBean();
+     * mob.when_Equal(CDef.MemberStatus.Withdrawal);
+     * mob.when_Equal(CDef.MemberStatus.Formalized);
+     * mob.when_Equal(CDef.MemberStatus.Provisional);
+     * cb.query().addOrderBy_MemberStatusCode_Asc().withManualOrder(mob);
+     * // order by 
+     * //   case
+     * //     when MEMBER_STATUS_CODE = 'WDL' then 0
+     * //     when MEMBER_STATUS_CODE = 'FML' then 1
+     * //     when MEMBER_STATUS_CODE = 'PRV' then 2
+     * //     else 3
+     * //   end asc, ...
+     * 
+ *

This function with Union is unsupported!

+ *

The order values are bound (treated as bind parameter).

+ * @param mob The bean of manual order containing order values. (NotNull) + */ + public void withManualOrder(final ManualOrderBean mob) { // is user public! + xdoWithManualOrder(mob); + } + + // =================================================================================== + // Small Adjustment + // ================ + /** + * Order along the list of manual values. #beforejava8
+ * This function with Union is unsupported!
+ * The order values are bound (treated as bind parameter). + *
+     * MemberCB cb = new MemberCB();
+     * List<CDef.MemberStatus> orderValueList = new ArrayList<CDef.MemberStatus>();
+     * orderValueList.add(CDef.MemberStatus.Withdrawal);
+     * orderValueList.add(CDef.MemberStatus.Formalized);
+     * orderValueList.add(CDef.MemberStatus.Provisional);
+     * cb.query().addOrderBy_MemberStatusCode_Asc().withManualOrder(orderValueList);
+     * // order by 
+     * //   case
+     * //     when MEMBER_STATUS_CODE = 'WDL' then 0
+     * //     when MEMBER_STATUS_CODE = 'FML' then 1
+     * //     when MEMBER_STATUS_CODE = 'PRV' then 2
+     * //     else 3
+     * //   end asc, ...
+     * 
+ * @param orderValueList The list of order values for manual ordering. (NotNull) + */ + public void withManualOrder(final List orderValueList) { // is user public! + assertObjectNotNull("withManualOrder(orderValueList)", orderValueList); + final ManualOrderBean manualOrderBean = new ManualOrderBean(); + manualOrderBean.acceptOrderValueList(orderValueList); + withManualOrder(manualOrderBean); + } + + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + + // =================================================================================== + // Very Internal + // ============= + protected SuggestElevateWordCB newMyCB() { + return new SuggestElevateWordCB(); + } + + // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + + protected String xabCQ() { + return SuggestElevateWordCQ.class.getName(); + } + + protected String xabLSO() { + return LikeSearchOption.class.getName(); + } + + protected String xabSSQS() { + return HpSSQSetupper.class.getName(); + } +} diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsUserInfoCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsUserInfoCQ.java index ad1746ebb..55e6ea8fd 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsUserInfoCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsUserInfoCQ.java @@ -81,7 +81,6 @@ public abstract class AbstractBsUserInfoCQ extends AbstractConditionQuery { // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -1097,6 +1096,9 @@ public abstract class AbstractBsUserInfoCQ extends AbstractConditionQuery { public abstract String keepMyselfInScope(UserInfoCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -1133,8 +1135,8 @@ public abstract class AbstractBsUserInfoCQ extends AbstractConditionQuery {
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -1163,6 +1165,11 @@ public abstract class AbstractBsUserInfoCQ extends AbstractConditionQuery { withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -1171,6 +1178,10 @@ public abstract class AbstractBsUserInfoCQ extends AbstractConditionQuery { } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return UserInfoCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsWebAuthenticationCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsWebAuthenticationCQ.java index 74d0f9708..26a18e2fc 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsWebAuthenticationCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsWebAuthenticationCQ.java @@ -79,7 +79,6 @@ public abstract class AbstractBsWebAuthenticationCQ extends // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -2445,6 +2444,9 @@ public abstract class AbstractBsWebAuthenticationCQ extends public abstract String keepMyselfInScope(WebAuthenticationCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -2481,8 +2483,8 @@ public abstract class AbstractBsWebAuthenticationCQ extends
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -2511,6 +2513,11 @@ public abstract class AbstractBsWebAuthenticationCQ extends withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -2519,6 +2526,10 @@ public abstract class AbstractBsWebAuthenticationCQ extends } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return WebAuthenticationCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsWebConfigToLabelTypeMappingCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsWebConfigToLabelTypeMappingCQ.java index 55be8c0e4..e99943480 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsWebConfigToLabelTypeMappingCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsWebConfigToLabelTypeMappingCQ.java @@ -17,6 +17,7 @@ package jp.sf.fess.db.cbean.cq.bs; import java.util.Collection; +import java.util.Date; import java.util.List; import jp.sf.fess.db.allcommon.DBMetaInstanceHandler; @@ -38,6 +39,7 @@ import org.seasar.dbflute.cbean.chelper.HpSSQOption; import org.seasar.dbflute.cbean.chelper.HpSSQSetupper; import org.seasar.dbflute.cbean.ckey.ConditionKey; import org.seasar.dbflute.cbean.coption.DerivedReferrerOption; +import org.seasar.dbflute.cbean.coption.FromToOption; import org.seasar.dbflute.cbean.coption.LikeSearchOption; import org.seasar.dbflute.cbean.coption.RangeOfOption; import org.seasar.dbflute.cbean.cvalue.ConditionValue; @@ -79,7 +81,6 @@ public abstract class AbstractBsWebConfigToLabelTypeMappingCQ extends // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -763,6 +764,9 @@ public abstract class AbstractBsWebConfigToLabelTypeMappingCQ extends public abstract String keepMyselfInScope(WebConfigToLabelTypeMappingCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -799,8 +803,8 @@ public abstract class AbstractBsWebConfigToLabelTypeMappingCQ extends
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -829,6 +833,11 @@ public abstract class AbstractBsWebConfigToLabelTypeMappingCQ extends withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -837,6 +846,10 @@ public abstract class AbstractBsWebConfigToLabelTypeMappingCQ extends } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return WebConfigToLabelTypeMappingCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsWebConfigToRoleTypeMappingCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsWebConfigToRoleTypeMappingCQ.java index 2c255dbaa..14cf250e3 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsWebConfigToRoleTypeMappingCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsWebConfigToRoleTypeMappingCQ.java @@ -17,6 +17,7 @@ package jp.sf.fess.db.cbean.cq.bs; import java.util.Collection; +import java.util.Date; import java.util.List; import jp.sf.fess.db.allcommon.DBMetaInstanceHandler; @@ -38,6 +39,7 @@ import org.seasar.dbflute.cbean.chelper.HpSSQOption; import org.seasar.dbflute.cbean.chelper.HpSSQSetupper; import org.seasar.dbflute.cbean.ckey.ConditionKey; import org.seasar.dbflute.cbean.coption.DerivedReferrerOption; +import org.seasar.dbflute.cbean.coption.FromToOption; import org.seasar.dbflute.cbean.coption.LikeSearchOption; import org.seasar.dbflute.cbean.coption.RangeOfOption; import org.seasar.dbflute.cbean.cvalue.ConditionValue; @@ -79,7 +81,6 @@ public abstract class AbstractBsWebConfigToRoleTypeMappingCQ extends // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -760,6 +761,9 @@ public abstract class AbstractBsWebConfigToRoleTypeMappingCQ extends public abstract String keepMyselfInScope(WebConfigToRoleTypeMappingCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -796,8 +800,8 @@ public abstract class AbstractBsWebConfigToRoleTypeMappingCQ extends
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -826,6 +830,11 @@ public abstract class AbstractBsWebConfigToRoleTypeMappingCQ extends withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -834,6 +843,10 @@ public abstract class AbstractBsWebConfigToRoleTypeMappingCQ extends } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return WebConfigToRoleTypeMappingCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsWebCrawlingConfigCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsWebCrawlingConfigCQ.java index 76eda095c..390912338 100644 --- a/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsWebCrawlingConfigCQ.java +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsWebCrawlingConfigCQ.java @@ -86,7 +86,6 @@ public abstract class AbstractBsWebCrawlingConfigCQ extends // =================================================================================== // Query // ===== - /** * Equal(=). And NullIgnored, OnlyOnceRegistered.
* ID: {PK, ID, NotNull, BIGINT(19)} @@ -4067,6 +4066,9 @@ public abstract class AbstractBsWebCrawlingConfigCQ extends public abstract String keepMyselfInScope(WebCrawlingConfigCQ sq); + // =================================================================================== + // Manual Order + // ============ /** * Order along manual ordering information. *
@@ -4103,8 +4105,8 @@ public abstract class AbstractBsWebCrawlingConfigCQ extends
     }
 
     // ===================================================================================
-    //                                                                          Compatible
-    //                                                                          ==========
+    //                                                                    Small Adjustment
+    //                                                                    ================
     /**
      * Order along the list of manual values. #beforejava8 
* This function with Union is unsupported!
@@ -4133,6 +4135,11 @@ public abstract class AbstractBsWebCrawlingConfigCQ extends withManualOrder(manualOrderBean); } + @Override + protected void filterFromToOption(final FromToOption option) { + option.allowOneSide(); + } + // =================================================================================== // Very Internal // ============= @@ -4141,6 +4148,10 @@ public abstract class AbstractBsWebCrawlingConfigCQ extends } // very internal (for suppressing warn about 'Not Use Import') + protected String xabUDT() { + return Date.class.getName(); + } + protected String xabCQ() { return WebCrawlingConfigCQ.class.getName(); } diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/BsBoostDocumentRuleCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/BsBoostDocumentRuleCQ.java new file mode 100644 index 000000000..adec6adb2 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/BsBoostDocumentRuleCQ.java @@ -0,0 +1,629 @@ +/* + * 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.cbean.cq.bs; + +import java.util.Map; + +import jp.sf.fess.db.cbean.BoostDocumentRuleCB; +import jp.sf.fess.db.cbean.cq.BoostDocumentRuleCQ; +import jp.sf.fess.db.cbean.cq.ciq.BoostDocumentRuleCIQ; + +import org.seasar.dbflute.cbean.ConditionQuery; +import org.seasar.dbflute.cbean.chelper.HpCalculator; +import org.seasar.dbflute.cbean.coption.ConditionOption; +import org.seasar.dbflute.cbean.cvalue.ConditionValue; +import org.seasar.dbflute.cbean.sqlclause.SqlClause; +import org.seasar.dbflute.exception.IllegalConditionBeanOperationException; + +/** + * The base condition-query of BOOST_DOCUMENT_RULE. + * @author DBFlute(AutoGenerator) + */ +public class BsBoostDocumentRuleCQ extends AbstractBsBoostDocumentRuleCQ { + + // =================================================================================== + // Attribute + // ========= + protected BoostDocumentRuleCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + public BsBoostDocumentRuleCQ(final ConditionQuery referrerQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel) { + super(referrerQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // InlineView/OrClause + // =================== + /** + * Prepare InlineView query.
+ * {select ... from ... left outer join (select * from BOOST_DOCUMENT_RULE) where FOO = [value] ...} + *
+     * cb.query().queryMemberStatus().inline().setFoo...;
+     * 
+ * @return The condition-query for InlineView query. (NotNull) + */ + public BoostDocumentRuleCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = xcreateCIQ(); + } + _inlineQuery.xsetOnClause(false); + return _inlineQuery; + } + + protected BoostDocumentRuleCIQ xcreateCIQ() { + final BoostDocumentRuleCIQ ciq = xnewCIQ(); + ciq.xsetBaseCB(_baseCB); + return ciq; + } + + protected BoostDocumentRuleCIQ xnewCIQ() { + return new BoostDocumentRuleCIQ(xgetReferrerQuery(), xgetSqlClause(), + xgetAliasName(), xgetNestLevel(), this); + } + + /** + * Prepare OnClause query.
+ * {select ... from ... left outer join BOOST_DOCUMENT_RULE on ... and FOO = [value] ...} + *
+     * cb.query().queryMemberStatus().on().setFoo...;
+     * 
+ * @return The condition-query for OnClause query. (NotNull) + * @throws IllegalConditionBeanOperationException When this condition-query is base query. + */ + public BoostDocumentRuleCIQ on() { + if (isBaseQuery()) { + throw new IllegalConditionBeanOperationException( + "OnClause for local table is unavailable!"); + } + final BoostDocumentRuleCIQ inlineQuery = inline(); + inlineQuery.xsetOnClause(true); + return inlineQuery; + } + + // =================================================================================== + // Query + // ===== + protected ConditionValue _id; + + public ConditionValue getId() { + if (_id == null) { + _id = nCV(); + } + return _id; + } + + @Override + protected ConditionValue getCValueId() { + return getId(); + } + + /** + * Add order-by as ascend.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_Id_Asc() { + regOBA("ID"); + return this; + } + + /** + * Add order-by as descend.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_Id_Desc() { + regOBD("ID"); + return this; + } + + protected ConditionValue _urlExpr; + + public ConditionValue getUrlExpr() { + if (_urlExpr == null) { + _urlExpr = nCV(); + } + return _urlExpr; + } + + @Override + protected ConditionValue getCValueUrlExpr() { + return getUrlExpr(); + } + + /** + * Add order-by as ascend.
+ * URL_EXPR: {NotNull, VARCHAR(4000)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_UrlExpr_Asc() { + regOBA("URL_EXPR"); + return this; + } + + /** + * Add order-by as descend.
+ * URL_EXPR: {NotNull, VARCHAR(4000)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_UrlExpr_Desc() { + regOBD("URL_EXPR"); + return this; + } + + protected ConditionValue _boostExpr; + + public ConditionValue getBoostExpr() { + if (_boostExpr == null) { + _boostExpr = nCV(); + } + return _boostExpr; + } + + @Override + protected ConditionValue getCValueBoostExpr() { + return getBoostExpr(); + } + + /** + * Add order-by as ascend.
+ * BOOST_EXPR: {NotNull, VARCHAR(4000)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_BoostExpr_Asc() { + regOBA("BOOST_EXPR"); + return this; + } + + /** + * Add order-by as descend.
+ * BOOST_EXPR: {NotNull, VARCHAR(4000)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_BoostExpr_Desc() { + regOBD("BOOST_EXPR"); + return this; + } + + protected ConditionValue _sortOrder; + + public ConditionValue getSortOrder() { + if (_sortOrder == null) { + _sortOrder = nCV(); + } + return _sortOrder; + } + + @Override + protected ConditionValue getCValueSortOrder() { + return getSortOrder(); + } + + /** + * Add order-by as ascend.
+ * SORT_ORDER: {NotNull, INTEGER(10)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_SortOrder_Asc() { + regOBA("SORT_ORDER"); + return this; + } + + /** + * Add order-by as descend.
+ * SORT_ORDER: {NotNull, INTEGER(10)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_SortOrder_Desc() { + regOBD("SORT_ORDER"); + return this; + } + + protected ConditionValue _createdBy; + + public ConditionValue getCreatedBy() { + if (_createdBy == null) { + _createdBy = nCV(); + } + return _createdBy; + } + + @Override + protected ConditionValue getCValueCreatedBy() { + return getCreatedBy(); + } + + /** + * Add order-by as ascend.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_CreatedBy_Asc() { + regOBA("CREATED_BY"); + return this; + } + + /** + * Add order-by as descend.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_CreatedBy_Desc() { + regOBD("CREATED_BY"); + return this; + } + + protected ConditionValue _createdTime; + + public ConditionValue getCreatedTime() { + if (_createdTime == null) { + _createdTime = nCV(); + } + return _createdTime; + } + + @Override + protected ConditionValue getCValueCreatedTime() { + return getCreatedTime(); + } + + /** + * Add order-by as ascend.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_CreatedTime_Asc() { + regOBA("CREATED_TIME"); + return this; + } + + /** + * Add order-by as descend.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_CreatedTime_Desc() { + regOBD("CREATED_TIME"); + return this; + } + + protected ConditionValue _updatedBy; + + public ConditionValue getUpdatedBy() { + if (_updatedBy == null) { + _updatedBy = nCV(); + } + return _updatedBy; + } + + @Override + protected ConditionValue getCValueUpdatedBy() { + return getUpdatedBy(); + } + + /** + * Add order-by as ascend.
+ * UPDATED_BY: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_UpdatedBy_Asc() { + regOBA("UPDATED_BY"); + return this; + } + + /** + * Add order-by as descend.
+ * UPDATED_BY: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_UpdatedBy_Desc() { + regOBD("UPDATED_BY"); + return this; + } + + protected ConditionValue _updatedTime; + + public ConditionValue getUpdatedTime() { + if (_updatedTime == null) { + _updatedTime = nCV(); + } + return _updatedTime; + } + + @Override + protected ConditionValue getCValueUpdatedTime() { + return getUpdatedTime(); + } + + /** + * Add order-by as ascend.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_UpdatedTime_Asc() { + regOBA("UPDATED_TIME"); + return this; + } + + /** + * Add order-by as descend.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_UpdatedTime_Desc() { + regOBD("UPDATED_TIME"); + return this; + } + + protected ConditionValue _deletedBy; + + public ConditionValue getDeletedBy() { + if (_deletedBy == null) { + _deletedBy = nCV(); + } + return _deletedBy; + } + + @Override + protected ConditionValue getCValueDeletedBy() { + return getDeletedBy(); + } + + /** + * Add order-by as ascend.
+ * DELETED_BY: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_DeletedBy_Asc() { + regOBA("DELETED_BY"); + return this; + } + + /** + * Add order-by as descend.
+ * DELETED_BY: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_DeletedBy_Desc() { + regOBD("DELETED_BY"); + return this; + } + + protected ConditionValue _deletedTime; + + public ConditionValue getDeletedTime() { + if (_deletedTime == null) { + _deletedTime = nCV(); + } + return _deletedTime; + } + + @Override + protected ConditionValue getCValueDeletedTime() { + return getDeletedTime(); + } + + /** + * Add order-by as ascend.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_DeletedTime_Asc() { + regOBA("DELETED_TIME"); + return this; + } + + /** + * Add order-by as descend.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_DeletedTime_Desc() { + regOBD("DELETED_TIME"); + return this; + } + + protected ConditionValue _versionNo; + + public ConditionValue getVersionNo() { + if (_versionNo == null) { + _versionNo = nCV(); + } + return _versionNo; + } + + @Override + protected ConditionValue getCValueVersionNo() { + return getVersionNo(); + } + + /** + * Add order-by as ascend.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_VersionNo_Asc() { + regOBA("VERSION_NO"); + return this; + } + + /** + * Add order-by as descend.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addOrderBy_VersionNo_Desc() { + regOBD("VERSION_NO"); + return this; + } + + // =================================================================================== + // SpecifiedDerivedOrderBy + // ======================= + /** + * Add order-by for specified derived column as ascend. + *
+     * cb.specify().derivedPurchaseList().max(new SubQuery<PurchaseCB>() {
+     *     public void query(PurchaseCB subCB) {
+     *         subCB.specify().columnPurchaseDatetime();
+     *     }
+     * }, aliasName);
+     * // order by [alias-name] asc
+     * cb.addSpecifiedDerivedOrderBy_Asc(aliasName);
+     * 
+ * @param aliasName The alias name specified at (Specify)DerivedReferrer. (NotNull) + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addSpecifiedDerivedOrderBy_Asc( + final String aliasName) { + registerSpecifiedDerivedOrderBy_Asc(aliasName); + return this; + } + + /** + * Add order-by for specified derived column as descend. + *
+     * cb.specify().derivedPurchaseList().max(new SubQuery<PurchaseCB>() {
+     *     public void query(PurchaseCB subCB) {
+     *         subCB.specify().columnPurchaseDatetime();
+     *     }
+     * }, aliasName);
+     * // order by [alias-name] desc
+     * cb.addSpecifiedDerivedOrderBy_Desc(aliasName);
+     * 
+ * @param aliasName The alias name specified at (Specify)DerivedReferrer. (NotNull) + * @return this. (NotNull) + */ + public BsBoostDocumentRuleCQ addSpecifiedDerivedOrderBy_Desc( + final String aliasName) { + registerSpecifiedDerivedOrderBy_Desc(aliasName); + return this; + } + + // =================================================================================== + // Union Query + // =========== + @Override + public void reflectRelationOnUnionQuery(final ConditionQuery bqs, + final ConditionQuery uqs) { + } + + // =================================================================================== + // Foreign Query + // ============= + @Override + protected Map xfindFixedConditionDynamicParameterMap( + final String property) { + return null; + } + + // =================================================================================== + // ScalarCondition + // =============== + public Map getScalarCondition() { + return xgetSQueMap("scalarCondition"); + } + + @Override + public String keepScalarCondition(final BoostDocumentRuleCQ sq) { + return xkeepSQue("scalarCondition", sq); + } + + // =================================================================================== + // MyselfDerived + // ============= + public Map getSpecifyMyselfDerived() { + return xgetSQueMap("specifyMyselfDerived"); + } + + @Override + public String keepSpecifyMyselfDerived(final BoostDocumentRuleCQ sq) { + return xkeepSQue("specifyMyselfDerived", sq); + } + + public Map getQueryMyselfDerived() { + return xgetSQueMap("queryMyselfDerived"); + } + + @Override + public String keepQueryMyselfDerived(final BoostDocumentRuleCQ sq) { + return xkeepSQue("queryMyselfDerived", sq); + } + + public Map getQueryMyselfDerivedParameter() { + return xgetSQuePmMap("queryMyselfDerived"); + } + + @Override + public String keepQueryMyselfDerivedParameter(final Object pm) { + return xkeepSQuePm("queryMyselfDerived", pm); + } + + // =================================================================================== + // MyselfExists + // ============ + protected Map _myselfExistsMap; + + public Map getMyselfExists() { + return xgetSQueMap("myselfExists"); + } + + @Override + public String keepMyselfExists(final BoostDocumentRuleCQ sq) { + return xkeepSQue("myselfExists", sq); + } + + // =================================================================================== + // MyselfInScope + // ============= + public Map getMyselfInScope() { + return xgetSQueMap("myselfInScope"); + } + + @Override + public String keepMyselfInScope(final BoostDocumentRuleCQ sq) { + return xkeepSQue("myselfInScope", sq); + } + + // =================================================================================== + // Very Internal + // ============= + // very internal (for suppressing warn about 'Not Use Import') + protected String xCB() { + return BoostDocumentRuleCB.class.getName(); + } + + protected String xCQ() { + return BoostDocumentRuleCQ.class.getName(); + } + + protected String xCHp() { + return HpCalculator.class.getName(); + } + + protected String xCOp() { + return ConditionOption.class.getName(); + } + + protected String xMap() { + return Map.class.getName(); + } +} diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/BsSuggestBadWordCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/BsSuggestBadWordCQ.java new file mode 100644 index 000000000..dfd379589 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/BsSuggestBadWordCQ.java @@ -0,0 +1,629 @@ +/* + * 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.cbean.cq.bs; + +import java.util.Map; + +import jp.sf.fess.db.cbean.SuggestBadWordCB; +import jp.sf.fess.db.cbean.cq.SuggestBadWordCQ; +import jp.sf.fess.db.cbean.cq.ciq.SuggestBadWordCIQ; + +import org.seasar.dbflute.cbean.ConditionQuery; +import org.seasar.dbflute.cbean.chelper.HpCalculator; +import org.seasar.dbflute.cbean.coption.ConditionOption; +import org.seasar.dbflute.cbean.cvalue.ConditionValue; +import org.seasar.dbflute.cbean.sqlclause.SqlClause; +import org.seasar.dbflute.exception.IllegalConditionBeanOperationException; + +/** + * The base condition-query of SUGGEST_BAD_WORD. + * @author DBFlute(AutoGenerator) + */ +public class BsSuggestBadWordCQ extends AbstractBsSuggestBadWordCQ { + + // =================================================================================== + // Attribute + // ========= + protected SuggestBadWordCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + public BsSuggestBadWordCQ(final ConditionQuery referrerQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel) { + super(referrerQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // InlineView/OrClause + // =================== + /** + * Prepare InlineView query.
+ * {select ... from ... left outer join (select * from SUGGEST_BAD_WORD) where FOO = [value] ...} + *
+     * cb.query().queryMemberStatus().inline().setFoo...;
+     * 
+ * @return The condition-query for InlineView query. (NotNull) + */ + public SuggestBadWordCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = xcreateCIQ(); + } + _inlineQuery.xsetOnClause(false); + return _inlineQuery; + } + + protected SuggestBadWordCIQ xcreateCIQ() { + final SuggestBadWordCIQ ciq = xnewCIQ(); + ciq.xsetBaseCB(_baseCB); + return ciq; + } + + protected SuggestBadWordCIQ xnewCIQ() { + return new SuggestBadWordCIQ(xgetReferrerQuery(), xgetSqlClause(), + xgetAliasName(), xgetNestLevel(), this); + } + + /** + * Prepare OnClause query.
+ * {select ... from ... left outer join SUGGEST_BAD_WORD on ... and FOO = [value] ...} + *
+     * cb.query().queryMemberStatus().on().setFoo...;
+     * 
+ * @return The condition-query for OnClause query. (NotNull) + * @throws IllegalConditionBeanOperationException When this condition-query is base query. + */ + public SuggestBadWordCIQ on() { + if (isBaseQuery()) { + throw new IllegalConditionBeanOperationException( + "OnClause for local table is unavailable!"); + } + final SuggestBadWordCIQ inlineQuery = inline(); + inlineQuery.xsetOnClause(true); + return inlineQuery; + } + + // =================================================================================== + // Query + // ===== + protected ConditionValue _id; + + public ConditionValue getId() { + if (_id == null) { + _id = nCV(); + } + return _id; + } + + @Override + protected ConditionValue getCValueId() { + return getId(); + } + + /** + * Add order-by as ascend.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_Id_Asc() { + regOBA("ID"); + return this; + } + + /** + * Add order-by as descend.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_Id_Desc() { + regOBD("ID"); + return this; + } + + protected ConditionValue _suggestWord; + + public ConditionValue getSuggestWord() { + if (_suggestWord == null) { + _suggestWord = nCV(); + } + return _suggestWord; + } + + @Override + protected ConditionValue getCValueSuggestWord() { + return getSuggestWord(); + } + + /** + * Add order-by as ascend.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_SuggestWord_Asc() { + regOBA("SUGGEST_WORD"); + return this; + } + + /** + * Add order-by as descend.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_SuggestWord_Desc() { + regOBD("SUGGEST_WORD"); + return this; + } + + protected ConditionValue _targetRole; + + public ConditionValue getTargetRole() { + if (_targetRole == null) { + _targetRole = nCV(); + } + return _targetRole; + } + + @Override + protected ConditionValue getCValueTargetRole() { + return getTargetRole(); + } + + /** + * Add order-by as ascend.
+ * TARGET_ROLE: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_TargetRole_Asc() { + regOBA("TARGET_ROLE"); + return this; + } + + /** + * Add order-by as descend.
+ * TARGET_ROLE: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_TargetRole_Desc() { + regOBD("TARGET_ROLE"); + return this; + } + + protected ConditionValue _targetLabel; + + public ConditionValue getTargetLabel() { + if (_targetLabel == null) { + _targetLabel = nCV(); + } + return _targetLabel; + } + + @Override + protected ConditionValue getCValueTargetLabel() { + return getTargetLabel(); + } + + /** + * Add order-by as ascend.
+ * TARGET_LABEL: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_TargetLabel_Asc() { + regOBA("TARGET_LABEL"); + return this; + } + + /** + * Add order-by as descend.
+ * TARGET_LABEL: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_TargetLabel_Desc() { + regOBD("TARGET_LABEL"); + return this; + } + + protected ConditionValue _createdBy; + + public ConditionValue getCreatedBy() { + if (_createdBy == null) { + _createdBy = nCV(); + } + return _createdBy; + } + + @Override + protected ConditionValue getCValueCreatedBy() { + return getCreatedBy(); + } + + /** + * Add order-by as ascend.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_CreatedBy_Asc() { + regOBA("CREATED_BY"); + return this; + } + + /** + * Add order-by as descend.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_CreatedBy_Desc() { + regOBD("CREATED_BY"); + return this; + } + + protected ConditionValue _createdTime; + + public ConditionValue getCreatedTime() { + if (_createdTime == null) { + _createdTime = nCV(); + } + return _createdTime; + } + + @Override + protected ConditionValue getCValueCreatedTime() { + return getCreatedTime(); + } + + /** + * Add order-by as ascend.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_CreatedTime_Asc() { + regOBA("CREATED_TIME"); + return this; + } + + /** + * Add order-by as descend.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_CreatedTime_Desc() { + regOBD("CREATED_TIME"); + return this; + } + + protected ConditionValue _updatedBy; + + public ConditionValue getUpdatedBy() { + if (_updatedBy == null) { + _updatedBy = nCV(); + } + return _updatedBy; + } + + @Override + protected ConditionValue getCValueUpdatedBy() { + return getUpdatedBy(); + } + + /** + * Add order-by as ascend.
+ * UPDATED_BY: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_UpdatedBy_Asc() { + regOBA("UPDATED_BY"); + return this; + } + + /** + * Add order-by as descend.
+ * UPDATED_BY: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_UpdatedBy_Desc() { + regOBD("UPDATED_BY"); + return this; + } + + protected ConditionValue _updatedTime; + + public ConditionValue getUpdatedTime() { + if (_updatedTime == null) { + _updatedTime = nCV(); + } + return _updatedTime; + } + + @Override + protected ConditionValue getCValueUpdatedTime() { + return getUpdatedTime(); + } + + /** + * Add order-by as ascend.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_UpdatedTime_Asc() { + regOBA("UPDATED_TIME"); + return this; + } + + /** + * Add order-by as descend.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_UpdatedTime_Desc() { + regOBD("UPDATED_TIME"); + return this; + } + + protected ConditionValue _deletedBy; + + public ConditionValue getDeletedBy() { + if (_deletedBy == null) { + _deletedBy = nCV(); + } + return _deletedBy; + } + + @Override + protected ConditionValue getCValueDeletedBy() { + return getDeletedBy(); + } + + /** + * Add order-by as ascend.
+ * DELETED_BY: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_DeletedBy_Asc() { + regOBA("DELETED_BY"); + return this; + } + + /** + * Add order-by as descend.
+ * DELETED_BY: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_DeletedBy_Desc() { + regOBD("DELETED_BY"); + return this; + } + + protected ConditionValue _deletedTime; + + public ConditionValue getDeletedTime() { + if (_deletedTime == null) { + _deletedTime = nCV(); + } + return _deletedTime; + } + + @Override + protected ConditionValue getCValueDeletedTime() { + return getDeletedTime(); + } + + /** + * Add order-by as ascend.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_DeletedTime_Asc() { + regOBA("DELETED_TIME"); + return this; + } + + /** + * Add order-by as descend.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_DeletedTime_Desc() { + regOBD("DELETED_TIME"); + return this; + } + + protected ConditionValue _versionNo; + + public ConditionValue getVersionNo() { + if (_versionNo == null) { + _versionNo = nCV(); + } + return _versionNo; + } + + @Override + protected ConditionValue getCValueVersionNo() { + return getVersionNo(); + } + + /** + * Add order-by as ascend.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_VersionNo_Asc() { + regOBA("VERSION_NO"); + return this; + } + + /** + * Add order-by as descend.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addOrderBy_VersionNo_Desc() { + regOBD("VERSION_NO"); + return this; + } + + // =================================================================================== + // SpecifiedDerivedOrderBy + // ======================= + /** + * Add order-by for specified derived column as ascend. + *
+     * cb.specify().derivedPurchaseList().max(new SubQuery<PurchaseCB>() {
+     *     public void query(PurchaseCB subCB) {
+     *         subCB.specify().columnPurchaseDatetime();
+     *     }
+     * }, aliasName);
+     * // order by [alias-name] asc
+     * cb.addSpecifiedDerivedOrderBy_Asc(aliasName);
+     * 
+ * @param aliasName The alias name specified at (Specify)DerivedReferrer. (NotNull) + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addSpecifiedDerivedOrderBy_Asc( + final String aliasName) { + registerSpecifiedDerivedOrderBy_Asc(aliasName); + return this; + } + + /** + * Add order-by for specified derived column as descend. + *
+     * cb.specify().derivedPurchaseList().max(new SubQuery<PurchaseCB>() {
+     *     public void query(PurchaseCB subCB) {
+     *         subCB.specify().columnPurchaseDatetime();
+     *     }
+     * }, aliasName);
+     * // order by [alias-name] desc
+     * cb.addSpecifiedDerivedOrderBy_Desc(aliasName);
+     * 
+ * @param aliasName The alias name specified at (Specify)DerivedReferrer. (NotNull) + * @return this. (NotNull) + */ + public BsSuggestBadWordCQ addSpecifiedDerivedOrderBy_Desc( + final String aliasName) { + registerSpecifiedDerivedOrderBy_Desc(aliasName); + return this; + } + + // =================================================================================== + // Union Query + // =========== + @Override + public void reflectRelationOnUnionQuery(final ConditionQuery bqs, + final ConditionQuery uqs) { + } + + // =================================================================================== + // Foreign Query + // ============= + @Override + protected Map xfindFixedConditionDynamicParameterMap( + final String property) { + return null; + } + + // =================================================================================== + // ScalarCondition + // =============== + public Map getScalarCondition() { + return xgetSQueMap("scalarCondition"); + } + + @Override + public String keepScalarCondition(final SuggestBadWordCQ sq) { + return xkeepSQue("scalarCondition", sq); + } + + // =================================================================================== + // MyselfDerived + // ============= + public Map getSpecifyMyselfDerived() { + return xgetSQueMap("specifyMyselfDerived"); + } + + @Override + public String keepSpecifyMyselfDerived(final SuggestBadWordCQ sq) { + return xkeepSQue("specifyMyselfDerived", sq); + } + + public Map getQueryMyselfDerived() { + return xgetSQueMap("queryMyselfDerived"); + } + + @Override + public String keepQueryMyselfDerived(final SuggestBadWordCQ sq) { + return xkeepSQue("queryMyselfDerived", sq); + } + + public Map getQueryMyselfDerivedParameter() { + return xgetSQuePmMap("queryMyselfDerived"); + } + + @Override + public String keepQueryMyselfDerivedParameter(final Object pm) { + return xkeepSQuePm("queryMyselfDerived", pm); + } + + // =================================================================================== + // MyselfExists + // ============ + protected Map _myselfExistsMap; + + public Map getMyselfExists() { + return xgetSQueMap("myselfExists"); + } + + @Override + public String keepMyselfExists(final SuggestBadWordCQ sq) { + return xkeepSQue("myselfExists", sq); + } + + // =================================================================================== + // MyselfInScope + // ============= + public Map getMyselfInScope() { + return xgetSQueMap("myselfInScope"); + } + + @Override + public String keepMyselfInScope(final SuggestBadWordCQ sq) { + return xkeepSQue("myselfInScope", sq); + } + + // =================================================================================== + // Very Internal + // ============= + // very internal (for suppressing warn about 'Not Use Import') + protected String xCB() { + return SuggestBadWordCB.class.getName(); + } + + protected String xCQ() { + return SuggestBadWordCQ.class.getName(); + } + + protected String xCHp() { + return HpCalculator.class.getName(); + } + + protected String xCOp() { + return ConditionOption.class.getName(); + } + + protected String xMap() { + return Map.class.getName(); + } +} diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/bs/BsSuggestElevateWordCQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/bs/BsSuggestElevateWordCQ.java new file mode 100644 index 000000000..47aa96176 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/cq/bs/BsSuggestElevateWordCQ.java @@ -0,0 +1,697 @@ +/* + * 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.cbean.cq.bs; + +import java.util.Map; + +import jp.sf.fess.db.cbean.SuggestElevateWordCB; +import jp.sf.fess.db.cbean.cq.SuggestElevateWordCQ; +import jp.sf.fess.db.cbean.cq.ciq.SuggestElevateWordCIQ; + +import org.seasar.dbflute.cbean.ConditionQuery; +import org.seasar.dbflute.cbean.chelper.HpCalculator; +import org.seasar.dbflute.cbean.coption.ConditionOption; +import org.seasar.dbflute.cbean.cvalue.ConditionValue; +import org.seasar.dbflute.cbean.sqlclause.SqlClause; +import org.seasar.dbflute.exception.IllegalConditionBeanOperationException; + +/** + * The base condition-query of SUGGEST_ELEVATE_WORD. + * @author DBFlute(AutoGenerator) + */ +public class BsSuggestElevateWordCQ extends AbstractBsSuggestElevateWordCQ { + + // =================================================================================== + // Attribute + // ========= + protected SuggestElevateWordCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + public BsSuggestElevateWordCQ(final ConditionQuery referrerQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel) { + super(referrerQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // InlineView/OrClause + // =================== + /** + * Prepare InlineView query.
+ * {select ... from ... left outer join (select * from SUGGEST_ELEVATE_WORD) where FOO = [value] ...} + *
+     * cb.query().queryMemberStatus().inline().setFoo...;
+     * 
+ * @return The condition-query for InlineView query. (NotNull) + */ + public SuggestElevateWordCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = xcreateCIQ(); + } + _inlineQuery.xsetOnClause(false); + return _inlineQuery; + } + + protected SuggestElevateWordCIQ xcreateCIQ() { + final SuggestElevateWordCIQ ciq = xnewCIQ(); + ciq.xsetBaseCB(_baseCB); + return ciq; + } + + protected SuggestElevateWordCIQ xnewCIQ() { + return new SuggestElevateWordCIQ(xgetReferrerQuery(), xgetSqlClause(), + xgetAliasName(), xgetNestLevel(), this); + } + + /** + * Prepare OnClause query.
+ * {select ... from ... left outer join SUGGEST_ELEVATE_WORD on ... and FOO = [value] ...} + *
+     * cb.query().queryMemberStatus().on().setFoo...;
+     * 
+ * @return The condition-query for OnClause query. (NotNull) + * @throws IllegalConditionBeanOperationException When this condition-query is base query. + */ + public SuggestElevateWordCIQ on() { + if (isBaseQuery()) { + throw new IllegalConditionBeanOperationException( + "OnClause for local table is unavailable!"); + } + final SuggestElevateWordCIQ inlineQuery = inline(); + inlineQuery.xsetOnClause(true); + return inlineQuery; + } + + // =================================================================================== + // Query + // ===== + protected ConditionValue _id; + + public ConditionValue getId() { + if (_id == null) { + _id = nCV(); + } + return _id; + } + + @Override + protected ConditionValue getCValueId() { + return getId(); + } + + /** + * Add order-by as ascend.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_Id_Asc() { + regOBA("ID"); + return this; + } + + /** + * Add order-by as descend.
+ * ID: {PK, ID, NotNull, BIGINT(19)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_Id_Desc() { + regOBD("ID"); + return this; + } + + protected ConditionValue _suggestWord; + + public ConditionValue getSuggestWord() { + if (_suggestWord == null) { + _suggestWord = nCV(); + } + return _suggestWord; + } + + @Override + protected ConditionValue getCValueSuggestWord() { + return getSuggestWord(); + } + + /** + * Add order-by as ascend.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_SuggestWord_Asc() { + regOBA("SUGGEST_WORD"); + return this; + } + + /** + * Add order-by as descend.
+ * SUGGEST_WORD: {NotNull, VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_SuggestWord_Desc() { + regOBD("SUGGEST_WORD"); + return this; + } + + protected ConditionValue _reading; + + public ConditionValue getReading() { + if (_reading == null) { + _reading = nCV(); + } + return _reading; + } + + @Override + protected ConditionValue getCValueReading() { + return getReading(); + } + + /** + * Add order-by as ascend.
+ * READING: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_Reading_Asc() { + regOBA("READING"); + return this; + } + + /** + * Add order-by as descend.
+ * READING: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_Reading_Desc() { + regOBD("READING"); + return this; + } + + protected ConditionValue _targetRole; + + public ConditionValue getTargetRole() { + if (_targetRole == null) { + _targetRole = nCV(); + } + return _targetRole; + } + + @Override + protected ConditionValue getCValueTargetRole() { + return getTargetRole(); + } + + /** + * Add order-by as ascend.
+ * TARGET_ROLE: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_TargetRole_Asc() { + regOBA("TARGET_ROLE"); + return this; + } + + /** + * Add order-by as descend.
+ * TARGET_ROLE: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_TargetRole_Desc() { + regOBD("TARGET_ROLE"); + return this; + } + + protected ConditionValue _targetLabel; + + public ConditionValue getTargetLabel() { + if (_targetLabel == null) { + _targetLabel = nCV(); + } + return _targetLabel; + } + + @Override + protected ConditionValue getCValueTargetLabel() { + return getTargetLabel(); + } + + /** + * Add order-by as ascend.
+ * TARGET_LABEL: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_TargetLabel_Asc() { + regOBA("TARGET_LABEL"); + return this; + } + + /** + * Add order-by as descend.
+ * TARGET_LABEL: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_TargetLabel_Desc() { + regOBD("TARGET_LABEL"); + return this; + } + + protected ConditionValue _boost; + + public ConditionValue getBoost() { + if (_boost == null) { + _boost = nCV(); + } + return _boost; + } + + @Override + protected ConditionValue getCValueBoost() { + return getBoost(); + } + + /** + * Add order-by as ascend.
+ * BOOST: {NotNull, DOUBLE(17)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_Boost_Asc() { + regOBA("BOOST"); + return this; + } + + /** + * Add order-by as descend.
+ * BOOST: {NotNull, DOUBLE(17)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_Boost_Desc() { + regOBD("BOOST"); + return this; + } + + protected ConditionValue _createdBy; + + public ConditionValue getCreatedBy() { + if (_createdBy == null) { + _createdBy = nCV(); + } + return _createdBy; + } + + @Override + protected ConditionValue getCValueCreatedBy() { + return getCreatedBy(); + } + + /** + * Add order-by as ascend.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_CreatedBy_Asc() { + regOBA("CREATED_BY"); + return this; + } + + /** + * Add order-by as descend.
+ * CREATED_BY: {NotNull, VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_CreatedBy_Desc() { + regOBD("CREATED_BY"); + return this; + } + + protected ConditionValue _createdTime; + + public ConditionValue getCreatedTime() { + if (_createdTime == null) { + _createdTime = nCV(); + } + return _createdTime; + } + + @Override + protected ConditionValue getCValueCreatedTime() { + return getCreatedTime(); + } + + /** + * Add order-by as ascend.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_CreatedTime_Asc() { + regOBA("CREATED_TIME"); + return this; + } + + /** + * Add order-by as descend.
+ * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_CreatedTime_Desc() { + regOBD("CREATED_TIME"); + return this; + } + + protected ConditionValue _updatedBy; + + public ConditionValue getUpdatedBy() { + if (_updatedBy == null) { + _updatedBy = nCV(); + } + return _updatedBy; + } + + @Override + protected ConditionValue getCValueUpdatedBy() { + return getUpdatedBy(); + } + + /** + * Add order-by as ascend.
+ * UPDATED_BY: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_UpdatedBy_Asc() { + regOBA("UPDATED_BY"); + return this; + } + + /** + * Add order-by as descend.
+ * UPDATED_BY: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_UpdatedBy_Desc() { + regOBD("UPDATED_BY"); + return this; + } + + protected ConditionValue _updatedTime; + + public ConditionValue getUpdatedTime() { + if (_updatedTime == null) { + _updatedTime = nCV(); + } + return _updatedTime; + } + + @Override + protected ConditionValue getCValueUpdatedTime() { + return getUpdatedTime(); + } + + /** + * Add order-by as ascend.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_UpdatedTime_Asc() { + regOBA("UPDATED_TIME"); + return this; + } + + /** + * Add order-by as descend.
+ * UPDATED_TIME: {TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_UpdatedTime_Desc() { + regOBD("UPDATED_TIME"); + return this; + } + + protected ConditionValue _deletedBy; + + public ConditionValue getDeletedBy() { + if (_deletedBy == null) { + _deletedBy = nCV(); + } + return _deletedBy; + } + + @Override + protected ConditionValue getCValueDeletedBy() { + return getDeletedBy(); + } + + /** + * Add order-by as ascend.
+ * DELETED_BY: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_DeletedBy_Asc() { + regOBA("DELETED_BY"); + return this; + } + + /** + * Add order-by as descend.
+ * DELETED_BY: {VARCHAR(255)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_DeletedBy_Desc() { + regOBD("DELETED_BY"); + return this; + } + + protected ConditionValue _deletedTime; + + public ConditionValue getDeletedTime() { + if (_deletedTime == null) { + _deletedTime = nCV(); + } + return _deletedTime; + } + + @Override + protected ConditionValue getCValueDeletedTime() { + return getDeletedTime(); + } + + /** + * Add order-by as ascend.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_DeletedTime_Asc() { + regOBA("DELETED_TIME"); + return this; + } + + /** + * Add order-by as descend.
+ * DELETED_TIME: {TIMESTAMP(23, 10)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_DeletedTime_Desc() { + regOBD("DELETED_TIME"); + return this; + } + + protected ConditionValue _versionNo; + + public ConditionValue getVersionNo() { + if (_versionNo == null) { + _versionNo = nCV(); + } + return _versionNo; + } + + @Override + protected ConditionValue getCValueVersionNo() { + return getVersionNo(); + } + + /** + * Add order-by as ascend.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_VersionNo_Asc() { + regOBA("VERSION_NO"); + return this; + } + + /** + * Add order-by as descend.
+ * VERSION_NO: {NotNull, INTEGER(10)} + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addOrderBy_VersionNo_Desc() { + regOBD("VERSION_NO"); + return this; + } + + // =================================================================================== + // SpecifiedDerivedOrderBy + // ======================= + /** + * Add order-by for specified derived column as ascend. + *
+     * cb.specify().derivedPurchaseList().max(new SubQuery<PurchaseCB>() {
+     *     public void query(PurchaseCB subCB) {
+     *         subCB.specify().columnPurchaseDatetime();
+     *     }
+     * }, aliasName);
+     * // order by [alias-name] asc
+     * cb.addSpecifiedDerivedOrderBy_Asc(aliasName);
+     * 
+ * @param aliasName The alias name specified at (Specify)DerivedReferrer. (NotNull) + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addSpecifiedDerivedOrderBy_Asc( + final String aliasName) { + registerSpecifiedDerivedOrderBy_Asc(aliasName); + return this; + } + + /** + * Add order-by for specified derived column as descend. + *
+     * cb.specify().derivedPurchaseList().max(new SubQuery<PurchaseCB>() {
+     *     public void query(PurchaseCB subCB) {
+     *         subCB.specify().columnPurchaseDatetime();
+     *     }
+     * }, aliasName);
+     * // order by [alias-name] desc
+     * cb.addSpecifiedDerivedOrderBy_Desc(aliasName);
+     * 
+ * @param aliasName The alias name specified at (Specify)DerivedReferrer. (NotNull) + * @return this. (NotNull) + */ + public BsSuggestElevateWordCQ addSpecifiedDerivedOrderBy_Desc( + final String aliasName) { + registerSpecifiedDerivedOrderBy_Desc(aliasName); + return this; + } + + // =================================================================================== + // Union Query + // =========== + @Override + public void reflectRelationOnUnionQuery(final ConditionQuery bqs, + final ConditionQuery uqs) { + } + + // =================================================================================== + // Foreign Query + // ============= + @Override + protected Map xfindFixedConditionDynamicParameterMap( + final String property) { + return null; + } + + // =================================================================================== + // ScalarCondition + // =============== + public Map getScalarCondition() { + return xgetSQueMap("scalarCondition"); + } + + @Override + public String keepScalarCondition(final SuggestElevateWordCQ sq) { + return xkeepSQue("scalarCondition", sq); + } + + // =================================================================================== + // MyselfDerived + // ============= + public Map getSpecifyMyselfDerived() { + return xgetSQueMap("specifyMyselfDerived"); + } + + @Override + public String keepSpecifyMyselfDerived(final SuggestElevateWordCQ sq) { + return xkeepSQue("specifyMyselfDerived", sq); + } + + public Map getQueryMyselfDerived() { + return xgetSQueMap("queryMyselfDerived"); + } + + @Override + public String keepQueryMyselfDerived(final SuggestElevateWordCQ sq) { + return xkeepSQue("queryMyselfDerived", sq); + } + + public Map getQueryMyselfDerivedParameter() { + return xgetSQuePmMap("queryMyselfDerived"); + } + + @Override + public String keepQueryMyselfDerivedParameter(final Object pm) { + return xkeepSQuePm("queryMyselfDerived", pm); + } + + // =================================================================================== + // MyselfExists + // ============ + protected Map _myselfExistsMap; + + public Map getMyselfExists() { + return xgetSQueMap("myselfExists"); + } + + @Override + public String keepMyselfExists(final SuggestElevateWordCQ sq) { + return xkeepSQue("myselfExists", sq); + } + + // =================================================================================== + // MyselfInScope + // ============= + public Map getMyselfInScope() { + return xgetSQueMap("myselfInScope"); + } + + @Override + public String keepMyselfInScope(final SuggestElevateWordCQ sq) { + return xkeepSQue("myselfInScope", sq); + } + + // =================================================================================== + // Very Internal + // ============= + // very internal (for suppressing warn about 'Not Use Import') + protected String xCB() { + return SuggestElevateWordCB.class.getName(); + } + + protected String xCQ() { + return SuggestElevateWordCQ.class.getName(); + } + + protected String xCHp() { + return HpCalculator.class.getName(); + } + + protected String xCOp() { + return ConditionOption.class.getName(); + } + + protected String xMap() { + return Map.class.getName(); + } +} diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/ciq/BoostDocumentRuleCIQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/ciq/BoostDocumentRuleCIQ.java new file mode 100644 index 000000000..d0b487f7f --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/cq/ciq/BoostDocumentRuleCIQ.java @@ -0,0 +1,211 @@ +/* + * 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.cbean.cq.ciq; + +import java.util.Map; + +import jp.sf.fess.db.cbean.BoostDocumentRuleCB; +import jp.sf.fess.db.cbean.cq.BoostDocumentRuleCQ; +import jp.sf.fess.db.cbean.cq.bs.AbstractBsBoostDocumentRuleCQ; +import jp.sf.fess.db.cbean.cq.bs.BsBoostDocumentRuleCQ; + +import org.seasar.dbflute.cbean.ConditionQuery; +import org.seasar.dbflute.cbean.ckey.ConditionKey; +import org.seasar.dbflute.cbean.coption.ConditionOption; +import org.seasar.dbflute.cbean.cvalue.ConditionValue; +import org.seasar.dbflute.cbean.sqlclause.SqlClause; +import org.seasar.dbflute.exception.IllegalConditionBeanOperationException; + +/** + * The condition-query for in-line of BOOST_DOCUMENT_RULE. + * @author DBFlute(AutoGenerator) + */ +public class BoostDocumentRuleCIQ extends AbstractBsBoostDocumentRuleCQ { + + // =================================================================================== + // Attribute + // ========= + protected BsBoostDocumentRuleCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + public BoostDocumentRuleCIQ(final ConditionQuery referrerQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel, final BsBoostDocumentRuleCQ myCQ) { + super(referrerQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + _foreignPropertyName = _myCQ.xgetForeignPropertyName(); // accept foreign property name + _relationPath = _myCQ.xgetRelationPath(); // accept relation path + _inline = true; + } + + // =================================================================================== + // Override about Register + // ======================= + @Override + protected void reflectRelationOnUnionQuery(final ConditionQuery bq, + final ConditionQuery uq) { + throw new IllegalConditionBeanOperationException( + "InlineView cannot use Union: " + bq + " : " + uq); + } + + @Override + protected void setupConditionValueAndRegisterWhereClause( + final ConditionKey k, final Object v, final ConditionValue cv, + final String col) { + regIQ(k, v, cv, col); + } + + @Override + protected void setupConditionValueAndRegisterWhereClause( + final ConditionKey k, final Object v, final ConditionValue cv, + final String col, final ConditionOption op) { + regIQ(k, v, cv, col, op); + } + + @Override + protected void registerWhereClause(final String wc) { + registerInlineWhereClause(wc); + } + + @Override + protected boolean isInScopeRelationSuppressLocalAliasName() { + if (_onClause) { + throw new IllegalConditionBeanOperationException( + "InScopeRelation on OnClause is unsupported."); + } + return true; + } + + // =================================================================================== + // Override about Query + // ==================== + @Override + protected ConditionValue getCValueId() { + return _myCQ.getId(); + } + + @Override + protected ConditionValue getCValueUrlExpr() { + return _myCQ.getUrlExpr(); + } + + @Override + protected ConditionValue getCValueBoostExpr() { + return _myCQ.getBoostExpr(); + } + + @Override + protected ConditionValue getCValueSortOrder() { + return _myCQ.getSortOrder(); + } + + @Override + protected ConditionValue getCValueCreatedBy() { + return _myCQ.getCreatedBy(); + } + + @Override + protected ConditionValue getCValueCreatedTime() { + return _myCQ.getCreatedTime(); + } + + @Override + protected ConditionValue getCValueUpdatedBy() { + return _myCQ.getUpdatedBy(); + } + + @Override + protected ConditionValue getCValueUpdatedTime() { + return _myCQ.getUpdatedTime(); + } + + @Override + protected ConditionValue getCValueDeletedBy() { + return _myCQ.getDeletedBy(); + } + + @Override + protected ConditionValue getCValueDeletedTime() { + return _myCQ.getDeletedTime(); + } + + @Override + protected ConditionValue getCValueVersionNo() { + return _myCQ.getVersionNo(); + } + + @Override + protected Map xfindFixedConditionDynamicParameterMap( + final String pp) { + return null; + } + + @Override + public String keepScalarCondition(final BoostDocumentRuleCQ sq) { + throwIICBOE("ScalarCondition"); + return null; + } + + @Override + public String keepSpecifyMyselfDerived(final BoostDocumentRuleCQ sq) { + throwIICBOE("(Specify)MyselfDerived"); + return null; + } + + @Override + public String keepQueryMyselfDerived(final BoostDocumentRuleCQ sq) { + throwIICBOE("(Query)MyselfDerived"); + return null; + } + + @Override + public String keepQueryMyselfDerivedParameter(final Object vl) { + throwIICBOE("(Query)MyselfDerived"); + return null; + } + + @Override + public String keepMyselfExists(final BoostDocumentRuleCQ sq) { + throwIICBOE("MyselfExists"); + return null; + } + + @Override + public String keepMyselfInScope(final BoostDocumentRuleCQ sq) { + throwIICBOE("MyselfInScope"); + return null; + } + + protected void throwIICBOE(final String name) { + throw new IllegalConditionBeanOperationException(name + + " at InlineView is unsupported."); + } + + // =================================================================================== + // Very Internal + // ============= + // very internal (for suppressing warn about 'Not Use Import') + protected String xinCB() { + return BoostDocumentRuleCB.class.getName(); + } + + protected String xinCQ() { + return BoostDocumentRuleCQ.class.getName(); + } +} diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/ciq/SuggestBadWordCIQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/ciq/SuggestBadWordCIQ.java new file mode 100644 index 000000000..f2a7cd086 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/cq/ciq/SuggestBadWordCIQ.java @@ -0,0 +1,211 @@ +/* + * 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.cbean.cq.ciq; + +import java.util.Map; + +import jp.sf.fess.db.cbean.SuggestBadWordCB; +import jp.sf.fess.db.cbean.cq.SuggestBadWordCQ; +import jp.sf.fess.db.cbean.cq.bs.AbstractBsSuggestBadWordCQ; +import jp.sf.fess.db.cbean.cq.bs.BsSuggestBadWordCQ; + +import org.seasar.dbflute.cbean.ConditionQuery; +import org.seasar.dbflute.cbean.ckey.ConditionKey; +import org.seasar.dbflute.cbean.coption.ConditionOption; +import org.seasar.dbflute.cbean.cvalue.ConditionValue; +import org.seasar.dbflute.cbean.sqlclause.SqlClause; +import org.seasar.dbflute.exception.IllegalConditionBeanOperationException; + +/** + * The condition-query for in-line of SUGGEST_BAD_WORD. + * @author DBFlute(AutoGenerator) + */ +public class SuggestBadWordCIQ extends AbstractBsSuggestBadWordCQ { + + // =================================================================================== + // Attribute + // ========= + protected BsSuggestBadWordCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + public SuggestBadWordCIQ(final ConditionQuery referrerQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel, final BsSuggestBadWordCQ myCQ) { + super(referrerQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + _foreignPropertyName = _myCQ.xgetForeignPropertyName(); // accept foreign property name + _relationPath = _myCQ.xgetRelationPath(); // accept relation path + _inline = true; + } + + // =================================================================================== + // Override about Register + // ======================= + @Override + protected void reflectRelationOnUnionQuery(final ConditionQuery bq, + final ConditionQuery uq) { + throw new IllegalConditionBeanOperationException( + "InlineView cannot use Union: " + bq + " : " + uq); + } + + @Override + protected void setupConditionValueAndRegisterWhereClause( + final ConditionKey k, final Object v, final ConditionValue cv, + final String col) { + regIQ(k, v, cv, col); + } + + @Override + protected void setupConditionValueAndRegisterWhereClause( + final ConditionKey k, final Object v, final ConditionValue cv, + final String col, final ConditionOption op) { + regIQ(k, v, cv, col, op); + } + + @Override + protected void registerWhereClause(final String wc) { + registerInlineWhereClause(wc); + } + + @Override + protected boolean isInScopeRelationSuppressLocalAliasName() { + if (_onClause) { + throw new IllegalConditionBeanOperationException( + "InScopeRelation on OnClause is unsupported."); + } + return true; + } + + // =================================================================================== + // Override about Query + // ==================== + @Override + protected ConditionValue getCValueId() { + return _myCQ.getId(); + } + + @Override + protected ConditionValue getCValueSuggestWord() { + return _myCQ.getSuggestWord(); + } + + @Override + protected ConditionValue getCValueTargetRole() { + return _myCQ.getTargetRole(); + } + + @Override + protected ConditionValue getCValueTargetLabel() { + return _myCQ.getTargetLabel(); + } + + @Override + protected ConditionValue getCValueCreatedBy() { + return _myCQ.getCreatedBy(); + } + + @Override + protected ConditionValue getCValueCreatedTime() { + return _myCQ.getCreatedTime(); + } + + @Override + protected ConditionValue getCValueUpdatedBy() { + return _myCQ.getUpdatedBy(); + } + + @Override + protected ConditionValue getCValueUpdatedTime() { + return _myCQ.getUpdatedTime(); + } + + @Override + protected ConditionValue getCValueDeletedBy() { + return _myCQ.getDeletedBy(); + } + + @Override + protected ConditionValue getCValueDeletedTime() { + return _myCQ.getDeletedTime(); + } + + @Override + protected ConditionValue getCValueVersionNo() { + return _myCQ.getVersionNo(); + } + + @Override + protected Map xfindFixedConditionDynamicParameterMap( + final String pp) { + return null; + } + + @Override + public String keepScalarCondition(final SuggestBadWordCQ sq) { + throwIICBOE("ScalarCondition"); + return null; + } + + @Override + public String keepSpecifyMyselfDerived(final SuggestBadWordCQ sq) { + throwIICBOE("(Specify)MyselfDerived"); + return null; + } + + @Override + public String keepQueryMyselfDerived(final SuggestBadWordCQ sq) { + throwIICBOE("(Query)MyselfDerived"); + return null; + } + + @Override + public String keepQueryMyselfDerivedParameter(final Object vl) { + throwIICBOE("(Query)MyselfDerived"); + return null; + } + + @Override + public String keepMyselfExists(final SuggestBadWordCQ sq) { + throwIICBOE("MyselfExists"); + return null; + } + + @Override + public String keepMyselfInScope(final SuggestBadWordCQ sq) { + throwIICBOE("MyselfInScope"); + return null; + } + + protected void throwIICBOE(final String name) { + throw new IllegalConditionBeanOperationException(name + + " at InlineView is unsupported."); + } + + // =================================================================================== + // Very Internal + // ============= + // very internal (for suppressing warn about 'Not Use Import') + protected String xinCB() { + return SuggestBadWordCB.class.getName(); + } + + protected String xinCQ() { + return SuggestBadWordCQ.class.getName(); + } +} diff --git a/src/main/java/jp/sf/fess/db/cbean/cq/ciq/SuggestElevateWordCIQ.java b/src/main/java/jp/sf/fess/db/cbean/cq/ciq/SuggestElevateWordCIQ.java new file mode 100644 index 000000000..d24bd050c --- /dev/null +++ b/src/main/java/jp/sf/fess/db/cbean/cq/ciq/SuggestElevateWordCIQ.java @@ -0,0 +1,221 @@ +/* + * 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.cbean.cq.ciq; + +import java.util.Map; + +import jp.sf.fess.db.cbean.SuggestElevateWordCB; +import jp.sf.fess.db.cbean.cq.SuggestElevateWordCQ; +import jp.sf.fess.db.cbean.cq.bs.AbstractBsSuggestElevateWordCQ; +import jp.sf.fess.db.cbean.cq.bs.BsSuggestElevateWordCQ; + +import org.seasar.dbflute.cbean.ConditionQuery; +import org.seasar.dbflute.cbean.ckey.ConditionKey; +import org.seasar.dbflute.cbean.coption.ConditionOption; +import org.seasar.dbflute.cbean.cvalue.ConditionValue; +import org.seasar.dbflute.cbean.sqlclause.SqlClause; +import org.seasar.dbflute.exception.IllegalConditionBeanOperationException; + +/** + * The condition-query for in-line of SUGGEST_ELEVATE_WORD. + * @author DBFlute(AutoGenerator) + */ +public class SuggestElevateWordCIQ extends AbstractBsSuggestElevateWordCQ { + + // =================================================================================== + // Attribute + // ========= + protected BsSuggestElevateWordCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + public SuggestElevateWordCIQ(final ConditionQuery referrerQuery, + final SqlClause sqlClause, final String aliasName, + final int nestLevel, final BsSuggestElevateWordCQ myCQ) { + super(referrerQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + _foreignPropertyName = _myCQ.xgetForeignPropertyName(); // accept foreign property name + _relationPath = _myCQ.xgetRelationPath(); // accept relation path + _inline = true; + } + + // =================================================================================== + // Override about Register + // ======================= + @Override + protected void reflectRelationOnUnionQuery(final ConditionQuery bq, + final ConditionQuery uq) { + throw new IllegalConditionBeanOperationException( + "InlineView cannot use Union: " + bq + " : " + uq); + } + + @Override + protected void setupConditionValueAndRegisterWhereClause( + final ConditionKey k, final Object v, final ConditionValue cv, + final String col) { + regIQ(k, v, cv, col); + } + + @Override + protected void setupConditionValueAndRegisterWhereClause( + final ConditionKey k, final Object v, final ConditionValue cv, + final String col, final ConditionOption op) { + regIQ(k, v, cv, col, op); + } + + @Override + protected void registerWhereClause(final String wc) { + registerInlineWhereClause(wc); + } + + @Override + protected boolean isInScopeRelationSuppressLocalAliasName() { + if (_onClause) { + throw new IllegalConditionBeanOperationException( + "InScopeRelation on OnClause is unsupported."); + } + return true; + } + + // =================================================================================== + // Override about Query + // ==================== + @Override + protected ConditionValue getCValueId() { + return _myCQ.getId(); + } + + @Override + protected ConditionValue getCValueSuggestWord() { + return _myCQ.getSuggestWord(); + } + + @Override + protected ConditionValue getCValueReading() { + return _myCQ.getReading(); + } + + @Override + protected ConditionValue getCValueTargetRole() { + return _myCQ.getTargetRole(); + } + + @Override + protected ConditionValue getCValueTargetLabel() { + return _myCQ.getTargetLabel(); + } + + @Override + protected ConditionValue getCValueBoost() { + return _myCQ.getBoost(); + } + + @Override + protected ConditionValue getCValueCreatedBy() { + return _myCQ.getCreatedBy(); + } + + @Override + protected ConditionValue getCValueCreatedTime() { + return _myCQ.getCreatedTime(); + } + + @Override + protected ConditionValue getCValueUpdatedBy() { + return _myCQ.getUpdatedBy(); + } + + @Override + protected ConditionValue getCValueUpdatedTime() { + return _myCQ.getUpdatedTime(); + } + + @Override + protected ConditionValue getCValueDeletedBy() { + return _myCQ.getDeletedBy(); + } + + @Override + protected ConditionValue getCValueDeletedTime() { + return _myCQ.getDeletedTime(); + } + + @Override + protected ConditionValue getCValueVersionNo() { + return _myCQ.getVersionNo(); + } + + @Override + protected Map xfindFixedConditionDynamicParameterMap( + final String pp) { + return null; + } + + @Override + public String keepScalarCondition(final SuggestElevateWordCQ sq) { + throwIICBOE("ScalarCondition"); + return null; + } + + @Override + public String keepSpecifyMyselfDerived(final SuggestElevateWordCQ sq) { + throwIICBOE("(Specify)MyselfDerived"); + return null; + } + + @Override + public String keepQueryMyselfDerived(final SuggestElevateWordCQ sq) { + throwIICBOE("(Query)MyselfDerived"); + return null; + } + + @Override + public String keepQueryMyselfDerivedParameter(final Object vl) { + throwIICBOE("(Query)MyselfDerived"); + return null; + } + + @Override + public String keepMyselfExists(final SuggestElevateWordCQ sq) { + throwIICBOE("MyselfExists"); + return null; + } + + @Override + public String keepMyselfInScope(final SuggestElevateWordCQ sq) { + throwIICBOE("MyselfInScope"); + return null; + } + + protected void throwIICBOE(final String name) { + throw new IllegalConditionBeanOperationException(name + + " at InlineView is unsupported."); + } + + // =================================================================================== + // Very Internal + // ============= + // very internal (for suppressing warn about 'Not Use Import') + protected String xinCB() { + return SuggestElevateWordCB.class.getName(); + } + + protected String xinCQ() { + return SuggestElevateWordCQ.class.getName(); + } +} diff --git a/src/main/java/jp/sf/fess/db/exbhv/BoostDocumentRuleBhv.java b/src/main/java/jp/sf/fess/db/exbhv/BoostDocumentRuleBhv.java new file mode 100644 index 000000000..1c4b77b0f --- /dev/null +++ b/src/main/java/jp/sf/fess/db/exbhv/BoostDocumentRuleBhv.java @@ -0,0 +1,30 @@ +/* + * 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.exbhv; + +import jp.sf.fess.db.bsbhv.BsBoostDocumentRuleBhv; + +/** + * The behavior of BOOST_DOCUMENT_RULE. + *

+ * You can implement your original methods here. + * This class remains when re-generating. + *

+ * @author DBFlute(AutoGenerator) + */ +public class BoostDocumentRuleBhv extends BsBoostDocumentRuleBhv { +} diff --git a/src/main/java/jp/sf/fess/db/exbhv/SuggestBadWordBhv.java b/src/main/java/jp/sf/fess/db/exbhv/SuggestBadWordBhv.java new file mode 100644 index 000000000..ecfbe22fa --- /dev/null +++ b/src/main/java/jp/sf/fess/db/exbhv/SuggestBadWordBhv.java @@ -0,0 +1,30 @@ +/* + * 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.exbhv; + +import jp.sf.fess.db.bsbhv.BsSuggestBadWordBhv; + +/** + * The behavior of SUGGEST_BAD_WORD. + *

+ * You can implement your original methods here. + * This class remains when re-generating. + *

+ * @author DBFlute(AutoGenerator) + */ +public class SuggestBadWordBhv extends BsSuggestBadWordBhv { +} diff --git a/src/main/java/jp/sf/fess/db/exbhv/SuggestElevateWordBhv.java b/src/main/java/jp/sf/fess/db/exbhv/SuggestElevateWordBhv.java new file mode 100644 index 000000000..6d3990457 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/exbhv/SuggestElevateWordBhv.java @@ -0,0 +1,30 @@ +/* + * 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.exbhv; + +import jp.sf.fess.db.bsbhv.BsSuggestElevateWordBhv; + +/** + * The behavior of SUGGEST_ELEVATE_WORD. + *

+ * You can implement your original methods here. + * This class remains when re-generating. + *

+ * @author DBFlute(AutoGenerator) + */ +public class SuggestElevateWordBhv extends BsSuggestElevateWordBhv { +} diff --git a/src/main/java/jp/sf/fess/db/exentity/BoostDocumentRule.java b/src/main/java/jp/sf/fess/db/exentity/BoostDocumentRule.java new file mode 100644 index 000000000..a3cffaf30 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/exentity/BoostDocumentRule.java @@ -0,0 +1,33 @@ +/* + * 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.exentity; + +import jp.sf.fess.db.bsentity.BsBoostDocumentRule; + +/** + * The entity of BOOST_DOCUMENT_RULE. + *

+ * You can implement your original methods here. + * This class remains when re-generating. + *

+ * @author DBFlute(AutoGenerator) + */ +public class BoostDocumentRule extends BsBoostDocumentRule { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/jp/sf/fess/db/exentity/SuggestBadWord.java b/src/main/java/jp/sf/fess/db/exentity/SuggestBadWord.java new file mode 100644 index 000000000..9e5f5f70b --- /dev/null +++ b/src/main/java/jp/sf/fess/db/exentity/SuggestBadWord.java @@ -0,0 +1,33 @@ +/* + * 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.exentity; + +import jp.sf.fess.db.bsentity.BsSuggestBadWord; + +/** + * The entity of SUGGEST_BAD_WORD. + *

+ * You can implement your original methods here. + * This class remains when re-generating. + *

+ * @author DBFlute(AutoGenerator) + */ +public class SuggestBadWord extends BsSuggestBadWord { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/jp/sf/fess/db/exentity/SuggestElevateWord.java b/src/main/java/jp/sf/fess/db/exentity/SuggestElevateWord.java new file mode 100644 index 000000000..af53dfab5 --- /dev/null +++ b/src/main/java/jp/sf/fess/db/exentity/SuggestElevateWord.java @@ -0,0 +1,33 @@ +/* + * 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.exentity; + +import jp.sf.fess.db.bsentity.BsSuggestElevateWord; + +/** + * The entity of SUGGEST_ELEVATE_WORD. + *

+ * You can implement your original methods here. + * This class remains when re-generating. + *

+ * @author DBFlute(AutoGenerator) + */ +public class SuggestElevateWord extends BsSuggestElevateWord { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/jp/sf/fess/form/admin/BoostDocumentRuleForm.java b/src/main/java/jp/sf/fess/form/admin/BoostDocumentRuleForm.java new file mode 100644 index 000000000..2e50f95c2 --- /dev/null +++ b/src/main/java/jp/sf/fess/form/admin/BoostDocumentRuleForm.java @@ -0,0 +1,33 @@ +/* + * 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.form.admin; + +import java.io.Serializable; + +import jp.sf.fess.crud.form.admin.BsBoostDocumentRuleForm; + +public class BoostDocumentRuleForm extends BsBoostDocumentRuleForm implements + Serializable { + + private static final long serialVersionUID = 1L; + + @Override + public void initialize() { + super.initialize(); + sortOrder = "0"; + } +} diff --git a/src/main/java/jp/sf/fess/form/admin/SuggestBadWordForm.java b/src/main/java/jp/sf/fess/form/admin/SuggestBadWordForm.java new file mode 100644 index 000000000..5f2839e56 --- /dev/null +++ b/src/main/java/jp/sf/fess/form/admin/SuggestBadWordForm.java @@ -0,0 +1,32 @@ +/* + * 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.form.admin; + +import java.io.Serializable; + +import jp.sf.fess.crud.form.admin.BsSuggestBadWordForm; + +public class SuggestBadWordForm extends BsSuggestBadWordForm implements + Serializable { + + private static final long serialVersionUID = 1L; + + @Override + public void initialize() { + super.initialize(); + } +} diff --git a/src/main/java/jp/sf/fess/form/admin/SuggestElevateWordForm.java b/src/main/java/jp/sf/fess/form/admin/SuggestElevateWordForm.java new file mode 100644 index 000000000..56e5166b9 --- /dev/null +++ b/src/main/java/jp/sf/fess/form/admin/SuggestElevateWordForm.java @@ -0,0 +1,32 @@ +/* + * 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.form.admin; + +import java.io.Serializable; + +import jp.sf.fess.crud.form.admin.BsSuggestElevateWordForm; + +public class SuggestElevateWordForm extends BsSuggestElevateWordForm implements + Serializable { + + private static final long serialVersionUID = 1L; + + @Override + public void initialize() { + super.initialize(); + } +} diff --git a/src/main/java/jp/sf/fess/pager/BoostDocumentRulePager.java b/src/main/java/jp/sf/fess/pager/BoostDocumentRulePager.java new file mode 100644 index 000000000..d201883dc --- /dev/null +++ b/src/main/java/jp/sf/fess/pager/BoostDocumentRulePager.java @@ -0,0 +1,39 @@ +/* + * 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.pager; + +import jp.sf.fess.crud.pager.BsBoostDocumentRulePager; + +public class BoostDocumentRulePager extends BsBoostDocumentRulePager { + + private static final long serialVersionUID = 1L; + + public BoostDocumentRulePager() { + super(); + } + + @Override + public void clear() { + super.clear(); + } + + @Override + protected int getDefaultPageSize() { + return super.getDefaultPageSize(); + } + +} diff --git a/src/main/java/jp/sf/fess/pager/SuggestBadWordPager.java b/src/main/java/jp/sf/fess/pager/SuggestBadWordPager.java new file mode 100644 index 000000000..39864db28 --- /dev/null +++ b/src/main/java/jp/sf/fess/pager/SuggestBadWordPager.java @@ -0,0 +1,39 @@ +/* + * 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.pager; + +import jp.sf.fess.crud.pager.BsSuggestBadWordPager; + +public class SuggestBadWordPager extends BsSuggestBadWordPager { + + private static final long serialVersionUID = 1L; + + public SuggestBadWordPager() { + super(); + } + + @Override + public void clear() { + super.clear(); + } + + @Override + protected int getDefaultPageSize() { + return super.getDefaultPageSize(); + } + +} diff --git a/src/main/java/jp/sf/fess/pager/SuggestElevateWordPager.java b/src/main/java/jp/sf/fess/pager/SuggestElevateWordPager.java new file mode 100644 index 000000000..cfc59b770 --- /dev/null +++ b/src/main/java/jp/sf/fess/pager/SuggestElevateWordPager.java @@ -0,0 +1,39 @@ +/* + * 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.pager; + +import jp.sf.fess.crud.pager.BsSuggestElevateWordPager; + +public class SuggestElevateWordPager extends BsSuggestElevateWordPager { + + private static final long serialVersionUID = 1L; + + public SuggestElevateWordPager() { + super(); + } + + @Override + public void clear() { + super.clear(); + } + + @Override + protected int getDefaultPageSize() { + return super.getDefaultPageSize(); + } + +} diff --git a/src/main/java/jp/sf/fess/service/BoostDocumentRuleService.java b/src/main/java/jp/sf/fess/service/BoostDocumentRuleService.java new file mode 100644 index 000000000..bd0b25a90 --- /dev/null +++ b/src/main/java/jp/sf/fess/service/BoostDocumentRuleService.java @@ -0,0 +1,71 @@ +/* + * 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.service; + +import java.io.Serializable; +import java.util.Map; + +import jp.sf.fess.crud.service.BsBoostDocumentRuleService; +import jp.sf.fess.db.cbean.BoostDocumentRuleCB; +import jp.sf.fess.db.exentity.BoostDocumentRule; +import jp.sf.fess.pager.BoostDocumentRulePager; + +public class BoostDocumentRuleService extends BsBoostDocumentRuleService + implements Serializable { + + private static final long serialVersionUID = 1L; + + @Override + protected void setupListCondition(final BoostDocumentRuleCB cb, + final BoostDocumentRulePager boostDocumentRulePager) { + super.setupListCondition(cb, boostDocumentRulePager); + + // setup condition + cb.query().setDeletedBy_IsNull(); + cb.query().addOrderBy_SortOrder_Asc(); + + // search + + } + + @Override + protected void setupEntityCondition(final BoostDocumentRuleCB cb, + final Map keys) { + super.setupEntityCondition(cb, keys); + + // setup condition + + } + + @Override + protected void setupStoreCondition(final BoostDocumentRule boostDocumentRule) { + super.setupStoreCondition(boostDocumentRule); + + // setup condition + + } + + @Override + protected void setupDeleteCondition( + final BoostDocumentRule boostDocumentRule) { + super.setupDeleteCondition(boostDocumentRule); + + // setup condition + + } + +} diff --git a/src/main/java/jp/sf/fess/service/DatabaseService.java b/src/main/java/jp/sf/fess/service/DatabaseService.java index fa0d3eef8..19819e3ba 100644 --- a/src/main/java/jp/sf/fess/service/DatabaseService.java +++ b/src/main/java/jp/sf/fess/service/DatabaseService.java @@ -37,6 +37,7 @@ import javax.transaction.UserTransaction; import jp.sf.fess.Constants; import jp.sf.fess.FessSystemException; +import jp.sf.fess.db.cbean.BoostDocumentRuleCB; import jp.sf.fess.db.cbean.CrawlingSessionCB; import jp.sf.fess.db.cbean.CrawlingSessionInfoCB; import jp.sf.fess.db.cbean.DataConfigToLabelTypeMappingCB; @@ -54,10 +55,13 @@ import jp.sf.fess.db.cbean.PathMappingCB; import jp.sf.fess.db.cbean.RequestHeaderCB; import jp.sf.fess.db.cbean.RoleTypeCB; import jp.sf.fess.db.cbean.ScheduledJobCB; +import jp.sf.fess.db.cbean.SuggestBadWordCB; +import jp.sf.fess.db.cbean.SuggestElevateWordCB; import jp.sf.fess.db.cbean.WebAuthenticationCB; import jp.sf.fess.db.cbean.WebConfigToLabelTypeMappingCB; import jp.sf.fess.db.cbean.WebConfigToRoleTypeMappingCB; import jp.sf.fess.db.cbean.WebCrawlingConfigCB; +import jp.sf.fess.db.exbhv.BoostDocumentRuleBhv; import jp.sf.fess.db.exbhv.CrawlingSessionBhv; import jp.sf.fess.db.exbhv.CrawlingSessionInfoBhv; import jp.sf.fess.db.exbhv.DataConfigToLabelTypeMappingBhv; @@ -75,10 +79,13 @@ import jp.sf.fess.db.exbhv.PathMappingBhv; import jp.sf.fess.db.exbhv.RequestHeaderBhv; import jp.sf.fess.db.exbhv.RoleTypeBhv; import jp.sf.fess.db.exbhv.ScheduledJobBhv; +import jp.sf.fess.db.exbhv.SuggestBadWordBhv; +import jp.sf.fess.db.exbhv.SuggestElevateWordBhv; import jp.sf.fess.db.exbhv.WebAuthenticationBhv; import jp.sf.fess.db.exbhv.WebConfigToLabelTypeMappingBhv; import jp.sf.fess.db.exbhv.WebConfigToRoleTypeMappingBhv; import jp.sf.fess.db.exbhv.WebCrawlingConfigBhv; +import jp.sf.fess.db.exentity.BoostDocumentRule; import jp.sf.fess.db.exentity.CrawlingSession; import jp.sf.fess.db.exentity.CrawlingSessionInfo; import jp.sf.fess.db.exentity.DataConfigToLabelTypeMapping; @@ -96,6 +103,8 @@ import jp.sf.fess.db.exentity.PathMapping; import jp.sf.fess.db.exentity.RequestHeader; import jp.sf.fess.db.exentity.RoleType; import jp.sf.fess.db.exentity.ScheduledJob; +import jp.sf.fess.db.exentity.SuggestBadWord; +import jp.sf.fess.db.exentity.SuggestElevateWord; import jp.sf.fess.db.exentity.WebAuthentication; import jp.sf.fess.db.exentity.WebConfigToLabelTypeMapping; import jp.sf.fess.db.exentity.WebConfigToRoleTypeMapping; @@ -161,6 +170,12 @@ public class DatabaseService { private static final String KEY_MATCH_KEY = "keyMatch"; + private static final String BOOST_DOCUMENT_RULE_KEY = "boostDocumentRule"; + + private static final String SUGGEST_ELEVATE_WORD_KEY = "suggestElevateWord"; + + private static final String SUGGEST_BAD_WORD_KEY = "suggestBadWord"; + private static final String OVERLAPPING_HOST_KEY = "overlappingHost"; @Resource @@ -226,6 +241,15 @@ public class DatabaseService { @Resource protected KeyMatchBhv keyMatchBhv; + @Resource + protected BoostDocumentRuleBhv boostDocumentRuleBhv; + + @Resource + protected SuggestElevateWordBhv suggestElevateWordBhv; + + @Resource + protected SuggestBadWordBhv suggestBadWordBhv; + @Resource protected DynamicProperties crawlerProperties; @@ -332,6 +356,15 @@ public class DatabaseService { // keyMatch dataSet.put(KEY_MATCH_KEY + LIST_SUFFIX, keyMatchBhv.selectList(new KeyMatchCB())); + // boostDocumentRule + dataSet.put(BOOST_DOCUMENT_RULE_KEY + LIST_SUFFIX, + boostDocumentRuleBhv.selectList(new BoostDocumentRuleCB())); + // suggestElevateWord + dataSet.put(SUGGEST_ELEVATE_WORD_KEY + LIST_SUFFIX, + suggestElevateWordBhv.selectList(new SuggestElevateWordCB())); + // suggestBadWord + dataSet.put(SUGGEST_BAD_WORD_KEY + LIST_SUFFIX, + suggestBadWordBhv.selectList(new SuggestBadWordCB())); // crawlerProperties final Map crawlerPropertyMap = new HashMap(); @@ -1280,6 +1313,121 @@ public class DatabaseService { } catch (final Exception e) { rollback(KEY_MATCH_KEY, e); } + // boostDocumentRule + try { + userTransaction.begin(); + + final List boostDocumentRuleList = (List) dataSet + .get(BOOST_DOCUMENT_RULE_KEY + LIST_SUFFIX); + if (boostDocumentRuleList != null) { + for (BoostDocumentRule boostDocumentRule : boostDocumentRuleList) { + final Long id = boostDocumentRule.getId(); + + final BoostDocumentRuleCB cb = new BoostDocumentRuleCB(); + cb.query().setUrlExpr_Equal( + boostDocumentRule.getUrlExpr()); + final BoostDocumentRule entity = boostDocumentRuleBhv + .selectEntity(cb); + boostDocumentRule.setId(null); + if (entity == null) { + boostDocumentRuleBhv.insert(boostDocumentRule); + } else { + if (overwrite) { + boostDocumentRule.setVersionNo(null); + Beans.copy(boostDocumentRule, entity) + .excludesNull().execute(); + boostDocumentRule = entity; + boostDocumentRuleBhv.update(boostDocumentRule); + } else { + boostDocumentRuleBhv.insert(boostDocumentRule); + } + } + idMap.put( + BOOST_DOCUMENT_RULE_KEY + ":" + id.toString(), + boostDocumentRule.getId()); + } + } + userTransaction.commit(); + } catch (final Exception e) { + rollback(BOOST_DOCUMENT_RULE_KEY, e); + } + // suggestElevateWord + try { + userTransaction.begin(); + + final List suggestElevateWordList = (List) dataSet + .get(SUGGEST_ELEVATE_WORD_KEY + LIST_SUFFIX); + if (suggestElevateWordList != null) { + for (SuggestElevateWord suggestElevateWord : suggestElevateWordList) { + final Long id = suggestElevateWord.getId(); + + final SuggestElevateWordCB cb = new SuggestElevateWordCB(); + cb.query().setSuggestWord_Equal( + suggestElevateWord.getSuggestWord()); + final SuggestElevateWord entity = suggestElevateWordBhv + .selectEntity(cb); + suggestElevateWord.setId(null); + if (entity == null) { + suggestElevateWordBhv.insert(suggestElevateWord); + } else { + if (overwrite) { + suggestElevateWord.setVersionNo(null); + Beans.copy(suggestElevateWord, entity) + .excludesNull().execute(); + suggestElevateWord = entity; + suggestElevateWordBhv + .update(suggestElevateWord); + } else { + suggestElevateWordBhv + .insert(suggestElevateWord); + } + } + idMap.put( + SUGGEST_ELEVATE_WORD_KEY + ":" + id.toString(), + suggestElevateWord.getId()); + } + } + userTransaction.commit(); + } catch (final Exception e) { + rollback(SUGGEST_ELEVATE_WORD_KEY, e); + } + // suggestNGWord + try { + userTransaction.begin(); + + final List suggestNGWordList = (List) dataSet + .get(SUGGEST_BAD_WORD_KEY + LIST_SUFFIX); + if (suggestNGWordList != null) { + for (SuggestBadWord suggestNGWord : suggestNGWordList) { + final Long id = suggestNGWord.getId(); + + final SuggestBadWordCB cb = new SuggestBadWordCB(); + cb.query().setSuggestWord_Equal( + suggestNGWord.getSuggestWord()); + final SuggestBadWord entity = suggestBadWordBhv + .selectEntity(cb); + suggestNGWord.setId(null); + if (entity == null) { + suggestBadWordBhv.insert(suggestNGWord); + } else { + if (overwrite) { + suggestNGWord.setVersionNo(null); + Beans.copy(suggestNGWord, entity) + .excludesNull().execute(); + suggestNGWord = entity; + suggestBadWordBhv.update(suggestNGWord); + } else { + suggestBadWordBhv.insert(suggestNGWord); + } + } + idMap.put(SUGGEST_BAD_WORD_KEY + ":" + id.toString(), + suggestNGWord.getId()); + } + } + userTransaction.commit(); + } catch (final Exception e) { + rollback(SUGGEST_BAD_WORD_KEY, e); + } // crawlerProperties try { diff --git a/src/main/java/jp/sf/fess/service/KeyMatchService.java b/src/main/java/jp/sf/fess/service/KeyMatchService.java index 8b59c4e19..b4e56722e 100644 --- a/src/main/java/jp/sf/fess/service/KeyMatchService.java +++ b/src/main/java/jp/sf/fess/service/KeyMatchService.java @@ -35,6 +35,8 @@ public class KeyMatchService extends BsKeyMatchService implements Serializable { super.setupListCondition(cb, keyMatchPager); // setup condition + cb.query().setDeletedBy_IsNull(); + cb.query().addOrderBy_Term_Asc(); // search diff --git a/src/main/java/jp/sf/fess/service/SuggestBadWordService.java b/src/main/java/jp/sf/fess/service/SuggestBadWordService.java new file mode 100644 index 000000000..7a56ee4f1 --- /dev/null +++ b/src/main/java/jp/sf/fess/service/SuggestBadWordService.java @@ -0,0 +1,70 @@ +/* + * 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.service; + +import java.io.Serializable; +import java.util.Map; + +import jp.sf.fess.crud.service.BsSuggestBadWordService; +import jp.sf.fess.db.cbean.SuggestBadWordCB; +import jp.sf.fess.db.exentity.SuggestBadWord; +import jp.sf.fess.pager.SuggestBadWordPager; + +public class SuggestBadWordService extends BsSuggestBadWordService implements + Serializable { + + private static final long serialVersionUID = 1L; + + @Override + protected void setupListCondition(final SuggestBadWordCB cb, + final SuggestBadWordPager suggestBadWordPager) { + super.setupListCondition(cb, suggestBadWordPager); + + // setup condition + cb.query().setDeletedBy_IsNull(); + cb.query().addOrderBy_SuggestWord_Asc(); + + // search + + } + + @Override + protected void setupEntityCondition(final SuggestBadWordCB cb, + final Map keys) { + super.setupEntityCondition(cb, keys); + + // setup condition + + } + + @Override + protected void setupStoreCondition(final SuggestBadWord suggestBadWord) { + super.setupStoreCondition(suggestBadWord); + + // setup condition + + } + + @Override + protected void setupDeleteCondition(final SuggestBadWord suggestBadWord) { + super.setupDeleteCondition(suggestBadWord); + + // setup condition + + } + +} diff --git a/src/main/java/jp/sf/fess/service/SuggestElevateWordService.java b/src/main/java/jp/sf/fess/service/SuggestElevateWordService.java new file mode 100644 index 000000000..366773de0 --- /dev/null +++ b/src/main/java/jp/sf/fess/service/SuggestElevateWordService.java @@ -0,0 +1,72 @@ +/* + * 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.service; + +import java.io.Serializable; +import java.util.Map; + +import jp.sf.fess.crud.service.BsSuggestElevateWordService; +import jp.sf.fess.db.cbean.SuggestElevateWordCB; +import jp.sf.fess.db.exentity.SuggestElevateWord; +import jp.sf.fess.pager.SuggestElevateWordPager; + +public class SuggestElevateWordService extends BsSuggestElevateWordService + implements Serializable { + + private static final long serialVersionUID = 1L; + + @Override + protected void setupListCondition(final SuggestElevateWordCB cb, + final SuggestElevateWordPager suggestElevateWordPager) { + super.setupListCondition(cb, suggestElevateWordPager); + + // setup condition + cb.query().setDeletedBy_IsNull(); + cb.query().addOrderBy_SuggestWord_Asc(); + + // search + + } + + @Override + protected void setupEntityCondition(final SuggestElevateWordCB cb, + final Map keys) { + super.setupEntityCondition(cb, keys); + + // setup condition + + } + + @Override + protected void setupStoreCondition( + final SuggestElevateWord suggestElevateWord) { + super.setupStoreCondition(suggestElevateWord); + + // setup condition + + } + + @Override + protected void setupDeleteCondition( + final SuggestElevateWord suggestElevateWord) { + super.setupDeleteCondition(suggestElevateWord); + + // setup condition + + } + +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 322335671..425e2b896 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -305,6 +305,7 @@ labels.menu.file_system=» File System labels.menu.data_store=» Data Store labels.menu.label_type=» Label labels.menu.key_match=» Key Match +labels.menu.boost_document_rule=» Doc Boost labels.menu.path_mapping=» Path Mapping labels.menu.web_authentication=» Web Authentication labels.menu.file_authentication=» File Authentication @@ -312,6 +313,10 @@ labels.menu.request_header=» Request Header labels.menu.overlapping_host=» Overlapping Host labels.menu.role_type=» Role +labels.menu_suggest=Suggest +labels.menu.suggest_elevate_word=» Additional Word +labels.menu.suggest_bad_word=» Bad Word + labels.menu_system_log=System Info labels.menu.system_info=» Config Info labels.menu.session_info=» Session Info @@ -1340,6 +1345,89 @@ labels.dict_userdict_button_download=Download labels.dict_userdict_button_upload=Upload labels.dict_userdict_file=UserDict File +# boost document rule +labels.boost_document_rule_configuration=Doc Boost +labels.boost_document_rule_title_list=Doc Boost List +labels.boost_document_rule_title_confirm=Doc Boost Confirmation +labels.boost_document_rule_title_details=Doc Boost Details +labels.boost_document_rule_link_list=List +labels.boost_document_rule_link_create_new=Create New +labels.boost_document_rule_link_details=Details +labels.boost_document_rule_link_edit=Edit +labels.boost_document_rule_link_delete=Delete +labels.boost_document_rule_link_prev_page=Prev +labels.boost_document_rule_link_next_page=Next +labels.boost_document_rule_link_create=Create +labels.boost_document_rule_link_update=Update +labels.boost_document_rule_link_delete=Delete +labels.boost_document_rule_link_confirm=Confirm +labels.boost_document_rule_button_create=Create +labels.boost_document_rule_button_back=Back +labels.boost_document_rule_button_confirm=Confirm +labels.boost_document_rule_button_update=Update +labels.boost_document_rule_button_delete=Delete +labels.boost_document_rule_button_edit=Edit +labels.boost_document_rule_list_url_expr=Condition +labels.boost_document_rule_url_expr=Condition +labels.boost_document_rule_boost_expr=Boost Expr +labels.boost_document_rule_sort_order=Sort Order + +# suggest\u3000elevate\u3000word +labels.suggest_elevate_word_configuration=Additional Word +labels.suggest_elevate_word_title_list=Additional Word List +labels.suggest_elevate_word_title_confirm=Additional Word Confirmation +labels.suggest_elevate_word_title_details=Additional Word Details +labels.suggest_elevate_word_link_list=List +labels.suggest_elevate_word_link_create_new=Create New +labels.suggest_elevate_word_link_details=Details +labels.suggest_elevate_word_link_edit=Edit +labels.suggest_elevate_word_link_delete=Delete +labels.suggest_elevate_word_link_prev_page=Prev +labels.suggest_elevate_word_link_next_page=Next +labels.suggest_elevate_word_link_create=Create +labels.suggest_elevate_word_link_update=Update +labels.suggest_elevate_word_link_delete=Delete +labels.suggest_elevate_word_link_confirm=Confirm +labels.suggest_elevate_word_button_create=Create +labels.suggest_elevate_word_button_back=Back +labels.suggest_elevate_word_button_confirm=Confirm +labels.suggest_elevate_word_button_update=Update +labels.suggest_elevate_word_button_delete=Delete +labels.suggest_elevate_word_button_edit=Edit +labels.suggest_elevate_word_list_suggest_word=Word +labels.suggest_elevate_word_suggest_word=Word +labels.suggest_elevate_word_reading=Reading +labels.suggest_elevate_word_target_role=Role +labels.suggest_elevate_word_target_label=Label +labels.suggest_elevate_word_boost=Boost + +# suggest bad word +labels.suggest_bad_word_configuration=Bad Word +labels.suggest_bad_word_title_list=Bad Word List +labels.suggest_bad_word_title_confirm=Bad Word Confirmation +labels.suggest_bad_word_title_details=Bad Word Details +labels.suggest_bad_word_link_list=List +labels.suggest_bad_word_link_create_new=Create New +labels.suggest_bad_word_link_details=Details +labels.suggest_bad_word_link_edit=Edit +labels.suggest_bad_word_link_delete=Delete +labels.suggest_bad_word_link_prev_page=Prev +labels.suggest_bad_word_link_next_page=Next +labels.suggest_bad_word_link_create=Create +labels.suggest_bad_word_link_update=Update +labels.suggest_bad_word_link_delete=Delete +labels.suggest_bad_word_link_confirm=Confirm +labels.suggest_bad_word_button_create=Create +labels.suggest_bad_word_button_back=Back +labels.suggest_bad_word_button_confirm=Confirm +labels.suggest_bad_word_button_update=Update +labels.suggest_bad_word_button_delete=Delete +labels.suggest_bad_word_button_edit=Edit +labels.suggest_bad_word_list_suggest_word=Bad Word +labels.suggest_bad_word_suggest_word=Bad Word +labels.suggest_bad_word_target_role=Role +labels.suggest_bad_word_target_label=Label + # CRUD PROPERTIES: BEGIN errors.crud_invalid_mode=Invalid mode(expected value is {0}, but it's {1}). errors.crud_failed_to_create_crud_table=Failed to create a new data. diff --git a/src/main/resources/application_ja.properties b/src/main/resources/application_ja.properties index e56cb93a5..2d5d6cf3a 100644 --- a/src/main/resources/application_ja.properties +++ b/src/main/resources/application_ja.properties @@ -305,6 +305,7 @@ labels.menu.file_system=» \u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e labels.menu.data_store=» \u30c7\u30fc\u30bf\u30b9\u30c8\u30a2 labels.menu.label_type=» \u30e9\u30d9\u30eb labels.menu.key_match=» \u30ad\u30fc\u30de\u30c3\u30c1 +labels.menu.boost_document_rule=» \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30d6\u30fc\u30b9\u30c8 labels.menu.path_mapping=» \u30d1\u30b9\u30de\u30c3\u30d4\u30f3\u30b0 labels.menu.web_authentication=» \u30a6\u30a7\u30d6\u8a8d\u8a3c labels.menu.file_authentication=» \u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u8a8d\u8a3c @@ -312,6 +313,10 @@ labels.menu.request_header=» \u30ea\u30af\u30a8\u30b9\u30c8\u30d8\u30c3\u labels.menu.overlapping_host=» \u91cd\u8907\u30db\u30b9\u30c8 labels.menu.role_type=» \u30ed\u30fc\u30eb +labels.menu_suggest=\u30b5\u30b8\u30a7\u30b9\u30c8 +labels.menu.suggest_elevate_word=» \u8ffd\u52a0\u5019\u88dc +labels.menu.suggest_bad_word=» NG\u30ef\u30fc\u30c9 + labels.menu_system_log=\u30b7\u30b9\u30c6\u30e0\u60c5\u5831 labels.menu.system_info=» \u8a2d\u5b9a\u60c5\u5831 labels.menu.session_info=» \u30bb\u30c3\u30b7\u30e7\u30f3\u60c5\u5831 @@ -681,13 +686,13 @@ labels.system_index_status=\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u72b6\u614b labels.crawler_status_title=\u30af\u30ed\u30fc\u30e9\u30fc\u72b6\u614b labels.crawler_sessionid_all=\u3059\u3079\u3066 labels.no_available_solr_servers=\u5229\u7528\u53ef\u80fd\u306aSolr\u30b5\u30fc\u30d0\u304c\u3042\u308a\u307e\u305b\u3093\u3002 -labels.suggest_document_title=\u8FFD\u52A0\u3055\u308C\u305F\u30B5\u30B8\u30A7\u30B9\u30C8\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8 -labels.suggest_type=\u7A2E\u5225 +labels.suggest_document_title=\u8ffd\u52a0\u3055\u308c\u305f\u30b5\u30b8\u30a7\u30b9\u30c8\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 +labels.suggest_type=\u7a2e\u5225 labels.suggest_type_all=\u3059\u3079\u3066 -labels.suggest_type_content=\u30B3\u30F3\u30C6\u30F3\u30C4 -labels.suggest_type_searchlog=\u691C\u7D22\u30ED\u30B0 -labels.suggest_search_log_enabled=\u691C\u7D22\u8A9E\u30B5\u30B8\u30A7\u30B9\u30C8 -labels.purge_suggest_search_log_day=\u691C\u7D22\u8A9E\u30B5\u30B8\u30A7\u30B9\u30C8\u306E\u6709\u52B9\u671F\u9650 +labels.suggest_type_content=\u30b3\u30f3\u30c6\u30f3\u30c4 +labels.suggest_type_searchlog=\u691c\u7d22\u30ed\u30b0 +labels.suggest_search_log_enabled=\u691c\u7d22\u8a9e\u30b5\u30b8\u30a7\u30b9\u30c8 +labels.purge_suggest_search_log_day=\u691c\u7d22\u8a9e\u30b5\u30b8\u30a7\u30b9\u30c8\u306e\u6709\u52b9\u671f\u9650 # view/admin/crawlingSession/confirm.jsp labels.crawling_session_title=\u30bb\u30c3\u30b7\u30e7\u30f3\u60c5\u5831 @@ -1340,6 +1345,89 @@ labels.dict_userdict_button_download=\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9 labels.dict_userdict_button_upload=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 labels.dict_userdict_file=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb +# boost document rule +labels.boost_document_rule_configuration=\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30d6\u30fc\u30b9\u30c8 +labels.boost_document_rule_title_list=\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30d6\u30fc\u30b9\u30c8\u4e00\u89a7 +labels.boost_document_rule_title_confirm=\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30d6\u30fc\u30b9\u30c8\u78ba\u8a8d +labels.boost_document_rule_title_details=\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30d6\u30fc\u30b9\u30c8\u8a73\u7d30 +labels.boost_document_rule_link_list=\u4e00\u89a7 +labels.boost_document_rule_link_create_new=\u65b0\u898f\u4f5c\u6210 +labels.boost_document_rule_link_details=\u8a73\u7d30 +labels.boost_document_rule_link_edit=\u7de8\u96c6 +labels.boost_document_rule_link_delete=\u524a\u9664 +labels.boost_document_rule_link_prev_page=\u524d\u3078 +labels.boost_document_rule_link_next_page=\u6b21\u3078 +labels.boost_document_rule_link_create=\u65b0\u898f\u4f5c\u6210 +labels.boost_document_rule_link_update=\u7de8\u96c6 +labels.boost_document_rule_link_delete=\u524a\u9664 +labels.boost_document_rule_link_confirm=\u78ba\u8a8d +labels.boost_document_rule_button_create=\u4f5c\u6210 +labels.boost_document_rule_button_back=\u623b\u308b +labels.boost_document_rule_button_confirm=\u78ba\u8a8d +labels.boost_document_rule_button_update=\u66f4\u65b0 +labels.boost_document_rule_button_delete=\u524a\u9664 +labels.boost_document_rule_button_edit=\u7de8\u96c6 +labels.boost_document_rule_list_url_expr=\u6761\u4ef6 +labels.boost_document_rule_url_expr=\u6761\u4ef6 +labels.boost_document_rule_boost_expr=\u30d6\u30fc\u30b9\u30c8\u5024\u5f0f +labels.boost_document_rule_sort_order=\u8868\u793a\u9806 + +# suggest\u3000elevate\u3000word +labels.suggest_elevate_word_configuration=\u8ffd\u52a0\u5019\u88dc +labels.suggest_elevate_word_title_list=\u8ffd\u52a0\u5019\u88dc\u4e00\u89a7 +labels.suggest_elevate_word_title_confirm=\u8ffd\u52a0\u5019\u88dc\u78ba\u8a8d +labels.suggest_elevate_word_title_details=\u8ffd\u52a0\u5019\u88dc\u8a73\u7d30 +labels.suggest_elevate_word_link_list=\u4e00\u89a7 +labels.suggest_elevate_word_link_create_new=\u65b0\u898f\u4f5c\u6210 +labels.suggest_elevate_word_link_details=\u8a73\u7d30 +labels.suggest_elevate_word_link_edit=\u7de8\u96c6 +labels.suggest_elevate_word_link_delete=\u524a\u9664 +labels.suggest_elevate_word_link_prev_page=\u524d\u3078 +labels.suggest_elevate_word_link_next_page=\u6b21\u3078 +labels.suggest_elevate_word_link_create=\u65b0\u898f\u4f5c\u6210 +labels.suggest_elevate_word_link_update=\u7de8\u96c6 +labels.suggest_elevate_word_link_delete=\u524a\u9664 +labels.suggest_elevate_word_link_confirm=\u78ba\u8a8d +labels.suggest_elevate_word_button_create=\u4f5c\u6210 +labels.suggest_elevate_word_button_back=\u623b\u308b +labels.suggest_elevate_word_button_confirm=\u78ba\u8a8d +labels.suggest_elevate_word_button_update=\u66f4\u65b0 +labels.suggest_elevate_word_button_delete=\u524a\u9664 +labels.suggest_elevate_word_button_edit=\u7de8\u96c6 +labels.suggest_elevate_word_list_suggest_word=\u30b5\u30b8\u30a7\u30b9\u30c8\u5019\u88dc +labels.suggest_elevate_word_suggest_word=\u30b5\u30b8\u30a7\u30b9\u30c8\u5019\u88dc +labels.suggest_elevate_word_reading=\u8aad\u307f +labels.suggest_elevate_word_target_role=\u30ed\u30fc\u30eb\u540d +labels.suggest_elevate_word_target_label=\u30e9\u30d9\u30eb\u540d +labels.suggest_elevate_word_boost=\u30d6\u30fc\u30b9\u30c8\u5024 + +# suggest bad word +labels.suggest_bad_word_configuration=NG\u30ef\u30fc\u30c9 +labels.suggest_bad_word_title_list=NG\u30ef\u30fc\u30c9\u4e00\u89a7 +labels.suggest_bad_word_title_confirm=NG\u30ef\u30fc\u30c9\u78ba\u8a8d +labels.suggest_bad_word_title_details=NG\u30ef\u30fc\u30c9\u8a73\u7d30 +labels.suggest_bad_word_link_list=\u4e00\u89a7 +labels.suggest_bad_word_link_create_new=\u65b0\u898f\u4f5c\u6210 +labels.suggest_bad_word_link_details=\u8a73\u7d30 +labels.suggest_bad_word_link_edit=\u7de8\u96c6 +labels.suggest_bad_word_link_delete=\u524a\u9664 +labels.suggest_bad_word_link_prev_page=\u524d\u3078 +labels.suggest_bad_word_link_next_page=\u6b21\u3078 +labels.suggest_bad_word_link_create=\u65b0\u898f\u4f5c\u6210 +labels.suggest_bad_word_link_update=\u7de8\u96c6 +labels.suggest_bad_word_link_delete=\u524a\u9664 +labels.suggest_bad_word_link_confirm=\u78ba\u8a8d +labels.suggest_bad_word_button_create=\u4f5c\u6210 +labels.suggest_bad_word_button_back=\u623b\u308b +labels.suggest_bad_word_button_confirm=\u78ba\u8a8d +labels.suggest_bad_word_button_update=\u66f4\u65b0 +labels.suggest_bad_word_button_delete=\u524a\u9664 +labels.suggest_bad_word_button_edit=\u7de8\u96c6 +labels.suggest_bad_word_list_suggest_word=\u30b5\u30b8\u30a7\u30b9\u30c8\u5019\u88dc +labels.suggest_bad_word_suggest_word=\u30b5\u30b8\u30a7\u30b9\u30c8\u5019\u88dc +labels.suggest_bad_word_target_role=\u30ed\u30fc\u30eb\u540d +labels.suggest_bad_word_target_label=\u30e9\u30d9\u30eb\u540d + # CRUD PROPERTIES: BEGIN errors.crud_invalid_mode=\u30e2\u30fc\u30c9\u304c\u9055\u3044\u307e\u3059\u3002(\u6b63\u3057\u3044\u5024\u306f {0} \u3067\u3059\u304c\u3001\u5165\u529b\u3055\u308c\u305f\u5024\u306f {1} \u306b\u306a\u3063\u3066\u3044\u307e\u3059) errors.crud_failed_to_create_crud_table=\u30c7\u30fc\u30bf\u306e\u4f5c\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 diff --git a/src/main/resources/dbflute.dicon b/src/main/resources/dbflute.dicon index d33a0d241..86b8fb860 100644 --- a/src/main/resources/dbflute.dicon +++ b/src/main/resources/dbflute.dicon @@ -13,6 +13,7 @@ + @@ -36,6 +37,8 @@ + + diff --git a/src/main/resources/fess.dicon b/src/main/resources/fess.dicon index 6e1776000..b3befa71a 100644 --- a/src/main/resources/fess.dicon +++ b/src/main/resources/fess.dicon @@ -41,7 +41,7 @@ new String[] { "-Djava.awt.headless=true", "-server", -"-Xmx512m", +"-Xmx256m", "-XX:MaxPermSize=128m", "-XX:-UseGCOverheadLimit", "-XX:+UseConcMarkSweepGC", @@ -56,9 +56,11 @@ new String[] { } : new String[] { +"-Xdebug", +"-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=127.0.0.1:8000", "-Djava.awt.headless=true", "-server", -"-Xmx512m", +"-Xmx256m", "-XX:MaxMetaspaceSize=128m", "-XX:CompressedClassSpaceSize=32m", "-XX:-UseGCOverheadLimit", diff --git a/src/main/webapp/WEB-INF/view/admin/boostDocumentRule/confirm.jsp b/src/main/webapp/WEB-INF/view/admin/boostDocumentRule/confirm.jsp new file mode 100644 index 000000000..828358fdf --- /dev/null +++ b/src/main/webapp/WEB-INF/view/admin/boostDocumentRule/confirm.jsp @@ -0,0 +1,110 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + + + + + + + + +

+ +

+ + <%-- Message: BEGIN --%> +
+ +
+
+ +
+ <%-- Message: END --%> + +
+
    +
  • + +
  • + +
  • +
    + +
  • +
    + +
  • +
    + +
  • +
    +
+
+ + <%-- Confirm Form: BEGIN --%> + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
${f:br(f:h(urlExpr))}
${f:br(f:h(boostExpr))}
${f:h(sortOrder)}
+ " /> + " /> + + " /> + " /> + + " /> + " /> + + " /> + " /> + " /> +
+
+
+ <%-- Confirm Form: BEGIN --%> + +
+
diff --git a/src/main/webapp/WEB-INF/view/admin/boostDocumentRule/edit.jsp b/src/main/webapp/WEB-INF/view/admin/boostDocumentRule/edit.jsp new file mode 100644 index 000000000..dad9fc559 --- /dev/null +++ b/src/main/webapp/WEB-INF/view/admin/boostDocumentRule/edit.jsp @@ -0,0 +1,98 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + + + + + + + + +

+ +

+ + <%-- Message: BEGIN --%> +
+ +
+
+ +
+ <%-- Message: END --%> + +
+
    +
  • + +
  • + +
  • +
    + +
  • +
    + +
  • +
    + +
  • +
    +
+
+ + <%-- Edit Form: BEGIN --%> + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ " /> + " /> + + " /> + " /> +
+
+
+ <%-- Edit Form: BEGIN --%> + +
+
diff --git a/src/main/webapp/WEB-INF/view/admin/boostDocumentRule/error.jsp b/src/main/webapp/WEB-INF/view/admin/boostDocumentRule/error.jsp new file mode 100644 index 000000000..1319bd71b --- /dev/null +++ b/src/main/webapp/WEB-INF/view/admin/boostDocumentRule/error.jsp @@ -0,0 +1,17 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + + + + + + +
+ +
+ +
+ +
+
diff --git a/src/main/webapp/WEB-INF/view/admin/boostDocumentRule/index.jsp b/src/main/webapp/WEB-INF/view/admin/boostDocumentRule/index.jsp new file mode 100644 index 000000000..8ddf4c6fa --- /dev/null +++ b/src/main/webapp/WEB-INF/view/admin/boostDocumentRule/index.jsp @@ -0,0 +1,114 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + + + + + + + + +

+ +

+ + <%-- Message: BEGIN --%> +
+ +
+
+ +
+ <%-- Message: END --%> + + <%-- List: BEGIN --%> +
+
+
    +
  • +
  • + +
  • +
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + +
 
${f:h(data.urlExpr)} + + + + + +
+ <%-- Page Navigation: BEGIN --%> +
+ + +
+ +
+
+ <%-- Page Navigation: END --%> +
+
+ <%-- List: END --%> + +
+
diff --git a/src/main/webapp/WEB-INF/view/admin/suggestBadWord/confirm.jsp b/src/main/webapp/WEB-INF/view/admin/suggestBadWord/confirm.jsp new file mode 100644 index 000000000..9be297c31 --- /dev/null +++ b/src/main/webapp/WEB-INF/view/admin/suggestBadWord/confirm.jsp @@ -0,0 +1,109 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + + + + + + + + +

+ +

+ + <%-- Message: BEGIN --%> +
+ +
+
+ +
+ <%-- Message: END --%> + +
+
    +
  • + +
  • + +
  • +
    + +
  • +
    + +
  • +
    + +
  • +
    +
+
+ + <%-- Confirm Form: BEGIN --%> + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
${f:h(suggestWord)}
${f:h(targetRole)}
${f:h(targetLabel)}
+ " /> + " /> + + " /> + " /> + + " /> + " /> + + " /> + " /> + " /> +
+
+
+ <%-- Confirm Form: BEGIN --%> + +
+
diff --git a/src/main/webapp/WEB-INF/view/admin/suggestBadWord/edit.jsp b/src/main/webapp/WEB-INF/view/admin/suggestBadWord/edit.jsp new file mode 100644 index 000000000..47e577f17 --- /dev/null +++ b/src/main/webapp/WEB-INF/view/admin/suggestBadWord/edit.jsp @@ -0,0 +1,97 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + + + + + + + + +

+ +

+ + <%-- Message: BEGIN --%> +
+ +
+
+ +
+ <%-- Message: END --%> + +
+
    +
  • + +
  • + +
  • +
    + +
  • +
    + +
  • +
    + +
  • +
    +
+
+ + <%-- Edit Form: BEGIN --%> + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ " /> + " /> + + " /> + " /> +
+
+
+ <%-- Edit Form: BEGIN --%> + +
+
diff --git a/src/main/webapp/WEB-INF/view/admin/suggestBadWord/error.jsp b/src/main/webapp/WEB-INF/view/admin/suggestBadWord/error.jsp new file mode 100644 index 000000000..2fdb2c344 --- /dev/null +++ b/src/main/webapp/WEB-INF/view/admin/suggestBadWord/error.jsp @@ -0,0 +1,17 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + + + + + + +
+ +
+ +
+ +
+
diff --git a/src/main/webapp/WEB-INF/view/admin/suggestBadWord/index.jsp b/src/main/webapp/WEB-INF/view/admin/suggestBadWord/index.jsp new file mode 100644 index 000000000..dd3b5725e --- /dev/null +++ b/src/main/webapp/WEB-INF/view/admin/suggestBadWord/index.jsp @@ -0,0 +1,114 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + + + + + + + + +

+ +

+ + <%-- Message: BEGIN --%> +
+ +
+
+ +
+ <%-- Message: END --%> + + <%-- List: BEGIN --%> +
+
+
    +
  • +
  • + +
  • +
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + +
 
${f:h(data.suggestWord)} + + + + + +
+ <%-- Page Navigation: BEGIN --%> +
+ + +
+ +
+
+ <%-- Page Navigation: END --%> +
+
+ <%-- List: END --%> + +
+
diff --git a/src/main/webapp/WEB-INF/view/admin/suggestElevateWord/confirm.jsp b/src/main/webapp/WEB-INF/view/admin/suggestElevateWord/confirm.jsp new file mode 100644 index 000000000..dcc1621d2 --- /dev/null +++ b/src/main/webapp/WEB-INF/view/admin/suggestElevateWord/confirm.jsp @@ -0,0 +1,117 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + + + + + + + + +

+ +

+ + <%-- Message: BEGIN --%> +
+ +
+
+ +
+ <%-- Message: END --%> + +
+
    +
  • + +
  • + +
  • +
    + +
  • +
    + +
  • +
    + +
  • +
    +
+
+ + <%-- Confirm Form: BEGIN --%> + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
${f:h(suggestWord)}
${f:h(reading)}
${f:h(targetRole)}
${f:h(targetLabel)}
${f:h(boost)}
+ " /> + " /> + + " /> + " /> + + " /> + " /> + + " /> + " /> + " /> +
+
+
+ <%-- Confirm Form: BEGIN --%> + +
+
diff --git a/src/main/webapp/WEB-INF/view/admin/suggestElevateWord/edit.jsp b/src/main/webapp/WEB-INF/view/admin/suggestElevateWord/edit.jsp new file mode 100644 index 000000000..7a7e476f4 --- /dev/null +++ b/src/main/webapp/WEB-INF/view/admin/suggestElevateWord/edit.jsp @@ -0,0 +1,105 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + + + + + + + + +

+ +

+ + <%-- Message: BEGIN --%> +
+ +
+
+ +
+ <%-- Message: END --%> + +
+
    +
  • + +
  • + +
  • +
    + +
  • +
    + +
  • +
    + +
  • +
    +
+
+ + <%-- Edit Form: BEGIN --%> + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ " /> + " /> + + " /> + " /> +
+
+
+ <%-- Edit Form: BEGIN --%> + +
+
diff --git a/src/main/webapp/WEB-INF/view/admin/suggestElevateWord/error.jsp b/src/main/webapp/WEB-INF/view/admin/suggestElevateWord/error.jsp new file mode 100644 index 000000000..2949384b2 --- /dev/null +++ b/src/main/webapp/WEB-INF/view/admin/suggestElevateWord/error.jsp @@ -0,0 +1,17 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + + + + + + +
+ +
+ +
+ +
+
diff --git a/src/main/webapp/WEB-INF/view/admin/suggestElevateWord/index.jsp b/src/main/webapp/WEB-INF/view/admin/suggestElevateWord/index.jsp new file mode 100644 index 000000000..a4fa4f7fa --- /dev/null +++ b/src/main/webapp/WEB-INF/view/admin/suggestElevateWord/index.jsp @@ -0,0 +1,114 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + + + + + + + + + + +

+ +

+ + <%-- Message: BEGIN --%> +
+ +
+
+ +
+ <%-- Message: END --%> + + <%-- List: BEGIN --%> +
+
+
    +
  • +
  • + +
  • +
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + +
 
${f:h(data.suggestWord)} + + + + + +
+ <%-- Page Navigation: BEGIN --%> +
+ + +
+ +
+
+ <%-- Page Navigation: END --%> +
+
+ <%-- List: END --%> + +
+
diff --git a/src/main/webapp/WEB-INF/view/common/admin/menu.jsp b/src/main/webapp/WEB-INF/view/common/admin/menu.jsp index 2c77dddac..5ed8fa4a3 100644 --- a/src/main/webapp/WEB-INF/view/common/admin/menu.jsp +++ b/src/main/webapp/WEB-INF/view/common/admin/menu.jsp @@ -140,6 +140,16 @@
+ + + + + + + + + +
@@ -201,6 +211,31 @@

+

+ +

+

+ + + + + + + + + +
+ + + + + + + + + +
+