Przeglądaj źródła

#1 Job Management feature.

Shinsuke Sugaya 11 lat temu
rodzic
commit
a93746f521
100 zmienionych plików z 8539 dodań i 825 usunięć
  1. 12 3
      .gitignore
  2. 1 1
      dbflute_h2/_project.bat
  3. 1 1
      dbflute_h2/_project.sh
  4. 1 1
      dbflute_mysql/_project.bat
  5. 1 1
      dbflute_mysql/_project.sh
  6. 1 1
      dbflute_oracle/_project.bat
  7. 1 1
      dbflute_oracle/_project.sh
  8. 16 11
      pom.xml
  9. 44 0
      src/main/config/h2/fess.ddl
  10. 47 4
      src/main/config/mysql/fess.ddl
  11. 50 5
      src/main/config/oracle/fess.ddl
  12. 314 0
      src/main/config/tablemeta.properties
  13. 22 13
      src/main/java/jp/sf/fess/Constants.java
  14. 7 34
      src/main/java/jp/sf/fess/action/admin/CrawlAction.java
  15. 2 1
      src/main/java/jp/sf/fess/action/admin/CrawlingSessionAction.java
  16. 6 11
      src/main/java/jp/sf/fess/action/admin/DocumentAction.java
  17. 25 0
      src/main/java/jp/sf/fess/action/admin/JobLogAction.java
  18. 154 0
      src/main/java/jp/sf/fess/action/admin/ScheduledJobAction.java
  19. 1 3
      src/main/java/jp/sf/fess/action/admin/SearchListAction.java
  20. 22 15
      src/main/java/jp/sf/fess/action/admin/SystemAction.java
  21. 15 76
      src/main/java/jp/sf/fess/action/admin/WizardAction.java
  22. 1 1
      src/main/java/jp/sf/fess/crud/action/admin/BsBrowserTypeAction.java
  23. 1 1
      src/main/java/jp/sf/fess/crud/action/admin/BsCrawlingSessionAction.java
  24. 1 1
      src/main/java/jp/sf/fess/crud/action/admin/BsDataCrawlingConfigAction.java
  25. 1 1
      src/main/java/jp/sf/fess/crud/action/admin/BsFailureUrlAction.java
  26. 1 1
      src/main/java/jp/sf/fess/crud/action/admin/BsFavoriteLogAction.java
  27. 1 1
      src/main/java/jp/sf/fess/crud/action/admin/BsFileAuthenticationAction.java
  28. 1 1
      src/main/java/jp/sf/fess/crud/action/admin/BsFileCrawlingConfigAction.java
  29. 342 0
      src/main/java/jp/sf/fess/crud/action/admin/BsJobLogAction.java
  30. 1 1
      src/main/java/jp/sf/fess/crud/action/admin/BsLabelTypeAction.java
  31. 1 1
      src/main/java/jp/sf/fess/crud/action/admin/BsOverlappingHostAction.java
  32. 1 1
      src/main/java/jp/sf/fess/crud/action/admin/BsPathMappingAction.java
  33. 1 1
      src/main/java/jp/sf/fess/crud/action/admin/BsRequestHeaderAction.java
  34. 1 1
      src/main/java/jp/sf/fess/crud/action/admin/BsRoleTypeAction.java
  35. 349 0
      src/main/java/jp/sf/fess/crud/action/admin/BsScheduledJobAction.java
  36. 1 1
      src/main/java/jp/sf/fess/crud/action/admin/BsSearchLogAction.java
  37. 1 1
      src/main/java/jp/sf/fess/crud/action/admin/BsUserInfoAction.java
  38. 1 1
      src/main/java/jp/sf/fess/crud/action/admin/BsWebAuthenticationAction.java
  39. 1 1
      src/main/java/jp/sf/fess/crud/action/admin/BsWebCrawlingConfigAction.java
  40. 84 0
      src/main/java/jp/sf/fess/crud/form/admin/BsJobLogForm.java
  41. 122 0
      src/main/java/jp/sf/fess/crud/form/admin/BsScheduledJobForm.java
  42. 140 0
      src/main/java/jp/sf/fess/crud/pager/BsJobLogPager.java
  43. 152 0
      src/main/java/jp/sf/fess/crud/pager/BsScheduledJobPager.java
  44. 113 0
      src/main/java/jp/sf/fess/crud/service/BsJobLogService.java
  45. 117 0
      src/main/java/jp/sf/fess/crud/service/BsScheduledJobService.java
  46. 3 0
      src/main/java/jp/sf/fess/db/allcommon/DBMetaInstanceHandler.java
  47. 65 29
      src/main/java/jp/sf/fess/db/bsbhv/BsBrowserTypeBhv.java
  48. 40 16
      src/main/java/jp/sf/fess/db/bsbhv/BsClickLogBhv.java
  49. 41 16
      src/main/java/jp/sf/fess/db/bsbhv/BsCrawlingSessionBhv.java
  50. 41 16
      src/main/java/jp/sf/fess/db/bsbhv/BsCrawlingSessionInfoBhv.java
  51. 41 16
      src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToBrowserTypeMappingBhv.java
  52. 41 16
      src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToLabelTypeMappingBhv.java
  53. 41 16
      src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToRoleTypeMappingBhv.java
  54. 65 29
      src/main/java/jp/sf/fess/db/bsbhv/BsDataCrawlingConfigBhv.java
  55. 41 16
      src/main/java/jp/sf/fess/db/bsbhv/BsFailureUrlBhv.java
  56. 41 16
      src/main/java/jp/sf/fess/db/bsbhv/BsFavoriteLogBhv.java
  57. 65 29
      src/main/java/jp/sf/fess/db/bsbhv/BsFileAuthenticationBhv.java
  58. 41 16
      src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToBrowserTypeMappingBhv.java
  59. 41 16
      src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToLabelTypeMappingBhv.java
  60. 41 16
      src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToRoleTypeMappingBhv.java
  61. 65 29
      src/main/java/jp/sf/fess/db/bsbhv/BsFileCrawlingConfigBhv.java
  62. 1474 0
      src/main/java/jp/sf/fess/db/bsbhv/BsJobLogBhv.java
  63. 65 29
      src/main/java/jp/sf/fess/db/bsbhv/BsLabelTypeBhv.java
  64. 41 16
      src/main/java/jp/sf/fess/db/bsbhv/BsLabelTypeToRoleTypeMappingBhv.java
  65. 65 29
      src/main/java/jp/sf/fess/db/bsbhv/BsOverlappingHostBhv.java
  66. 65 29
      src/main/java/jp/sf/fess/db/bsbhv/BsPathMappingBhv.java
  67. 65 29
      src/main/java/jp/sf/fess/db/bsbhv/BsRequestHeaderBhv.java
  68. 64 29
      src/main/java/jp/sf/fess/db/bsbhv/BsRoleTypeBhv.java
  69. 1831 0
      src/main/java/jp/sf/fess/db/bsbhv/BsScheduledJobBhv.java
  70. 41 16
      src/main/java/jp/sf/fess/db/bsbhv/BsSearchFieldLogBhv.java
  71. 41 16
      src/main/java/jp/sf/fess/db/bsbhv/BsSearchLogBhv.java
  72. 40 16
      src/main/java/jp/sf/fess/db/bsbhv/BsUserInfoBhv.java
  73. 65 29
      src/main/java/jp/sf/fess/db/bsbhv/BsWebAuthenticationBhv.java
  74. 41 16
      src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToBrowserTypeMappingBhv.java
  75. 41 16
      src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToLabelTypeMappingBhv.java
  76. 41 16
      src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToRoleTypeMappingBhv.java
  77. 65 29
      src/main/java/jp/sf/fess/db/bsbhv/BsWebCrawlingConfigBhv.java
  78. 496 0
      src/main/java/jp/sf/fess/db/bsentity/BsJobLog.java
  79. 657 0
      src/main/java/jp/sf/fess/db/bsentity/BsScheduledJob.java
  80. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/BrowserTypeDbm.java
  81. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/ClickLogDbm.java
  82. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/CrawlingSessionDbm.java
  83. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/CrawlingSessionInfoDbm.java
  84. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataConfigToBrowserTypeMappingDbm.java
  85. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataConfigToLabelTypeMappingDbm.java
  86. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataConfigToRoleTypeMappingDbm.java
  87. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataCrawlingConfigDbm.java
  88. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/FailureUrlDbm.java
  89. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/FavoriteLogDbm.java
  90. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileAuthenticationDbm.java
  91. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileConfigToBrowserTypeMappingDbm.java
  92. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileConfigToLabelTypeMappingDbm.java
  93. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileConfigToRoleTypeMappingDbm.java
  94. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileCrawlingConfigDbm.java
  95. 430 0
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/JobLogDbm.java
  96. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/LabelTypeDbm.java
  97. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/LabelTypeToRoleTypeMappingDbm.java
  98. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/OverlappingHostDbm.java
  99. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/PathMappingDbm.java
  100. 1 1
      src/main/java/jp/sf/fess/db/bsentity/dbmeta/RequestHeaderDbm.java

+ 12 - 3
.gitignore

@@ -1,6 +1,15 @@
-/target
-/work
-/bin
+/target/
+/work/
+/bin/
+/mydbflute/
+/solr/data/
 /src/main/webapp/WEB-INF/classes/
 /src/main/webapp/WEB-INF/lib/
+/src/main/webapp/jar/
+/dbflute_h2/log/*.log
+/dbflute_mysql/log/*.log
+/dbflute_oracle/log/*.log
+/src/main/webapp/WEB-INF/conf/*.properties
+/src/main/webapp/WEB-INF/db/*.lock.db
+/src/main/webapp/WEB-INF/logs/fess*
 .classpath

+ 1 - 1
dbflute_h2/_project.bat

@@ -2,7 +2,7 @@
 
 set ANT_OPTS=-Xmx512m
 
-set DBFLUTE_HOME=..\mydbflute\dbflute-1.0.4H
+set DBFLUTE_HOME=..\mydbflute\dbflute-1.0.4K
 
 set MY_PROJECT_NAME=h2
 

+ 1 - 1
dbflute_h2/_project.sh

@@ -2,7 +2,7 @@
 
 export ANT_OPTS=-Xmx512m
 
-export DBFLUTE_HOME=../mydbflute/dbflute-1.0.4H
+export DBFLUTE_HOME=../mydbflute/dbflute-1.0.4K
 
 export MY_PROJECT_NAME=h2
 

+ 1 - 1
dbflute_mysql/_project.bat

@@ -2,7 +2,7 @@
 
 set ANT_OPTS=-Xmx512m
 
-set DBFLUTE_HOME=..\mydbflute\dbflute-1.0.4H
+set DBFLUTE_HOME=..\mydbflute\dbflute-1.0.4K
 
 set MY_PROJECT_NAME=fess
 

+ 1 - 1
dbflute_mysql/_project.sh

@@ -2,7 +2,7 @@
 
 export ANT_OPTS=-Xmx512m
 
-export DBFLUTE_HOME=../mydbflute/dbflute-1.0.4H
+export DBFLUTE_HOME=../mydbflute/dbflute-1.0.4K
 
 export MY_PROJECT_NAME=fess
 

+ 1 - 1
dbflute_oracle/_project.bat

@@ -2,7 +2,7 @@
 
 set ANT_OPTS=-Xmx512m
 
-set DBFLUTE_HOME=..\mydbflute\dbflute-1.0.4H
+set DBFLUTE_HOME=..\mydbflute\dbflute-1.0.4K
 
 set MY_PROJECT_NAME=fess
 

+ 1 - 1
dbflute_oracle/_project.sh

@@ -2,7 +2,7 @@
 
 export ANT_OPTS=-Xmx512m
 
-export DBFLUTE_HOME=../mydbflute/dbflute-1.0.4H
+export DBFLUTE_HOME=../mydbflute/dbflute-1.0.4K
 
 export MY_PROJECT_NAME=fess
 

+ 16 - 11
pom.xml

@@ -33,7 +33,7 @@
     </developer>
   </developers>
   <issueManagement>
-    <url><![CDATA[http://sourceforge.jp/projects/fess/ticket/]]></url>
+    <url>https://github.com/codelibs/fess/issues</url>
   </issueManagement>
   <distributionManagement>
     <repository>
@@ -46,9 +46,9 @@
     </site>
   </distributionManagement>
   <scm>
-    <connection>scm:svn:http://svn.sourceforge.jp/svnroot/fess/fess/trunk</connection>
-    <developerConnection>scm:svn:https://svn.sourceforge.jp/svnroot/fess/fess/trunk</developerConnection>
-    <url>http://sourceforge.jp/projects/fess/svn/view/</url>
+    <connection>scm:git:git@github.com:codelibs/fess.git</connection>
+    <developerConnection>scm:git:git@github.com:codelibs/fess.git</developerConnection>
+    <url>https://github.com/codelibs/fess</url>
   </scm>
   <mailingLists>
     <mailingList>
@@ -262,16 +262,16 @@
       <plugin>
         <groupId>org.seasar.dbflute</groupId>
         <artifactId>dbflute-maven-plugin</artifactId>
-        <version>1.0.1</version>
+        <version>1.0.2-SNAPSHOT</version>
         <dependencies>
           <dependency>
             <groupId>jp.sf.fess</groupId>
             <artifactId>fess-crud-template</artifactId>
-            <version>1.0.0</version>
+            <version>1.0.1-SNAPSHOT</version>
           </dependency>
         </dependencies>
         <configuration>
-          <dbfluteVersion>1.0.4H</dbfluteVersion>
+          <dbfluteVersion>1.0.4K</dbfluteVersion>
           <rootPackage>jp.sf.fess</rootPackage>
           <dbPackage>jp.sf.fess.db</dbPackage>
           <actionPackageName>action.admin</actionPackageName>
@@ -633,12 +633,12 @@
     <dependency>
       <groupId>org.seasar.dbflute</groupId>
       <artifactId>dbflute-runtime</artifactId>
-      <version>1.0.4H</version>
+      <version>1.0.4K</version>
     </dependency>
     <dependency>
-      <groupId>jp.sf.fess.chronos</groupId>
-      <artifactId>s2chronos-extension</artifactId>
-      <version>1.0.2</version>
+      <groupId>org.quartz-scheduler</groupId>
+      <artifactId>quartz</artifactId>
+      <version>2.2.0</version>
     </dependency>
     <!-- Geronimo -->
     <dependency>
@@ -819,6 +819,11 @@
       <artifactId>handlebars</artifactId>
       <version>1.1.1</version>
     </dependency>
+    <dependency>
+      <groupId>org.codehaus.groovy</groupId>
+      <artifactId>groovy-all</artifactId>
+      <version>2.1.7</version>
+    </dependency>
     <!-- Removed from war -->
     <dependency>
       <groupId>junit</groupId>

+ 44 - 0
src/main/config/h2/fess.ddl

@@ -22,6 +22,8 @@ DROP TABLE IF EXISTS REQUEST_HEADER;
 DROP TABLE IF EXISTS OVERLAPPING_HOST;
 DROP TABLE IF EXISTS CRAWLING_SESSION;
 DROP TABLE IF EXISTS PATH_MAPPING;
+DROP TABLE IF EXISTS JOB_LOG;
+DROP TABLE IF EXISTS SCHEDULED_JOB;
 DROP TABLE IF EXISTS FILE_CONFIG_TO_BROWSER_TYPE_MAPPING;
 DROP TABLE IF EXISTS WEB_CONFIG_TO_BROWSER_TYPE_MAPPING;
 DROP TABLE IF EXISTS FILE_CRAWLING_CONFIG;
@@ -124,6 +126,43 @@ CREATE TABLE FILE_CONFIG_TO_BROWSER_TYPE_MAPPING(
   FOREIGN KEY (BROWSER_TYPE_ID) REFERENCES BROWSER_TYPE (ID)
 );
 
+/**********************************/
+/* Table Name: Scheduled Job */
+/**********************************/
+CREATE TABLE SCHEDULED_JOB(
+  ID IDENTITY NOT NULL PRIMARY KEY,
+  NAME VARCHAR(100) NOT NULL,
+  TARGET VARCHAR(100) NOT NULL,
+  CRON_EXPRESSION VARCHAR(100) NOT NULL,
+  SCRIPT_TYPE VARCHAR(100) NOT NULL,
+  SCRIPT_DATA VARCHAR(4000),
+  CRAWLER VARCHAR(1) NOT NULL,
+  JOB_LOGGING VARCHAR(1) NOT NULL,
+  SORT_ORDER INTEGER NOT NULL,
+  CREATED_BY VARCHAR(255) NOT NULL,
+  CREATED_TIME TIMESTAMP NOT NULL,
+  UPDATED_BY VARCHAR(255),
+  UPDATED_TIME TIMESTAMP,
+  DELETED_BY VARCHAR(255),
+  DELETED_TIME TIMESTAMP,
+  VERSION_NO INTEGER NOT NULL
+);
+
+/**********************************/
+/* Table Name: Job Log */
+/**********************************/
+CREATE TABLE JOB_LOG(
+  ID IDENTITY NOT NULL PRIMARY KEY,
+  JOB_NAME VARCHAR(100) NOT NULL,
+  JOB_STATUS VARCHAR(10) NOT NULL,
+  TARGET VARCHAR(100) NOT NULL,
+  SCRIPT_TYPE VARCHAR(100) NOT NULL,
+  SCRIPT_DATA VARCHAR(4000),
+  SCRIPT_RESULT VARCHAR(4000),
+  START_TIME TIMESTAMP NOT NULL,
+  END_TIME TIMESTAMP NOT NULL
+);
+
 /**********************************/
 /* Table Name: Path Mapping */
 /**********************************/
@@ -514,4 +553,9 @@ INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME,
 INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (3, 'au', 'au', 3, 'admin', '2000-01-01 00:00:00', 1);
 INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (4, 'Softbank', 'softbank', 4, 'admin', '2000-01-01 00:00:00', 1);
 
+INSERT INTO PUBLIC.SCHEDULED_JOB(ID, NAME, TARGET, CRON_EXPRESSION, SCRIPT_TYPE, SCRIPT_DATA, CRAWLER, JOB_LOGGING, SORT_ORDER, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETED_BY, DELETED_TIME, VERSION_NO) VALUES
+(1, 'Crawler', 'all', '0 0 0 * * ?', 'groovy', 'return container.getComponent("crawlJob").execute(executor);', 'T', 'T', 0, 'system', TIMESTAMP '2013-01-01 00:00:00.000', 'system', TIMESTAMP '2013-01-01 00:00:00.000', NULL, NULL, 0),
+(2, 'Minutely', 'all', '0 * * * * ?', 'groovy', 'return container.getComponent("minutelyJob").execute();', 'F', 'F', 10, 'system', TIMESTAMP '2013-01-01 00:00:00.000', 'system', TIMESTAMP '2013-01-01 00:00:00.000', NULL, NULL, 0),
+(3, 'Hourly', 'all', '0 0 * * * ?', 'groovy', 'return container.getComponent("houryJob").execute();', 'F', 'F', 20, 'system', TIMESTAMP '2013-01-01 00:00:00.000', 'system', TIMESTAMP '2013-01-01 00:00:00.000', NULL, NULL, 0),
+(4, 'Daily', 'all', '0 0 0 * * ?', 'groovy', 'return container.getComponent("dailyJob").execute();', 'F', 'F', 30, 'system', TIMESTAMP '2013-01-01 00:00:00.000', 'system', TIMESTAMP '2013-01-01 00:00:00.000', NULL, NULL, 0);
 

+ 47 - 4
src/main/config/mysql/fess.ddl

@@ -22,6 +22,8 @@ DROP TABLE IF EXISTS REQUEST_HEADER;
 DROP TABLE IF EXISTS OVERLAPPING_HOST;
 DROP TABLE IF EXISTS CRAWLING_SESSION;
 DROP TABLE IF EXISTS PATH_MAPPING;
+DROP TABLE IF EXISTS JOB_LOG;
+DROP TABLE IF EXISTS SCHEDULED_JOB;
 DROP TABLE IF EXISTS FILE_CONFIG_TO_BROWSER_TYPE_MAPPING;
 DROP TABLE IF EXISTS WEB_CONFIG_TO_BROWSER_TYPE_MAPPING;
 DROP TABLE IF EXISTS FILE_CRAWLING_CONFIG;
@@ -124,6 +126,43 @@ CREATE TABLE FILE_CONFIG_TO_BROWSER_TYPE_MAPPING(
   FOREIGN KEY (BROWSER_TYPE_ID) REFERENCES BROWSER_TYPE (ID)
 );
 
+/**********************************/
+/* Table Name: Scheduled Job */
+/**********************************/
+CREATE TABLE SCHEDULED_JOB(
+  ID BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+  NAME VARCHAR(100) NOT NULL,
+  TARGET VARCHAR(100) NOT NULL,
+  CRON_EXPRESSION VARCHAR(100) NOT NULL,
+  SCRIPT_TYPE VARCHAR(100) NOT NULL,
+  SCRIPT_DATA TEXT,
+  CRAWLER VARCHAR(1) NOT NULL,
+  JOB_LOGGING VARCHAR(1) NOT NULL,
+  SORT_ORDER INTEGER NOT NULL,
+  CREATED_BY VARCHAR(255) NOT NULL,
+  CREATED_TIME TIMESTAMP NOT NULL,
+  UPDATED_BY VARCHAR(255),
+  UPDATED_TIME TIMESTAMP,
+  DELETED_BY VARCHAR(255),
+  DELETED_TIME TIMESTAMP,
+  VERSION_NO INTEGER NOT NULL
+);
+
+/**********************************/
+/* Table Name: Job Log */
+/**********************************/
+CREATE TABLE JOB_LOG(
+  ID BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+  JOB_NAME VARCHAR(100) NOT NULL,
+  JOB_STATUS VARCHAR(10) NOT NULL,
+  TARGET VARCHAR(100) NOT NULL,
+  SCRIPT_TYPE VARCHAR(100) NOT NULL,
+  SCRIPT_DATA TEXT,
+  SCRIPT_RESULT TEXT,
+  START_TIME TIMESTAMP NOT NULL,
+  END_TIME TIMESTAMP NOT NULL
+);
+
 /**********************************/
 /* Table Name: Path Mapping */
 /**********************************/
@@ -509,9 +548,13 @@ CREATE INDEX IDX_SEARCH_FIELD_LOG_NAME ON SEARCH_FIELD_LOG (NAME);
 
 CREATE INDEX IDX_SESSION_NAME_EXPIRED ON CRAWLING_SESSION (NAME, EXPIRED_TIME);
 
-INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (1, 'PC', 'pc', 1, 'admin', '2000-01-01 00:00:00', 1);
-INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (2, 'DoCoMo', 'docomo', 2, 'admin', '2000-01-01 00:00:00', 1);
-INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (3, 'au', 'au', 3, 'admin', '2000-01-01 00:00:00', 1);
-INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (4, 'Softbank', 'softbank', 4, 'admin', '2000-01-01 00:00:00', 1);
+INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (1, 'PC', 'pc', 1, 'system', '2000-01-01 00:00:00', 1);
+INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (2, 'DoCoMo', 'docomo', 2, 'system', '2000-01-01 00:00:00', 1);
+INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (3, 'au', 'au', 3, 'system', '2000-01-01 00:00:00', 1);
+INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (4, 'Softbank', 'softbank', 4, 'system', '2000-01-01 00:00:00', 1);
 
+INSERT INTO SCHEDULED_JOB (ID, NAME, TARGET, CRON_EXPRESSION, SCRIPT_TYPE, SCRIPT_DATA, CRAWLER, JOB_LOGGING, SORT_ORDER, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, VERSION_NO) VALUES (1, 'Crawler', 'all', '0 0 0 * * ?', 'groovy', 'return container.getComponent("crawlJob").execute(executor);', 'T', 'T', 0, 'system', '2000-01-01 00:00:00', 'system', '2000-01-01 00:00:00', 0);
+INSERT INTO SCHEDULED_JOB (ID, NAME, TARGET, CRON_EXPRESSION, SCRIPT_TYPE, SCRIPT_DATA, CRAWLER, JOB_LOGGING, SORT_ORDER, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, VERSION_NO) VALUES (2, 'Minutely', 'all', '0 * * * * ?', 'groovy', 'return container.getComponent("minutelyJob").execute();', 'F', 'F', 10, 'system', '2000-01-01 00:00:00', 'system', '2000-01-01 00:00:00', 0);
+INSERT INTO SCHEDULED_JOB (ID, NAME, TARGET, CRON_EXPRESSION, SCRIPT_TYPE, SCRIPT_DATA, CRAWLER, JOB_LOGGING, SORT_ORDER, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, VERSION_NO) VALUES (3, 'Hourly', 'all', '0 0 * * * ?', 'groovy', 'return container.getComponent("houryJob").execute();', 'F', 'F', 20, 'system', '2000-01-01 00:00:00', 'system', '2000-01-01 00:00:00', 0);
+INSERT INTO SCHEDULED_JOB (ID, NAME, TARGET, CRON_EXPRESSION, SCRIPT_TYPE, SCRIPT_DATA, CRAWLER, JOB_LOGGING, SORT_ORDER, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, VERSION_NO) VALUES (4, 'Daily', 'all', '0 0 0 * * ?', 'groovy', 'return container.getComponent("dailyJob").execute();', 'F', 'F', 30, 'system', '2000-01-01 00:00:00', 'system', '2000-01-01 00:00:00', 0);
 

+ 50 - 5
src/main/config/oracle/fess.ddl

@@ -3,6 +3,8 @@ DROP SEQUENCE BROWSER_TYPE_SEQ;
 DROP SEQUENCE FILE_CRAWLING_CONFIG_SEQ;
 DROP SEQUENCE WEB_CONFIG_TO_B_TYPE_SEQ;
 DROP SEQUENCE FILE_CONFIG_TO_B_TYPE_SEQ;
+DROP SEQUENCE JOB_LOG_SEQ;
+DROP SEQUENCE SCHEDULED_JOB_SEQ;
 DROP SEQUENCE PATH_MAPPING_SEQ;
 DROP SEQUENCE CRAWLING_SESSION_SEQ;
 DROP SEQUENCE OVERLAPPING_HOST_SEQ;
@@ -52,6 +54,8 @@ DROP TABLE "REQUEST_HEADER";
 DROP TABLE "OVERLAPPING_HOST";
 DROP TABLE "CRAWLING_SESSION";
 DROP TABLE "PATH_MAPPING";
+DROP TABLE "SCHEDULED_JOB";
+DROP TABLE "JOB_LOG";
 DROP TABLE "FILE_CONFIG_TO_B_TYPE";
 DROP TABLE "WEB_CONFIG_TO_B_TYPE";
 DROP TABLE "FILE_CRAWLING_CONFIG";
@@ -149,6 +153,41 @@ CREATE TABLE "FILE_CONFIG_TO_B_TYPE"(
   FOREIGN KEY (BROWSER_TYPE_ID) REFERENCES BROWSER_TYPE (ID)
 );
 
+CREATE TABLE "SCHEDULED_JOB"(
+  "ID" NUMBER(18,0) NOT NULL,
+  "NAME" VARCHAR2(100) NOT NULL,
+  "TARGET" VARCHAR2(100) NOT NULL,
+  "CRON_EXPRESSION" VARCHAR2(100) NOT NULL,
+  "SCRIPT_TYPE" VARCHAR2(100) NOT NULL,
+  "SCRIPT_DATA" VARCHAR2(4000),
+  "CRAWLER" VARCHAR2(1) NOT NULL,
+  "JOB_LOGGING" VARCHAR2(1) NOT NULL,
+  "SORT_ORDER" NUMBER(9,0) NOT NULL,
+  "CREATED_BY" VARCHAR2(255) NOT NULL,
+  "CREATED_TIME" TIMESTAMP NOT NULL,
+  "UPDATED_BY" VARCHAR2(255),
+  "UPDATED_TIME" TIMESTAMP,
+  "DELETED_BY" VARCHAR2(255),
+  "DELETED_TIME" TIMESTAMP,
+  "VERSION_NO" NUMBER(9,0) NOT NULL,
+
+  CONSTRAINT "SCHEDULED_JOB_PK" PRIMARY KEY ("ID") ENABLE
+);
+
+CREATE TABLE "JOB_LOG"(
+  "ID" NUMBER(18,0) NOT NULL,
+  "JOB_NAME" VARCHAR2(100) NOT NULL,
+  "JOB_STATUS" VARCHAR2(10) NOT NULL,
+  "TARGET" VARCHAR2(100) NOT NULL,
+  "SCRIPT_TYPE" VARCHAR2(100) NOT NULL,
+  "SCRIPT_DATA" VARCHAR2(4000),
+  "SCRIPT_RESULT" VARCHAR2(4000),
+  "START_TIME" TIMESTAMP NOT NULL,
+  "END_TIME" TIMESTAMP NOT NULL,
+
+  CONSTRAINT "JOB_LOG_PK" PRIMARY KEY ("ID") ENABLE
+);
+
 CREATE TABLE "PATH_MAPPING"(
   "ID" NUMBER(18,0) NOT NULL,
   "REGEX" VARCHAR2(1000) NOT NULL,
@@ -511,10 +550,12 @@ CREATE INDEX IDX_S_F_LOG_NAME ON SEARCH_FIELD_LOG (NAME);
 CREATE INDEX IDX_S_N_EXPIRED ON CRAWLING_SESSION (NAME, EXPIRED_TIME);
 
 CREATE SEQUENCE WEB_CRAWLING_CONFIG_SEQ START WITH 1 INCREMENT BY 50;
-CREATE SEQUENCE BROWSER_TYPE_SEQ START WITH 1 INCREMENT BY 50;
+CREATE SEQUENCE BROWSER_TYPE_SEQ START WITH 5 INCREMENT BY 50;
 CREATE SEQUENCE FILE_CRAWLING_CONFIG_SEQ START WITH 1 INCREMENT BY 50;
 CREATE SEQUENCE WEB_CONFIG_TO_B_TYPE_SEQ START WITH 1 INCREMENT BY 50;
 CREATE SEQUENCE FILE_CONFIG_TO_B_TYPE_SEQ START WITH 1 INCREMENT BY 50;
+CREATE SEQUENCE JOB_LOG_SEQ START WITH 1 INCREMENT BY 50;
+CREATE SEQUENCE SCHEDULED_JOB_SEQ START WITH 5 INCREMENT BY 50;
 CREATE SEQUENCE PATH_MAPPING_SEQ START WITH 1 INCREMENT BY 50;
 CREATE SEQUENCE CRAWLING_SESSION_SEQ START WITH 1 INCREMENT BY 50;
 CREATE SEQUENCE OVERLAPPING_HOST_SEQ START WITH 1 INCREMENT BY 50;
@@ -540,9 +581,13 @@ CREATE SEQUENCE FILE_AUTHENTICATION_SEQ START WITH 1 INCREMENT BY 50;
 CREATE SEQUENCE SEARCH_FIELD_LOG_SEQ START WITH 1 INCREMENT BY 50;
 CREATE SEQUENCE FAVORITE_LOG_SEQ START WITH 1 INCREMENT BY 50;
 
-INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (1, 'PC', 'pc', 1, 'admin', to_date('2000-01-01', 'yyyy-MM-dd'), 1);
-INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (2, 'DoCoMo', 'docomo', 2, 'admin', to_date('2000-01-01', 'yyyy-MM-dd'), 1);
-INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (3, 'au', 'au', 3, 'admin', to_date('2000-01-01', 'yyyy-MM-dd'), 1);
-INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (4, 'Softbank', 'softbank', 4, 'admin', to_date('2000-01-01', 'yyyy-MM-dd'), 1);
+INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (1, 'PC', 'pc', 1, 'system', to_date('2000-01-01', 'yyyy-MM-dd'), 1);
+INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (2, 'DoCoMo', 'docomo', 2, 'system', to_date('2000-01-01', 'yyyy-MM-dd'), 1);
+INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (3, 'au', 'au', 3, 'system', to_date('2000-01-01', 'yyyy-MM-dd'), 1);
+INSERT INTO BROWSER_TYPE (ID, NAME, VALUE, SORT_ORDER, CREATED_BY, CREATED_TIME, VERSION_NO) VALUES (4, 'Softbank', 'softbank', 4, 'system', to_date('2000-01-01', 'yyyy-MM-dd'), 1);
 
+INSERT INTO SCHEDULED_JOB (ID, NAME, TARGET, CRON_EXPRESSION, SCRIPT_TYPE, SCRIPT_DATA, CRAWLER, JOB_LOGGING, SORT_ORDER, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, VERSION_NO) VALUES (1, 'Crawler', 'all', '0 0 0 * * ?', 'groovy', 'return container.getComponent("crawlJob").execute(executor);', 'T', 'T', 0, 'system', to_date('2000-01-01', 'yyyy-MM-dd'), 'system', to_date('2000-01-01', 'yyyy-MM-dd'), 0);
+INSERT INTO SCHEDULED_JOB (ID, NAME, TARGET, CRON_EXPRESSION, SCRIPT_TYPE, SCRIPT_DATA, CRAWLER, JOB_LOGGING, SORT_ORDER, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, VERSION_NO) VALUES (2, 'Minutely', 'all', '0 * * * * ?', 'groovy', 'return container.getComponent("minutelyJob").execute();', 'F', 'F', 10, 'system', to_date('2000-01-01', 'yyyy-MM-dd'), 'system', to_date('2000-01-01', 'yyyy-MM-dd'), 0);
+INSERT INTO SCHEDULED_JOB (ID, NAME, TARGET, CRON_EXPRESSION, SCRIPT_TYPE, SCRIPT_DATA, CRAWLER, JOB_LOGGING, SORT_ORDER, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, VERSION_NO) VALUES (3, 'Hourly', 'all', '0 0 * * * ?', 'groovy', 'return container.getComponent("houryJob").execute();', 'F', 'F', 20, 'system', to_date('2000-01-01', 'yyyy-MM-dd'), 'system', to_date('2000-01-01', 'yyyy-MM-dd'), 0);
+INSERT INTO SCHEDULED_JOB (ID, NAME, TARGET, CRON_EXPRESSION, SCRIPT_TYPE, SCRIPT_DATA, CRAWLER, JOB_LOGGING, SORT_ORDER, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, VERSION_NO) VALUES (4, 'Daily', 'all', '0 0 0 * * ?', 'groovy', 'return container.getComponent("dailyJob").execute();', 'F', 'F', 30, 'system', to_date('2000-01-01', 'yyyy-MM-dd'), 'system', to_date('2000-01-01', 'yyyy-MM-dd'), 0);
 

+ 314 - 0
src/main/config/tablemeta.properties

@@ -1035,6 +1035,121 @@ fileCrawlingConfig.versionNo.doubleTypeParam=
 fileCrawlingConfig.versionNo.dateTypeParam=
 fileCrawlingConfig.versionNo.defaultValue=
 
+jobLog.ignored=false
+jobLog.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.Mask;import org.seasar.struts.annotation.Msg;
+jobLog.converterToSearchParams=
+jobLog.converterToPager=
+jobLog.converterToActionForm=
+jobLog.converterToEntity=
+jobLog.id.requiredParam=
+jobLog.id.additionalAnnotation=
+jobLog.id.annotation=
+jobLog.id.enableJavaType=true
+jobLog.id.longTypeParam=
+jobLog.id.integerTypeParam=
+jobLog.id.shortTypeParam=
+jobLog.id.byteTypeParam=
+jobLog.id.floatTypeParam=
+jobLog.id.doubleTypeParam=
+jobLog.id.dateTypeParam=
+jobLog.id.defaultValue=
+jobLog.jobName.requiredParam=
+jobLog.jobName.additionalAnnotation=
+jobLog.jobName.annotation=
+jobLog.jobName.enableJavaType=true
+jobLog.jobName.longTypeParam=
+jobLog.jobName.integerTypeParam=
+jobLog.jobName.shortTypeParam=
+jobLog.jobName.byteTypeParam=
+jobLog.jobName.floatTypeParam=
+jobLog.jobName.doubleTypeParam=
+jobLog.jobName.dateTypeParam=
+jobLog.jobName.defaultValue=
+jobLog.jobStatus.requiredParam=
+jobLog.jobStatus.additionalAnnotation=
+jobLog.jobStatus.annotation=
+jobLog.jobStatus.enableJavaType=true
+jobLog.jobStatus.longTypeParam=
+jobLog.jobStatus.integerTypeParam=
+jobLog.jobStatus.shortTypeParam=
+jobLog.jobStatus.byteTypeParam=
+jobLog.jobStatus.floatTypeParam=
+jobLog.jobStatus.doubleTypeParam=
+jobLog.jobStatus.dateTypeParam=
+jobLog.jobStatus.defaultValue=
+jobLog.target.requiredParam=
+jobLog.target.additionalAnnotation=
+jobLog.target.annotation=
+jobLog.target.enableJavaType=true
+jobLog.target.longTypeParam=
+jobLog.target.integerTypeParam=
+jobLog.target.shortTypeParam=
+jobLog.target.byteTypeParam=
+jobLog.target.floatTypeParam=
+jobLog.target.doubleTypeParam=
+jobLog.target.dateTypeParam=
+jobLog.target.defaultValue=
+jobLog.scriptType.requiredParam=
+jobLog.scriptType.additionalAnnotation=
+jobLog.scriptType.annotation=
+jobLog.scriptType.enableJavaType=true
+jobLog.scriptType.longTypeParam=
+jobLog.scriptType.integerTypeParam=
+jobLog.scriptType.shortTypeParam=
+jobLog.scriptType.byteTypeParam=
+jobLog.scriptType.floatTypeParam=
+jobLog.scriptType.doubleTypeParam=
+jobLog.scriptType.dateTypeParam=
+jobLog.scriptType.defaultValue=
+jobLog.scriptData.requiredParam=
+jobLog.scriptData.additionalAnnotation=
+jobLog.scriptData.annotation=
+jobLog.scriptData.enableJavaType=true
+jobLog.scriptData.longTypeParam=
+jobLog.scriptData.integerTypeParam=
+jobLog.scriptData.shortTypeParam=
+jobLog.scriptData.byteTypeParam=
+jobLog.scriptData.floatTypeParam=
+jobLog.scriptData.doubleTypeParam=
+jobLog.scriptData.dateTypeParam=
+jobLog.scriptData.defaultValue=
+jobLog.scriptResult.requiredParam=
+jobLog.scriptResult.additionalAnnotation=
+jobLog.scriptResult.annotation=
+jobLog.scriptResult.enableJavaType=true
+jobLog.scriptResult.longTypeParam=
+jobLog.scriptResult.integerTypeParam=
+jobLog.scriptResult.shortTypeParam=
+jobLog.scriptResult.byteTypeParam=
+jobLog.scriptResult.floatTypeParam=
+jobLog.scriptResult.doubleTypeParam=
+jobLog.scriptResult.dateTypeParam=
+jobLog.scriptResult.defaultValue=
+jobLog.startTime.requiredParam=
+jobLog.startTime.additionalAnnotation=
+jobLog.startTime.annotation=
+jobLog.startTime.enableJavaType=true
+jobLog.startTime.longTypeParam=
+jobLog.startTime.integerTypeParam=
+jobLog.startTime.shortTypeParam=
+jobLog.startTime.byteTypeParam=
+jobLog.startTime.floatTypeParam=
+jobLog.startTime.doubleTypeParam=
+jobLog.startTime.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
+jobLog.startTime.defaultValue=
+jobLog.endTime.requiredParam=
+jobLog.endTime.additionalAnnotation=
+jobLog.endTime.annotation=
+jobLog.endTime.enableJavaType=true
+jobLog.endTime.longTypeParam=
+jobLog.endTime.integerTypeParam=
+jobLog.endTime.shortTypeParam=
+jobLog.endTime.byteTypeParam=
+jobLog.endTime.floatTypeParam=
+jobLog.endTime.doubleTypeParam=
+jobLog.endTime.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
+jobLog.endTime.defaultValue=
+
 labelType.ignored=false
 labelType.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.Mask;import org.seasar.struts.annotation.Msg;
 labelType.converterToSearchParams=
@@ -1768,6 +1883,205 @@ roleType.versionNo.doubleTypeParam=
 roleType.versionNo.dateTypeParam=
 roleType.versionNo.defaultValue=
 
+scheduledJob.ignored=false
+scheduledJob.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.Mask;import org.seasar.struts.annotation.Msg;import jp.sf.fess.annotation.CronExpression;
+scheduledJob.converterToSearchParams=
+scheduledJob.converterToPager=
+scheduledJob.converterToActionForm=
+scheduledJob.converterToEntity=
+scheduledJob.id.requiredParam=
+scheduledJob.id.additionalAnnotation=
+scheduledJob.id.annotation=
+scheduledJob.id.enableJavaType=true
+scheduledJob.id.longTypeParam=
+scheduledJob.id.integerTypeParam=
+scheduledJob.id.shortTypeParam=
+scheduledJob.id.byteTypeParam=
+scheduledJob.id.floatTypeParam=
+scheduledJob.id.doubleTypeParam=
+scheduledJob.id.dateTypeParam=
+scheduledJob.id.defaultValue=
+scheduledJob.name.requiredParam=
+scheduledJob.name.additionalAnnotation=@Maxbytelength(maxbytelength = 100)
+scheduledJob.name.annotation=
+scheduledJob.name.enableJavaType=true
+scheduledJob.name.longTypeParam=
+scheduledJob.name.integerTypeParam=
+scheduledJob.name.shortTypeParam=
+scheduledJob.name.byteTypeParam=
+scheduledJob.name.floatTypeParam=
+scheduledJob.name.doubleTypeParam=
+scheduledJob.name.dateTypeParam=
+scheduledJob.name.defaultValue=
+scheduledJob.target.requiredParam=
+scheduledJob.target.additionalAnnotation=@Maxbytelength(maxbytelength = 100)
+scheduledJob.target.annotation=
+scheduledJob.target.enableJavaType=true
+scheduledJob.target.longTypeParam=
+scheduledJob.target.integerTypeParam=
+scheduledJob.target.shortTypeParam=
+scheduledJob.target.byteTypeParam=
+scheduledJob.target.floatTypeParam=
+scheduledJob.target.doubleTypeParam=
+scheduledJob.target.dateTypeParam=
+scheduledJob.target.defaultValue=
+scheduledJob.cronExpression.requiredParam=
+scheduledJob.cronExpression.additionalAnnotation=@Maxbytelength(maxbytelength = 100)@CronExpression
+scheduledJob.cronExpression.annotation=
+scheduledJob.cronExpression.enableJavaType=true
+scheduledJob.cronExpression.longTypeParam=
+scheduledJob.cronExpression.integerTypeParam=
+scheduledJob.cronExpression.shortTypeParam=
+scheduledJob.cronExpression.byteTypeParam=
+scheduledJob.cronExpression.floatTypeParam=
+scheduledJob.cronExpression.doubleTypeParam=
+scheduledJob.cronExpression.dateTypeParam=
+scheduledJob.cronExpression.defaultValue=
+scheduledJob.scriptType.requiredParam=
+scheduledJob.scriptType.additionalAnnotation=@Maxbytelength(maxbytelength = 100)
+scheduledJob.scriptType.annotation=
+scheduledJob.scriptType.enableJavaType=true
+scheduledJob.scriptType.longTypeParam=
+scheduledJob.scriptType.integerTypeParam=
+scheduledJob.scriptType.shortTypeParam=
+scheduledJob.scriptType.byteTypeParam=
+scheduledJob.scriptType.floatTypeParam=
+scheduledJob.scriptType.doubleTypeParam=
+scheduledJob.scriptType.dateTypeParam=
+scheduledJob.scriptType.defaultValue=
+scheduledJob.scriptData.requiredParam=
+scheduledJob.scriptData.additionalAnnotation=@Maxbytelength(maxbytelength = 4000)
+scheduledJob.scriptData.annotation=
+scheduledJob.scriptData.enableJavaType=true
+scheduledJob.scriptData.longTypeParam=
+scheduledJob.scriptData.integerTypeParam=
+scheduledJob.scriptData.shortTypeParam=
+scheduledJob.scriptData.byteTypeParam=
+scheduledJob.scriptData.floatTypeParam=
+scheduledJob.scriptData.doubleTypeParam=
+scheduledJob.scriptData.dateTypeParam=
+scheduledJob.scriptData.defaultValue=
+scheduledJob.crawler.requiredParam=
+scheduledJob.crawler.additionalAnnotation=
+scheduledJob.crawler.annotation=// ignore
+scheduledJob.crawler.enableJavaType=true
+scheduledJob.crawler.longTypeParam=
+scheduledJob.crawler.integerTypeParam=
+scheduledJob.crawler.shortTypeParam=
+scheduledJob.crawler.byteTypeParam=
+scheduledJob.crawler.floatTypeParam=
+scheduledJob.crawler.doubleTypeParam=
+scheduledJob.crawler.dateTypeParam=
+scheduledJob.crawler.defaultValue=
+scheduledJob.jobLogging.requiredParam=
+scheduledJob.jobLogging.additionalAnnotation=
+scheduledJob.jobLogging.annotation=// ignore
+scheduledJob.jobLogging.enableJavaType=true
+scheduledJob.jobLogging.longTypeParam=
+scheduledJob.jobLogging.integerTypeParam=
+scheduledJob.jobLogging.shortTypeParam=
+scheduledJob.jobLogging.byteTypeParam=
+scheduledJob.jobLogging.floatTypeParam=
+scheduledJob.jobLogging.doubleTypeParam=
+scheduledJob.jobLogging.dateTypeParam=
+scheduledJob.jobLogging.defaultValue=
+scheduledJob.sortOrder.requiredParam=
+scheduledJob.sortOrder.additionalAnnotation=@IntRange(min = 0, max = 2147483647)
+scheduledJob.sortOrder.annotation=
+scheduledJob.sortOrder.enableJavaType=true
+scheduledJob.sortOrder.longTypeParam=
+scheduledJob.sortOrder.integerTypeParam=
+scheduledJob.sortOrder.shortTypeParam=
+scheduledJob.sortOrder.byteTypeParam=
+scheduledJob.sortOrder.floatTypeParam=
+scheduledJob.sortOrder.doubleTypeParam=
+scheduledJob.sortOrder.dateTypeParam=
+scheduledJob.sortOrder.defaultValue=
+scheduledJob.createdBy.requiredParam=(target = "confirmfromupdate,update,delete")
+scheduledJob.createdBy.additionalAnnotation=
+scheduledJob.createdBy.annotation=
+scheduledJob.createdBy.enableJavaType=true
+scheduledJob.createdBy.longTypeParam=
+scheduledJob.createdBy.integerTypeParam=
+scheduledJob.createdBy.shortTypeParam=
+scheduledJob.createdBy.byteTypeParam=
+scheduledJob.createdBy.floatTypeParam=
+scheduledJob.createdBy.doubleTypeParam=
+scheduledJob.createdBy.dateTypeParam=
+scheduledJob.createdBy.defaultValue=
+scheduledJob.createdTime.requiredParam=(target = "confirmfromupdate,update,delete")
+scheduledJob.createdTime.additionalAnnotation=
+scheduledJob.createdTime.annotation=
+scheduledJob.createdTime.enableJavaType=true
+scheduledJob.createdTime.longTypeParam=
+scheduledJob.createdTime.integerTypeParam=
+scheduledJob.createdTime.shortTypeParam=
+scheduledJob.createdTime.byteTypeParam=
+scheduledJob.createdTime.floatTypeParam=
+scheduledJob.createdTime.doubleTypeParam=
+scheduledJob.createdTime.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
+scheduledJob.createdTime.defaultValue=
+scheduledJob.updatedBy.requiredParam=(target = "confirmfromupdate,update,delete")
+scheduledJob.updatedBy.additionalAnnotation=
+scheduledJob.updatedBy.annotation=
+scheduledJob.updatedBy.enableJavaType=true
+scheduledJob.updatedBy.longTypeParam=
+scheduledJob.updatedBy.integerTypeParam=
+scheduledJob.updatedBy.shortTypeParam=
+scheduledJob.updatedBy.byteTypeParam=
+scheduledJob.updatedBy.floatTypeParam=
+scheduledJob.updatedBy.doubleTypeParam=
+scheduledJob.updatedBy.dateTypeParam=
+scheduledJob.updatedBy.defaultValue=
+scheduledJob.updatedTime.requiredParam=(target = "confirmfromupdate,update,delete")
+scheduledJob.updatedTime.additionalAnnotation=
+scheduledJob.updatedTime.annotation=
+scheduledJob.updatedTime.enableJavaType=true
+scheduledJob.updatedTime.longTypeParam=
+scheduledJob.updatedTime.integerTypeParam=
+scheduledJob.updatedTime.shortTypeParam=
+scheduledJob.updatedTime.byteTypeParam=
+scheduledJob.updatedTime.floatTypeParam=
+scheduledJob.updatedTime.doubleTypeParam=
+scheduledJob.updatedTime.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
+scheduledJob.updatedTime.defaultValue=
+scheduledJob.deletedBy.requiredParam=
+scheduledJob.deletedBy.additionalAnnotation=
+scheduledJob.deletedBy.annotation=
+scheduledJob.deletedBy.enableJavaType=true
+scheduledJob.deletedBy.longTypeParam=
+scheduledJob.deletedBy.integerTypeParam=
+scheduledJob.deletedBy.shortTypeParam=
+scheduledJob.deletedBy.byteTypeParam=
+scheduledJob.deletedBy.floatTypeParam=
+scheduledJob.deletedBy.doubleTypeParam=
+scheduledJob.deletedBy.dateTypeParam=
+scheduledJob.deletedBy.defaultValue=
+scheduledJob.deletedTime.requiredParam=
+scheduledJob.deletedTime.additionalAnnotation=
+scheduledJob.deletedTime.annotation=
+scheduledJob.deletedTime.enableJavaType=true
+scheduledJob.deletedTime.longTypeParam=
+scheduledJob.deletedTime.integerTypeParam=
+scheduledJob.deletedTime.shortTypeParam=
+scheduledJob.deletedTime.byteTypeParam=
+scheduledJob.deletedTime.floatTypeParam=
+scheduledJob.deletedTime.doubleTypeParam=
+scheduledJob.deletedTime.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
+scheduledJob.deletedTime.defaultValue=
+scheduledJob.versionNo.requiredParam=(target = "confirmfromupdate,update,delete")
+scheduledJob.versionNo.additionalAnnotation=
+scheduledJob.versionNo.annotation=
+scheduledJob.versionNo.enableJavaType=true
+scheduledJob.versionNo.longTypeParam=
+scheduledJob.versionNo.integerTypeParam=
+scheduledJob.versionNo.shortTypeParam=
+scheduledJob.versionNo.byteTypeParam=
+scheduledJob.versionNo.floatTypeParam=
+scheduledJob.versionNo.doubleTypeParam=
+scheduledJob.versionNo.dateTypeParam=
+scheduledJob.versionNo.defaultValue=
+
 searchFieldLog.ignored=true
 
 searchLog.ignored=false

+ 22 - 13
src/main/java/jp/sf/fess/Constants.java

@@ -56,6 +56,10 @@ public class Constants extends CoreLibConstants {
 
     public static final String DONE = "done";
 
+    public static final String OK = "ok";
+
+    public static final String FAIL = "fail";
+
     public static final String ITEM_LABEL = "label";
 
     public static final String ITEM_VALUE = "value";
@@ -66,6 +70,10 @@ public class Constants extends CoreLibConstants {
 
     public static final String MS932 = "MS932";
 
+    public static final String OPTIMIZE = "optimize";
+
+    public static final String COMMIT = "commit";
+
     public static final String DEFAULT_CRON_EXPRESSION = "0 0 0 * * ?";
 
     public static final String DEFAULT_SEARCH_LOG_CRON_EXPRESSION = "0 * * * * ?";
@@ -109,20 +117,8 @@ public class Constants extends CoreLibConstants {
 
     public static final String CRAWLING_THREAD_COUNT_PROPERTY = "crawling.thread.count";
 
-    public static final String CRON_EXPRESSION_PROPERTY = "cron.expression";
-
-    public static final String SEARCH_LOG_CRON_EXPRESSION_PROPERTY = "cron.expression.searchlog";
-
-    public static final String DAILY_CRON_EXPRESSION_PROPERTY = "cron.expression.daily";
-
-    public static final String HOURLY_CRON_EXPRESSION_PROPERTY = "cron.expression.hourly";
-
     public static final String DAY_FOR_CLEANUP_PROPERTY = "day.for.cleanup";
 
-    public static final String OPTIMIZE_PROPERTY = "optimize.index";
-
-    public static final String COMMIT_PROPERTY = "commit.index";
-
     public static final String COMMIT_PER_COUNT_PROPERTY = "commit.count";
 
     public static final String SERVER_ROTATION_PROPERTY = "server.rotation";
@@ -151,10 +147,12 @@ public class Constants extends CoreLibConstants {
 
     public static final String CSV_FILE_ENCODING_PROPERTY = "csv.file.encoding";
 
-    public static final String PURGE_SERCH_LOG_DAY_PROPERTY = "purge.searchlog.day";
+    public static final String PURGE_SEARCH_LOG_DAY_PROPERTY = "purge.searchlog.day";
 
     public static final String PURGE_USER_INFO_DAY_PROPERTY = "purge.userinfo.day";
 
+    public static final String PURGE_JOB_LOG_DAY_PROPERTY = "purge.joblog.day";
+
     public static final String PURGE_BY_BOTS_PROPERTY = "purge.by.bots";
 
     public static final String SEARCH_DESKTOP_PROPERTY = "search.desktop";
@@ -301,4 +299,15 @@ public class Constants extends CoreLibConstants {
 
     public static final String OPTION_QUERY_NQ = "nq";
 
+    // job
+    public static final String JOB_ID_PREFIX = "job";
+
+    public static final String SCHEDULED_JOB = "scheduledJob";
+
+    public static final String JOB_EXECUTOR_TYPE = "jobExecutor";
+
+    public static final String DEFAULT_JOB_TARGET = "all";
+
+    public static final String DEFAULT_JOB_SCRIPT_TYPE = "groovy";
+
 }

+ 7 - 34
src/main/java/jp/sf/fess/action/admin/CrawlAction.java

@@ -60,17 +60,8 @@ public class CrawlAction implements Serializable {
     }
 
     protected String showIndex(final boolean redirect) {
-        crawlForm.cronExpression = crawlerProperties.getProperty(
-                Constants.CRON_EXPRESSION_PROPERTY,
-                Constants.DEFAULT_CRON_EXPRESSION);
-        crawlForm.diffCrawling = crawlerProperties.getProperty(
-                Constants.DIFF_CRAWLING_PROPERTY, Constants.TRUE);
         crawlForm.useAclAsRole = crawlerProperties.getProperty(
                 Constants.USE_ACL_AS_ROLE, Constants.FALSE);
-        crawlForm.optimize = crawlerProperties.getProperty(
-                Constants.OPTIMIZE_PROPERTY, Constants.FALSE);
-        crawlForm.commit = crawlerProperties.getProperty(
-                Constants.COMMIT_PROPERTY, Constants.TRUE);
         crawlForm.serverRotation = crawlerProperties.getProperty(
                 Constants.SERVER_ROTATION_PROPERTY, Constants.FALSE);
         crawlForm.dayForCleanup = crawlerProperties.getProperty(
@@ -114,7 +105,10 @@ public class CrawlAction implements Serializable {
         crawlForm.csvFileEncoding = crawlerProperties.getProperty(
                 Constants.CSV_FILE_ENCODING_PROPERTY, Constants.UTF_8);
         crawlForm.purgeSearchLogDay = crawlerProperties.getProperty(
-                Constants.PURGE_SERCH_LOG_DAY_PROPERTY,
+                Constants.PURGE_SEARCH_LOG_DAY_PROPERTY,
+                Constants.DEFAULT_PURGE_DAY);
+        crawlForm.purgeJobLogDay = crawlerProperties.getProperty(
+                Constants.PURGE_JOB_LOG_DAY_PROPERTY,
                 Constants.DEFAULT_PURGE_DAY);
         crawlForm.purgeUserInfoDay = crawlerProperties.getProperty(
                 Constants.PURGE_USER_INFO_DAY_PROPERTY,
@@ -140,15 +134,6 @@ public class CrawlAction implements Serializable {
     @Token(save = false, validate = true)
     @Execute(validator = true, input = "index.jsp")
     public String update() {
-        crawlerProperties.setProperty(Constants.CRON_EXPRESSION_PROPERTY,
-                crawlForm.cronExpression);
-        crawlerProperties
-                .setProperty(
-                        Constants.DIFF_CRAWLING_PROPERTY,
-                        crawlForm.diffCrawling != null
-                                && Constants.ON
-                                        .equalsIgnoreCase(crawlForm.diffCrawling) ? Constants.TRUE
-                                : Constants.FALSE);
         crawlerProperties
                 .setProperty(
                         Constants.USE_ACL_AS_ROLE,
@@ -156,20 +141,6 @@ public class CrawlAction implements Serializable {
                                 && Constants.ON
                                         .equalsIgnoreCase(crawlForm.useAclAsRole) ? Constants.TRUE
                                 : Constants.FALSE);
-        crawlerProperties
-                .setProperty(
-                        Constants.OPTIMIZE_PROPERTY,
-                        crawlForm.optimize != null
-                                && Constants.ON
-                                        .equalsIgnoreCase(crawlForm.optimize) ? Constants.TRUE
-                                : Constants.FALSE);
-        crawlerProperties
-                .setProperty(
-                        Constants.COMMIT_PROPERTY,
-                        crawlForm.commit != null
-                                && Constants.ON
-                                        .equalsIgnoreCase(crawlForm.commit) ? Constants.TRUE
-                                : Constants.FALSE);
         crawlerProperties
                 .setProperty(
                         Constants.SERVER_ROTATION_PROPERTY,
@@ -260,8 +231,10 @@ public class CrawlAction implements Serializable {
                                 : Constants.FALSE);
         crawlerProperties.setProperty(Constants.CSV_FILE_ENCODING_PROPERTY,
                 crawlForm.csvFileEncoding);
-        crawlerProperties.setProperty(Constants.PURGE_SERCH_LOG_DAY_PROPERTY,
+        crawlerProperties.setProperty(Constants.PURGE_SEARCH_LOG_DAY_PROPERTY,
                 crawlForm.purgeSearchLogDay);
+        crawlerProperties.setProperty(Constants.PURGE_JOB_LOG_DAY_PROPERTY,
+                crawlForm.purgeJobLogDay);
         crawlerProperties.setProperty(Constants.PURGE_USER_INFO_DAY_PROPERTY,
                 crawlForm.purgeUserInfoDay);
         crawlerProperties.setProperty(Constants.PURGE_BY_BOTS_PROPERTY,

+ 2 - 1
src/main/java/jp/sf/fess/action/admin/CrawlingSessionAction.java

@@ -49,7 +49,8 @@ public class CrawlingSessionAction extends BsCrawlingSessionAction {
 
     @Execute(validator = false, input = "error.jsp")
     public String deleteall() {
-        crawlingSessionService.deleteOldSessions(systemHelper.getSessionId());
+        crawlingSessionService.deleteOldSessions(systemHelper
+                .getRunningSessionIdSet());
         SAStrutsUtil.addSessionMessage("success.crawling_session_delete_all");
         return displayList(true);
     }

+ 6 - 11
src/main/java/jp/sf/fess/action/admin/DocumentAction.java

@@ -21,6 +21,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import javax.annotation.Resource;
 
@@ -169,7 +170,7 @@ public class DocumentAction implements Serializable {
             final Thread thread = new Thread(new Runnable() {
                 @Override
                 public void run() {
-                    if (systemHelper.readyCrawlProcess()) {
+                    if (!systemHelper.isCrawlProcessRunning()) {
                         final long execTime = System.currentTimeMillis();
                         try {
                             systemHelper.updateStatus(solrGroup, QueryType.ADD);
@@ -184,8 +185,6 @@ public class DocumentAction implements Serializable {
                             }
                         } catch (final Exception e) {
                             logger.error("Failed to commit index.", e);
-                        } finally {
-                            systemHelper.finishCrawlProcess();
                         }
                     } else {
                         if (logger.isInfoEnabled()) {
@@ -217,7 +216,7 @@ public class DocumentAction implements Serializable {
             final Thread thread = new Thread(new Runnable() {
                 @Override
                 public void run() {
-                    if (systemHelper.readyCrawlProcess()) {
+                    if (!systemHelper.isCrawlProcessRunning()) {
                         final long execTime = System.currentTimeMillis();
                         try {
                             systemHelper.updateStatus(solrGroup, QueryType.ADD);
@@ -231,8 +230,6 @@ public class DocumentAction implements Serializable {
                             }
                         } catch (final Exception e) {
                             logger.error("Failed to optimize index.", e);
-                        } finally {
-                            systemHelper.finishCrawlProcess();
                         }
                     } else {
                         if (logger.isInfoEnabled()) {
@@ -290,7 +287,7 @@ public class DocumentAction implements Serializable {
             final Thread thread = new Thread(new Runnable() {
                 @Override
                 public void run() {
-                    if (systemHelper.readyCrawlProcess()) {
+                    if (!systemHelper.isCrawlProcessRunning()) {
                         final long execTime = System.currentTimeMillis();
                         try {
                             systemHelper.updateStatus(solrGroup,
@@ -307,8 +304,6 @@ public class DocumentAction implements Serializable {
                         } catch (final Exception e) {
                             logger.error("Failed to delete index (query="
                                     + deleteQuery + ").", e);
-                        } finally {
-                            systemHelper.finishCrawlProcess();
                         }
                     } else {
                         if (logger.isInfoEnabled()) {
@@ -385,8 +380,8 @@ public class DocumentAction implements Serializable {
         return systemHelper.isCrawlProcessRunning();
     }
 
-    public String getRunningSessionId() {
-        return systemHelper.getSessionId();
+    public Set<String> getRunningSessionIdSet() {
+        return systemHelper.getRunningSessionIdSet();
     }
 
     private static class SessionIdList<E> extends ArrayList<E> {

+ 25 - 0
src/main/java/jp/sf/fess/action/admin/JobLogAction.java

@@ -0,0 +1,25 @@
+/*
+ * Copyright 2009-2013 the Fess 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 jp.sf.fess.crud.action.admin.BsJobLogAction;
+
+public class JobLogAction extends BsJobLogAction {
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 154 - 0
src/main/java/jp/sf/fess/action/admin/ScheduledJobAction.java

@@ -0,0 +1,154 @@
+/*
+ * Copyright 2009-2013 the Fess 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 java.util.List;
+
+import javax.annotation.Resource;
+
+import jp.sf.fess.Constants;
+import jp.sf.fess.crud.CommonConstants;
+import jp.sf.fess.crud.CrudMessageException;
+import jp.sf.fess.crud.action.admin.BsScheduledJobAction;
+import jp.sf.fess.crud.util.SAStrutsUtil;
+import jp.sf.fess.db.exentity.RoleType;
+import jp.sf.fess.db.exentity.ScheduledJob;
+import jp.sf.fess.helper.SystemHelper;
+import jp.sf.fess.service.RoleTypeService;
+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 ScheduledJobAction extends BsScheduledJobAction {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final Log log = LogFactory.getLog(ScheduledJobAction.class);
+
+    @Resource
+    protected RoleTypeService roleTypeService;
+
+    @Resource
+    protected SystemHelper systemHelper;
+
+    public String getHelpLink() {
+        return systemHelper.getHelpLink("scheduledJob");
+    }
+
+    @Override
+    protected void loadScheduledJob() {
+
+        final ScheduledJob scheduledJob = scheduledJobService
+                .getScheduledJob(createKeyMap());
+        if (scheduledJob == null) {
+            // throw an exception
+            throw new SSCActionMessagesException(
+                    "errors.crud_could_not_find_crud_table",
+                    new Object[] { scheduledJobForm.id });
+        }
+
+        FessBeans.copy(scheduledJob, scheduledJobForm)
+                .commonColumnDateConverter()
+                .excludes("searchParams", "mode", "jobLogging").execute();
+        scheduledJobForm.jobLogging = scheduledJob.isLoggingEnabled() ? Constants.ON
+                : null;
+        scheduledJobForm.crawler = scheduledJob.isCrawlerJob() ? Constants.ON
+                : null;
+    }
+
+    @Override
+    protected ScheduledJob createScheduledJob() {
+        ScheduledJob scheduledJob;
+        final String username = systemHelper.getUsername();
+        final Timestamp timestamp = systemHelper.getCurrentTimestamp();
+        if (scheduledJobForm.crudMode == CommonConstants.EDIT_MODE) {
+            scheduledJob = scheduledJobService.getScheduledJob(createKeyMap());
+            if (scheduledJob == null) {
+                // throw an exception
+                throw new SSCActionMessagesException(
+                        "errors.crud_could_not_find_crud_table",
+                        new Object[] { scheduledJobForm.id });
+            }
+        } else {
+            scheduledJob = new ScheduledJob();
+            scheduledJob.setCreatedBy(username);
+            scheduledJob.setCreatedTime(timestamp);
+        }
+        scheduledJob.setUpdatedBy(username);
+        scheduledJob.setUpdatedTime(timestamp);
+        FessBeans.copy(scheduledJobForm, scheduledJob).excludesCommonColumns()
+                .execute();
+        scheduledJob.setJobLogging(Constants.ON
+                .equals(scheduledJobForm.jobLogging) ? Constants.T
+                : Constants.F);
+        scheduledJob
+                .setCrawler(Constants.ON.equals(scheduledJobForm.crawler) ? Constants.T
+                        : Constants.F);
+
+        return scheduledJob;
+    }
+
+    @Override
+    @Execute(validator = false, input = "error.jsp")
+    public String delete() {
+        if (scheduledJobForm.crudMode != CommonConstants.DELETE_MODE) {
+            throw new SSCActionMessagesException("errors.crud_invalid_mode",
+                    new Object[] { CommonConstants.DELETE_MODE,
+                            scheduledJobForm.crudMode });
+        }
+
+        try {
+            final ScheduledJob scheduledJob = scheduledJobService
+                    .getScheduledJob(createKeyMap());
+            if (scheduledJob == null) {
+                // throw an exception
+                throw new SSCActionMessagesException(
+                        "errors.crud_could_not_find_crud_table",
+                        new Object[] { scheduledJobForm.id });
+            }
+
+            final String username = systemHelper.getUsername();
+            final Timestamp timestamp = systemHelper.getCurrentTimestamp();
+            scheduledJob.setDeletedBy(username);
+            scheduledJob.setDeletedTime(timestamp);
+            scheduledJobService.store(scheduledJob);
+            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");
+        }
+    }
+
+    public List<RoleType> getRoleTypeItems() {
+        return roleTypeService.getRoleTypeList();
+    }
+}

+ 1 - 3
src/main/java/jp/sf/fess/action/admin/SearchListAction.java

@@ -260,7 +260,7 @@ public class SearchListAction implements Serializable {
             final Thread thread = new Thread(new Runnable() {
                 @Override
                 public void run() {
-                    if (systemHelper.readyCrawlProcess()) {
+                    if (!systemHelper.isCrawlProcessRunning()) {
                         final long time = System.currentTimeMillis();
                         try {
                             solrGroup.deleteById(deleteId);
@@ -273,8 +273,6 @@ public class SearchListAction implements Serializable {
                         } catch (final Exception e) {
                             logger.error("Failed to delete index (query="
                                     + deleteId + ").", e);
-                        } finally {
-                            systemHelper.finishCrawlProcess();
                         }
                     } else {
                         if (logger.isInfoEnabled()) {

+ 22 - 15
src/main/java/jp/sf/fess/action/admin/SystemAction.java

@@ -21,15 +21,18 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import javax.annotation.Resource;
 
 import jp.sf.fess.Constants;
 import jp.sf.fess.crud.util.SAStrutsUtil;
+import jp.sf.fess.db.exentity.ScheduledJob;
 import jp.sf.fess.form.admin.SystemForm;
 import jp.sf.fess.helper.SystemHelper;
 import jp.sf.fess.helper.WebManagementHelper;
-import jp.sf.fess.task.CrawlTask;
+import jp.sf.fess.job.TriggeredJob;
+import jp.sf.fess.service.ScheduledJobService;
 
 import org.codelibs.core.util.DynamicProperties;
 import org.codelibs.sastruts.core.annotation.Token;
@@ -213,15 +216,18 @@ public class SystemAction implements Serializable {
         final SolrGroup solrGroup = solrGroupManager.getSolrGroup(groupName);
         if (solrGroup != null) {
             if (!systemHelper.isCrawlProcessRunning()) {
-                final CrawlTask crawlTask = SingletonS2Container
-                        .getComponent(CrawlTask.class);
-                new Thread(new Runnable() {
-                    @Override
-                    public void run() {
-                        systemHelper.updateStatus(solrGroup, QueryType.ADD);
-                        crawlTask.doExecute();
-                    }
-                }).start();
+                final ScheduledJobService scheduledJobService = SingletonS2Container
+                        .getComponent(ScheduledJobService.class);
+                final List<ScheduledJob> scheduledJobList = scheduledJobService
+                        .getCrawloerJobList();
+                for (final ScheduledJob scheduledJob : scheduledJobList) {
+                    new Thread(new Runnable() {
+                        @Override
+                        public void run() {
+                            new TriggeredJob().execute(scheduledJob);
+                        }
+                    }).start();
+                }
                 SAStrutsUtil.addSessionMessage("success.start_crawl_process");
             } else {
                 SAStrutsUtil
@@ -238,8 +244,9 @@ public class SystemAction implements Serializable {
     @Execute(validator = true, input = "index")
     public String stop() {
         if (systemHelper.isCrawlProcessRunning()) {
-            systemHelper.destroyCrawlerProcess();
-            systemHelper.finishCrawlProcess();
+            for (final String sessionId : systemHelper.getRunningSessionIdSet()) {
+                systemHelper.destroyCrawlerProcess(sessionId);
+            }
             SAStrutsUtil.addSessionMessage("success.stopping_crawl_process");
         } else {
             SAStrutsUtil.addSessionMessage("errors.no_running_crawl_process");
@@ -305,12 +312,12 @@ public class SystemAction implements Serializable {
         return solrInstanceList;
     }
 
-    public boolean isSolrProcessRunning() {
+    public boolean isCrawlerRunning() {
         return systemHelper.isCrawlProcessRunning();
     }
 
-    public String getRunningSessionId() {
-        return systemHelper.getSessionId();
+    public Set<String> getRunningSessionIdSet() {
+        return systemHelper.getRunningSessionIdSet();
     }
 
 }

+ 15 - 76
src/main/java/jp/sf/fess/action/admin/WizardAction.java

@@ -30,19 +30,20 @@ import jp.sf.fess.Constants;
 import jp.sf.fess.crud.util.SAStrutsUtil;
 import jp.sf.fess.db.exentity.BrowserType;
 import jp.sf.fess.db.exentity.FileCrawlingConfig;
+import jp.sf.fess.db.exentity.ScheduledJob;
 import jp.sf.fess.db.exentity.WebCrawlingConfig;
 import jp.sf.fess.form.admin.WizardForm;
 import jp.sf.fess.helper.SystemHelper;
+import jp.sf.fess.job.TriggeredJob;
 import jp.sf.fess.service.BrowserTypeService;
 import jp.sf.fess.service.FileCrawlingConfigService;
+import jp.sf.fess.service.ScheduledJobService;
 import jp.sf.fess.service.WebCrawlingConfigService;
-import jp.sf.fess.task.CrawlTask;
 
 import org.apache.commons.lang.StringUtils;
 import org.codelibs.core.util.DynamicProperties;
 import org.codelibs.sastruts.core.annotation.Token;
 import org.codelibs.sastruts.core.exception.SSCActionMessagesException;
-import org.seasar.chronos.core.trigger.cron.CronExpression;
 import org.seasar.framework.container.SingletonS2Container;
 import org.seasar.framework.util.StringUtil;
 import org.seasar.robot.util.CharUtil;
@@ -85,72 +86,6 @@ public class WizardAction implements Serializable {
         return "index.jsp";
     }
 
-    @Token(save = true, validate = false)
-    @Execute(validator = false)
-    public String scheduleForm() {
-        final String cronExpression = crawlerProperties.getProperty(
-                Constants.CRON_EXPRESSION_PROPERTY,
-                Constants.DEFAULT_CRON_EXPRESSION);
-
-        final String[] exps = cronExpression.split(" ");
-        if (exps.length > 5) {
-            if (exps.length > 6 && "1970".equals(exps[6])) {
-                wizardForm.scheduleEnabled = null;
-            } else {
-                wizardForm.scheduleEnabled = "on";
-            }
-            wizardForm.scheduleMin = exps[1];
-            wizardForm.scheduleHour = exps[2];
-            wizardForm.scheduleDate = exps[3];
-            wizardForm.scheduleMonth = exps[4];
-            wizardForm.scheduleDay = exps[5];
-        }
-
-        return "schedule.jsp";
-    }
-
-    @Token(save = false, validate = true)
-    @Execute(validator = true, input = "scheduleForm")
-    public String schedule() {
-        if ("on".equalsIgnoreCase(wizardForm.scheduleEnabled)) {
-            final StringBuilder buf = new StringBuilder();
-            buf.append("0 ");
-            buf.append(wizardForm.scheduleMin);
-            buf.append(' ');
-            buf.append(wizardForm.scheduleHour);
-            buf.append(' ');
-            if ("?".equals(wizardForm.scheduleDay)) {
-                buf.append(wizardForm.scheduleDate);
-            } else {
-                buf.append('?');
-            }
-            buf.append(' ');
-            buf.append(wizardForm.scheduleMonth);
-            buf.append(' ');
-            buf.append(wizardForm.scheduleDay);
-            final String cronExpression = buf.toString();
-            if (!CronExpression.isValidExpression(cronExpression)) {
-                throw new SSCActionMessagesException("errors.cronexpression",
-                        cronExpression);
-            }
-            crawlerProperties.setProperty(Constants.CRON_EXPRESSION_PROPERTY,
-                    cronExpression);
-        } else {
-            crawlerProperties.setProperty(Constants.CRON_EXPRESSION_PROPERTY,
-                    "0 0 0 1 1 ? 1970");
-        }
-
-        try {
-            crawlerProperties.store();
-            SAStrutsUtil.addSessionMessage("success.update_crawler_schedule");
-            return "crawlingConfigForm?redirect=true";
-        } catch (final Exception e) {
-            logger.error("Failed to update crawler schedule.", e);
-            throw new SSCActionMessagesException(e,
-                    "errors.failed_to_update_crawler_schedule");
-        }
-    }
-
     @Token(save = true, validate = false)
     @Execute(validator = false)
     public String crawlingConfigForm() {
@@ -390,14 +325,18 @@ public class WizardAction implements Serializable {
     @Execute(validator = false)
     public String startCrawling() {
         if (!systemHelper.isCrawlProcessRunning()) {
-            final CrawlTask crawlTask = SingletonS2Container
-                    .getComponent(CrawlTask.class);
-            new Thread(new Runnable() {
-                @Override
-                public void run() {
-                    crawlTask.doExecute();
-                }
-            }).start();
+            final ScheduledJobService scheduledJobService = SingletonS2Container
+                    .getComponent(ScheduledJobService.class);
+            final List<ScheduledJob> scheduledJobList = scheduledJobService
+                    .getCrawloerJobList();
+            for (final ScheduledJob scheduledJob : scheduledJobList) {
+                new Thread(new Runnable() {
+                    @Override
+                    public void run() {
+                        new TriggeredJob().execute(scheduledJob);
+                    }
+                }).start();
+            }
             SAStrutsUtil.addSessionMessage("success.start_crawl_process");
         } else {
             SAStrutsUtil

+ 1 - 1
src/main/java/jp/sf/fess/crud/action/admin/BsBrowserTypeAction.java

@@ -203,7 +203,7 @@ public class BsBrowserTypeAction implements Serializable {
         return "confirm.jsp";
     }
 
-    @Token(save = false, validate = true, keep = true)
+    @Token(save = true, validate = false)
     @Execute(validator = false, input = "error.jsp")
     public String deletefromconfirm() {
         browserTypeForm.crudMode = CommonConstants.DELETE_MODE;

+ 1 - 1
src/main/java/jp/sf/fess/crud/action/admin/BsCrawlingSessionAction.java

@@ -205,7 +205,7 @@ public class BsCrawlingSessionAction implements Serializable {
         return "confirm.jsp";
     }
 
-    @Token(save = false, validate = true, keep = true)
+    @Token(save = true, validate = false)
     @Execute(validator = false, input = "error.jsp")
     public String deletefromconfirm() {
         crawlingSessionForm.crudMode = CommonConstants.DELETE_MODE;

+ 1 - 1
src/main/java/jp/sf/fess/crud/action/admin/BsDataCrawlingConfigAction.java

@@ -205,7 +205,7 @@ public class BsDataCrawlingConfigAction implements Serializable {
         return "confirm.jsp";
     }
 
-    @Token(save = false, validate = true, keep = true)
+    @Token(save = true, validate = false)
     @Execute(validator = false, input = "error.jsp")
     public String deletefromconfirm() {
         dataCrawlingConfigForm.crudMode = CommonConstants.DELETE_MODE;

+ 1 - 1
src/main/java/jp/sf/fess/crud/action/admin/BsFailureUrlAction.java

@@ -202,7 +202,7 @@ public class BsFailureUrlAction implements Serializable {
         return "confirm.jsp";
     }
 
-    @Token(save = false, validate = true, keep = true)
+    @Token(save = true, validate = false)
     @Execute(validator = false, input = "error.jsp")
     public String deletefromconfirm() {
         failureUrlForm.crudMode = CommonConstants.DELETE_MODE;

+ 1 - 1
src/main/java/jp/sf/fess/crud/action/admin/BsFavoriteLogAction.java

@@ -203,7 +203,7 @@ public class BsFavoriteLogAction implements Serializable {
         return "confirm.jsp";
     }
 
-    @Token(save = false, validate = true, keep = true)
+    @Token(save = true, validate = false)
     @Execute(validator = false, input = "error.jsp")
     public String deletefromconfirm() {
         favoriteLogForm.crudMode = CommonConstants.DELETE_MODE;

+ 1 - 1
src/main/java/jp/sf/fess/crud/action/admin/BsFileAuthenticationAction.java

@@ -205,7 +205,7 @@ public class BsFileAuthenticationAction implements Serializable {
         return "confirm.jsp";
     }
 
-    @Token(save = false, validate = true, keep = true)
+    @Token(save = true, validate = false)
     @Execute(validator = false, input = "error.jsp")
     public String deletefromconfirm() {
         fileAuthenticationForm.crudMode = CommonConstants.DELETE_MODE;

+ 1 - 1
src/main/java/jp/sf/fess/crud/action/admin/BsFileCrawlingConfigAction.java

@@ -205,7 +205,7 @@ public class BsFileCrawlingConfigAction implements Serializable {
         return "confirm.jsp";
     }
 
-    @Token(save = false, validate = true, keep = true)
+    @Token(save = true, validate = false)
     @Execute(validator = false, input = "error.jsp")
     public String deletefromconfirm() {
         fileCrawlingConfigForm.crudMode = CommonConstants.DELETE_MODE;

+ 342 - 0
src/main/java/jp/sf/fess/crud/action/admin/BsJobLogAction.java

@@ -0,0 +1,342 @@
+/*
+ * Copyright 2009-2013 the Fess 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.JobLog;
+import jp.sf.fess.form.admin.JobLogForm;
+import jp.sf.fess.pager.JobLogPager;
+import jp.sf.fess.service.JobLogService;
+
+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 BsJobLogAction implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final Log log = LogFactory.getLog(BsJobLogAction.class);
+
+    // for list
+
+    public List<JobLog> jobLogItems;
+
+    // for edit/confirm/delete
+
+    @ActionForm
+    @Resource
+    protected JobLogForm jobLogForm;
+
+    @Resource
+    protected JobLogService jobLogService;
+
+    @Resource
+    protected JobLogPager jobLogPager;
+
+    protected String displayList(final boolean redirect) {
+        // page navi
+        jobLogItems = jobLogService.getJobLogList(jobLogPager);
+
+        // restore from pager
+        Beans.copy(jobLogPager, jobLogForm.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(jobLogForm.pageNumber)) {
+            try {
+                jobLogPager.setCurrentPageNumber(Integer
+                        .parseInt(jobLogForm.pageNumber));
+            } catch (final NumberFormatException e) {
+                if (log.isDebugEnabled()) {
+                    log.debug("Invalid value: " + jobLogForm.pageNumber, e);
+                }
+            }
+        }
+
+        return displayList(false);
+    }
+
+    @Execute(validator = false, input = "error.jsp")
+    public String search() {
+        Beans.copy(jobLogForm.searchParams, jobLogPager)
+                .excludes(CommonConstants.PAGER_CONVERSION_RULE)
+
+                .execute();
+
+        return displayList(false);
+    }
+
+    @Execute(validator = false, input = "error.jsp")
+    public String reset() {
+        jobLogPager.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 (jobLogForm.crudMode != CommonConstants.CONFIRM_MODE) {
+            throw new ActionMessagesException("errors.crud_invalid_mode",
+                    new Object[] { CommonConstants.CONFIRM_MODE,
+                            jobLogForm.crudMode });
+        }
+
+        loadJobLog();
+
+        return "confirm.jsp";
+    }
+
+    @Token(save = true, validate = false)
+    @Execute(validator = false, input = "error.jsp")
+    public String createpage() {
+        // page navi
+        jobLogForm.initialize();
+        jobLogForm.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 (jobLogForm.crudMode != CommonConstants.EDIT_MODE) {
+            throw new ActionMessagesException("errors.crud_invalid_mode",
+                    new Object[] { CommonConstants.EDIT_MODE,
+                            jobLogForm.crudMode });
+        }
+
+        loadJobLog();
+
+        return "edit.jsp";
+    }
+
+    @Token(save = true, validate = false)
+    @Execute(validator = false, input = "error.jsp")
+    public String editfromconfirm() {
+        jobLogForm.crudMode = CommonConstants.EDIT_MODE;
+
+        loadJobLog();
+
+        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 (jobLogForm.crudMode != CommonConstants.DELETE_MODE) {
+            throw new ActionMessagesException("errors.crud_invalid_mode",
+                    new Object[] { CommonConstants.DELETE_MODE,
+                            jobLogForm.crudMode });
+        }
+
+        loadJobLog();
+
+        return "confirm.jsp";
+    }
+
+    @Token(save = true, validate = false)
+    @Execute(validator = false, input = "error.jsp")
+    public String deletefromconfirm() {
+        jobLogForm.crudMode = CommonConstants.DELETE_MODE;
+
+        loadJobLog();
+
+        return "confirm.jsp";
+    }
+
+    @Token(save = false, validate = true)
+    @Execute(validator = true, input = "edit.jsp")
+    public String create() {
+        try {
+            final JobLog jobLog = createJobLog();
+            jobLogService.store(jobLog);
+            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 JobLog jobLog = createJobLog();
+            jobLogService.store(jobLog);
+            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 (jobLogForm.crudMode != CommonConstants.DELETE_MODE) {
+            throw new ActionMessagesException("errors.crud_invalid_mode",
+                    new Object[] { CommonConstants.DELETE_MODE,
+                            jobLogForm.crudMode });
+        }
+
+        try {
+            final JobLog jobLog = jobLogService.getJobLog(createKeyMap());
+            if (jobLog == null) {
+                // throw an exception
+                throw new ActionMessagesException(
+                        "errors.crud_could_not_find_crud_table",
+
+                        new Object[] { jobLogForm.id });
+
+            }
+
+            jobLogService.delete(jobLog);
+            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 loadJobLog() {
+
+        final JobLog jobLog = jobLogService.getJobLog(createKeyMap());
+        if (jobLog == null) {
+            // throw an exception
+            throw new ActionMessagesException(
+                    "errors.crud_could_not_find_crud_table",
+
+                    new Object[] { jobLogForm.id });
+
+        }
+
+        Beans.copy(jobLog, jobLogForm).excludes("searchParams", "mode")
+
+        .execute();
+    }
+
+    protected JobLog createJobLog() {
+        JobLog jobLog;
+        if (jobLogForm.crudMode == CommonConstants.EDIT_MODE) {
+            jobLog = jobLogService.getJobLog(createKeyMap());
+            if (jobLog == null) {
+                // throw an exception
+                throw new ActionMessagesException(
+                        "errors.crud_could_not_find_crud_table",
+
+                        new Object[] { jobLogForm.id });
+
+            }
+        } else {
+            jobLog = new JobLog();
+        }
+        Beans.copy(jobLogForm, jobLog).excludes("searchParams", "mode")
+
+        .execute();
+
+        return jobLog;
+    }
+
+    protected Map<String, String> createKeyMap() {
+        final Map<String, String> keys = new HashMap<String, String>();
+
+        keys.put("id", jobLogForm.id);
+
+        return keys;
+    }
+}

+ 1 - 1
src/main/java/jp/sf/fess/crud/action/admin/BsLabelTypeAction.java

@@ -202,7 +202,7 @@ public class BsLabelTypeAction implements Serializable {
         return "confirm.jsp";
     }
 
-    @Token(save = false, validate = true, keep = true)
+    @Token(save = true, validate = false)
     @Execute(validator = false, input = "error.jsp")
     public String deletefromconfirm() {
         labelTypeForm.crudMode = CommonConstants.DELETE_MODE;

+ 1 - 1
src/main/java/jp/sf/fess/crud/action/admin/BsOverlappingHostAction.java

@@ -205,7 +205,7 @@ public class BsOverlappingHostAction implements Serializable {
         return "confirm.jsp";
     }
 
-    @Token(save = false, validate = true, keep = true)
+    @Token(save = true, validate = false)
     @Execute(validator = false, input = "error.jsp")
     public String deletefromconfirm() {
         overlappingHostForm.crudMode = CommonConstants.DELETE_MODE;

+ 1 - 1
src/main/java/jp/sf/fess/crud/action/admin/BsPathMappingAction.java

@@ -203,7 +203,7 @@ public class BsPathMappingAction implements Serializable {
         return "confirm.jsp";
     }
 
-    @Token(save = false, validate = true, keep = true)
+    @Token(save = true, validate = false)
     @Execute(validator = false, input = "error.jsp")
     public String deletefromconfirm() {
         pathMappingForm.crudMode = CommonConstants.DELETE_MODE;

+ 1 - 1
src/main/java/jp/sf/fess/crud/action/admin/BsRequestHeaderAction.java

@@ -205,7 +205,7 @@ public class BsRequestHeaderAction implements Serializable {
         return "confirm.jsp";
     }
 
-    @Token(save = false, validate = true, keep = true)
+    @Token(save = true, validate = false)
     @Execute(validator = false, input = "error.jsp")
     public String deletefromconfirm() {
         requestHeaderForm.crudMode = CommonConstants.DELETE_MODE;

+ 1 - 1
src/main/java/jp/sf/fess/crud/action/admin/BsRoleTypeAction.java

@@ -202,7 +202,7 @@ public class BsRoleTypeAction implements Serializable {
         return "confirm.jsp";
     }
 
-    @Token(save = false, validate = true, keep = true)
+    @Token(save = true, validate = false)
     @Execute(validator = false, input = "error.jsp")
     public String deletefromconfirm() {
         roleTypeForm.crudMode = CommonConstants.DELETE_MODE;

+ 349 - 0
src/main/java/jp/sf/fess/crud/action/admin/BsScheduledJobAction.java

@@ -0,0 +1,349 @@
+/*
+ * Copyright 2009-2013 the Fess 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.ScheduledJob;
+import jp.sf.fess.form.admin.ScheduledJobForm;
+import jp.sf.fess.pager.ScheduledJobPager;
+import jp.sf.fess.service.ScheduledJobService;
+
+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 BsScheduledJobAction implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final Log log = LogFactory
+            .getLog(BsScheduledJobAction.class);
+
+    // for list
+
+    public List<ScheduledJob> scheduledJobItems;
+
+    // for edit/confirm/delete
+
+    @ActionForm
+    @Resource
+    protected ScheduledJobForm scheduledJobForm;
+
+    @Resource
+    protected ScheduledJobService scheduledJobService;
+
+    @Resource
+    protected ScheduledJobPager scheduledJobPager;
+
+    protected String displayList(final boolean redirect) {
+        // page navi
+        scheduledJobItems = scheduledJobService
+                .getScheduledJobList(scheduledJobPager);
+
+        // restore from pager
+        Beans.copy(scheduledJobPager, scheduledJobForm.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(scheduledJobForm.pageNumber)) {
+            try {
+                scheduledJobPager.setCurrentPageNumber(Integer
+                        .parseInt(scheduledJobForm.pageNumber));
+            } catch (final NumberFormatException e) {
+                if (log.isDebugEnabled()) {
+                    log.debug("Invalid value: " + scheduledJobForm.pageNumber,
+                            e);
+                }
+            }
+        }
+
+        return displayList(false);
+    }
+
+    @Execute(validator = false, input = "error.jsp")
+    public String search() {
+        Beans.copy(scheduledJobForm.searchParams, scheduledJobPager)
+                .excludes(CommonConstants.PAGER_CONVERSION_RULE)
+
+                .execute();
+
+        return displayList(false);
+    }
+
+    @Execute(validator = false, input = "error.jsp")
+    public String reset() {
+        scheduledJobPager.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 (scheduledJobForm.crudMode != CommonConstants.CONFIRM_MODE) {
+            throw new ActionMessagesException("errors.crud_invalid_mode",
+                    new Object[] { CommonConstants.CONFIRM_MODE,
+                            scheduledJobForm.crudMode });
+        }
+
+        loadScheduledJob();
+
+        return "confirm.jsp";
+    }
+
+    @Token(save = true, validate = false)
+    @Execute(validator = false, input = "error.jsp")
+    public String createpage() {
+        // page navi
+        scheduledJobForm.initialize();
+        scheduledJobForm.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 (scheduledJobForm.crudMode != CommonConstants.EDIT_MODE) {
+            throw new ActionMessagesException("errors.crud_invalid_mode",
+                    new Object[] { CommonConstants.EDIT_MODE,
+                            scheduledJobForm.crudMode });
+        }
+
+        loadScheduledJob();
+
+        return "edit.jsp";
+    }
+
+    @Token(save = true, validate = false)
+    @Execute(validator = false, input = "error.jsp")
+    public String editfromconfirm() {
+        scheduledJobForm.crudMode = CommonConstants.EDIT_MODE;
+
+        loadScheduledJob();
+
+        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 (scheduledJobForm.crudMode != CommonConstants.DELETE_MODE) {
+            throw new ActionMessagesException("errors.crud_invalid_mode",
+                    new Object[] { CommonConstants.DELETE_MODE,
+                            scheduledJobForm.crudMode });
+        }
+
+        loadScheduledJob();
+
+        return "confirm.jsp";
+    }
+
+    @Token(save = true, validate = false)
+    @Execute(validator = false, input = "error.jsp")
+    public String deletefromconfirm() {
+        scheduledJobForm.crudMode = CommonConstants.DELETE_MODE;
+
+        loadScheduledJob();
+
+        return "confirm.jsp";
+    }
+
+    @Token(save = false, validate = true)
+    @Execute(validator = true, input = "edit.jsp")
+    public String create() {
+        try {
+            final ScheduledJob scheduledJob = createScheduledJob();
+            scheduledJobService.store(scheduledJob);
+            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 ScheduledJob scheduledJob = createScheduledJob();
+            scheduledJobService.store(scheduledJob);
+            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 (scheduledJobForm.crudMode != CommonConstants.DELETE_MODE) {
+            throw new ActionMessagesException("errors.crud_invalid_mode",
+                    new Object[] { CommonConstants.DELETE_MODE,
+                            scheduledJobForm.crudMode });
+        }
+
+        try {
+            final ScheduledJob scheduledJob = scheduledJobService
+                    .getScheduledJob(createKeyMap());
+            if (scheduledJob == null) {
+                // throw an exception
+                throw new ActionMessagesException(
+                        "errors.crud_could_not_find_crud_table",
+
+                        new Object[] { scheduledJobForm.id });
+
+            }
+
+            scheduledJobService.delete(scheduledJob);
+            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 loadScheduledJob() {
+
+        final ScheduledJob scheduledJob = scheduledJobService
+                .getScheduledJob(createKeyMap());
+        if (scheduledJob == null) {
+            // throw an exception
+            throw new ActionMessagesException(
+                    "errors.crud_could_not_find_crud_table",
+
+                    new Object[] { scheduledJobForm.id });
+
+        }
+
+        Beans.copy(scheduledJob, scheduledJobForm)
+                .excludes("searchParams", "mode")
+
+                .execute();
+    }
+
+    protected ScheduledJob createScheduledJob() {
+        ScheduledJob scheduledJob;
+        if (scheduledJobForm.crudMode == CommonConstants.EDIT_MODE) {
+            scheduledJob = scheduledJobService.getScheduledJob(createKeyMap());
+            if (scheduledJob == null) {
+                // throw an exception
+                throw new ActionMessagesException(
+                        "errors.crud_could_not_find_crud_table",
+
+                        new Object[] { scheduledJobForm.id });
+
+            }
+        } else {
+            scheduledJob = new ScheduledJob();
+        }
+        Beans.copy(scheduledJobForm, scheduledJob)
+                .excludes("searchParams", "mode")
+
+                .execute();
+
+        return scheduledJob;
+    }
+
+    protected Map<String, String> createKeyMap() {
+        final Map<String, String> keys = new HashMap<String, String>();
+
+        keys.put("id", scheduledJobForm.id);
+
+        return keys;
+    }
+}

+ 1 - 1
src/main/java/jp/sf/fess/crud/action/admin/BsSearchLogAction.java

@@ -202,7 +202,7 @@ public class BsSearchLogAction implements Serializable {
         return "confirm.jsp";
     }
 
-    @Token(save = false, validate = true, keep = true)
+    @Token(save = true, validate = false)
     @Execute(validator = false, input = "error.jsp")
     public String deletefromconfirm() {
         searchLogForm.crudMode = CommonConstants.DELETE_MODE;

+ 1 - 1
src/main/java/jp/sf/fess/crud/action/admin/BsUserInfoAction.java

@@ -203,7 +203,7 @@ public class BsUserInfoAction implements Serializable {
         return "confirm.jsp";
     }
 
-    @Token(save = false, validate = true, keep = true)
+    @Token(save = true, validate = false)
     @Execute(validator = false, input = "error.jsp")
     public String deletefromconfirm() {
         userInfoForm.crudMode = CommonConstants.DELETE_MODE;

+ 1 - 1
src/main/java/jp/sf/fess/crud/action/admin/BsWebAuthenticationAction.java

@@ -205,7 +205,7 @@ public class BsWebAuthenticationAction implements Serializable {
         return "confirm.jsp";
     }
 
-    @Token(save = false, validate = true, keep = true)
+    @Token(save = true, validate = false)
     @Execute(validator = false, input = "error.jsp")
     public String deletefromconfirm() {
         webAuthenticationForm.crudMode = CommonConstants.DELETE_MODE;

+ 1 - 1
src/main/java/jp/sf/fess/crud/action/admin/BsWebCrawlingConfigAction.java

@@ -205,7 +205,7 @@ public class BsWebCrawlingConfigAction implements Serializable {
         return "confirm.jsp";
     }
 
-    @Token(save = false, validate = true, keep = true)
+    @Token(save = true, validate = false)
     @Execute(validator = false, input = "error.jsp")
     public String deletefromconfirm() {
         webCrawlingConfigForm.crudMode = CommonConstants.DELETE_MODE;

+ 84 - 0
src/main/java/jp/sf/fess/crud/form/admin/BsJobLogForm.java

@@ -0,0 +1,84 @@
+/*
+ * Copyright 2009-2013 the Fess 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.Required;
+
+public abstract class BsJobLogForm {
+    @IntegerType
+    public String pageNumber;
+
+    public Map<String, String> searchParams = new HashMap<String, String>();
+
+    @IntegerType
+    public int crudMode;
+
+    public String getCurrentPageNumber() {
+        return pageNumber;
+    }
+
+    @Required(target = "confirmfromupdate,update,delete")
+    @LongType
+    public String id;
+
+    @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
+    public String jobName;
+
+    @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
+    public String jobStatus;
+
+    @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
+    public String target;
+
+    @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
+    public String scriptType;
+
+    public String scriptData;
+
+    public String scriptResult;
+
+    @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
+    @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
+    public String startTime;
+
+    @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
+    @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
+    public String endTime;
+
+    public void initialize() {
+
+        id = null;
+        jobName = null;
+        jobStatus = null;
+        target = null;
+        scriptType = null;
+        scriptData = null;
+        scriptResult = null;
+        startTime = null;
+        endTime = null;
+
+    }
+
+}

+ 122 - 0
src/main/java/jp/sf/fess/crud/form/admin/BsScheduledJobForm.java

@@ -0,0 +1,122 @@
+/*
+ * Copyright 2009-2013 the Fess 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 jp.sf.fess.annotation.CronExpression;
+
+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 BsScheduledJobForm {
+    @IntegerType
+    public String pageNumber;
+
+    public Map<String, String> searchParams = new HashMap<String, String>();
+
+    @IntegerType
+    public int crudMode;
+
+    public String getCurrentPageNumber() {
+        return pageNumber;
+    }
+
+    @Required(target = "confirmfromupdate,update,delete")
+    @LongType
+    public String id;
+
+    @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
+    @Maxbytelength(maxbytelength = 100)
+    public String name;
+
+    @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
+    @Maxbytelength(maxbytelength = 100)
+    public String target;
+
+    @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
+    @Maxbytelength(maxbytelength = 100)
+    @CronExpression
+    public String cronExpression;
+
+    @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
+    @Maxbytelength(maxbytelength = 100)
+    public String scriptType;
+
+    @Maxbytelength(maxbytelength = 4000)
+    public String scriptData;
+
+    // ignore
+    public String crawler;
+
+    // ignore
+    public String jobLogging;
+
+    @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
+    @IntegerType
+    @IntRange(min = 0, max = 2147483647)
+    public String sortOrder;
+
+    @Required(target = "confirmfromupdate,update,delete")
+    public String createdBy;
+
+    @Required(target = "confirmfromupdate,update,delete")
+    @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
+    public String createdTime;
+
+    public String updatedBy;
+
+    @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
+    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;
+        name = null;
+        target = null;
+        cronExpression = null;
+        scriptType = null;
+        scriptData = null;
+        crawler = null;
+        jobLogging = null;
+        sortOrder = null;
+        createdBy = null;
+        createdTime = null;
+        updatedBy = null;
+        updatedTime = null;
+        deletedBy = null;
+        deletedTime = null;
+        versionNo = null;
+
+    }
+
+}

+ 140 - 0
src/main/java/jp/sf/fess/crud/pager/BsJobLogPager.java

@@ -0,0 +1,140 @@
+/*
+ * Copyright 2009-2013 the Fess 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 BsJobLogPager implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    public static final int DEFAULT_PAGE_SIZE = 20;
+
+    public static final int DEFAULT_CURRENT_PAGE_NUMBER = 1;
+
+    private int allRecordCount;
+
+    private int allPageCount;
+
+    private boolean existPrePage;
+
+    private boolean existNextPage;
+
+    private List<Integer> pageNumberList;
+
+    private int pageSize;
+
+    private int currentPageNumber;
+
+    public String id;
+
+    public String jobName;
+
+    public String jobStatus;
+
+    public String target;
+
+    public String scriptType;
+
+    public String startTime;
+
+    public String endTime;
+
+    public void clear() {
+        pageSize = getDefaultPageSize();
+        currentPageNumber = getDefaultCurrentPageNumber();
+
+        id = null;
+        jobName = null;
+        jobStatus = null;
+        target = null;
+        scriptType = null;
+        startTime = null;
+        endTime = null;
+
+    }
+
+    protected int getDefaultPageSize() {
+        return DEFAULT_PAGE_SIZE;
+    }
+
+    protected int getDefaultCurrentPageNumber() {
+        return DEFAULT_CURRENT_PAGE_NUMBER;
+    }
+
+    public int getAllRecordCount() {
+        return allRecordCount;
+    }
+
+    public void setAllRecordCount(final int allRecordCount) {
+        this.allRecordCount = allRecordCount;
+    }
+
+    public int getAllPageCount() {
+        return allPageCount;
+    }
+
+    public void setAllPageCount(final int allPageCount) {
+        this.allPageCount = allPageCount;
+    }
+
+    public boolean isExistPrePage() {
+        return existPrePage;
+    }
+
+    public void setExistPrePage(final boolean existPrePage) {
+        this.existPrePage = existPrePage;
+    }
+
+    public boolean isExistNextPage() {
+        return existNextPage;
+    }
+
+    public void setExistNextPage(final boolean existNextPage) {
+        this.existNextPage = existNextPage;
+    }
+
+    public int getPageSize() {
+        if (pageSize <= 0) {
+            pageSize = getDefaultPageSize();
+        }
+        return pageSize;
+    }
+
+    public void setPageSize(final int pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public int getCurrentPageNumber() {
+        if (currentPageNumber <= 0) {
+            currentPageNumber = getDefaultCurrentPageNumber();
+        }
+        return currentPageNumber;
+    }
+
+    public void setCurrentPageNumber(final int currentPageNumber) {
+        this.currentPageNumber = currentPageNumber;
+    }
+
+    public List<Integer> getPageNumberList() {
+        return pageNumberList;
+    }
+
+    public void setPageNumberList(final List<Integer> pageNumberList) {
+        this.pageNumberList = pageNumberList;
+    }
+}

+ 152 - 0
src/main/java/jp/sf/fess/crud/pager/BsScheduledJobPager.java

@@ -0,0 +1,152 @@
+/*
+ * Copyright 2009-2013 the Fess 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 BsScheduledJobPager implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    public static final int DEFAULT_PAGE_SIZE = 20;
+
+    public static final int DEFAULT_CURRENT_PAGE_NUMBER = 1;
+
+    private int allRecordCount;
+
+    private int allPageCount;
+
+    private boolean existPrePage;
+
+    private boolean existNextPage;
+
+    private List<Integer> pageNumberList;
+
+    private int pageSize;
+
+    private int currentPageNumber;
+
+    public String id;
+
+    public String name;
+
+    public String target;
+
+    public String cronExpression;
+
+    public String scriptType;
+
+    public String crawler;
+
+    public String jobLogging;
+
+    public String sortOrder;
+
+    public String createdBy;
+
+    public String createdTime;
+
+    public String versionNo;
+
+    public void clear() {
+        pageSize = getDefaultPageSize();
+        currentPageNumber = getDefaultCurrentPageNumber();
+
+        id = null;
+        name = null;
+        target = null;
+        cronExpression = null;
+        scriptType = null;
+        crawler = null;
+        jobLogging = null;
+        sortOrder = null;
+        createdBy = null;
+        createdTime = null;
+        versionNo = null;
+
+    }
+
+    protected int getDefaultPageSize() {
+        return DEFAULT_PAGE_SIZE;
+    }
+
+    protected int getDefaultCurrentPageNumber() {
+        return DEFAULT_CURRENT_PAGE_NUMBER;
+    }
+
+    public int getAllRecordCount() {
+        return allRecordCount;
+    }
+
+    public void setAllRecordCount(final int allRecordCount) {
+        this.allRecordCount = allRecordCount;
+    }
+
+    public int getAllPageCount() {
+        return allPageCount;
+    }
+
+    public void setAllPageCount(final int allPageCount) {
+        this.allPageCount = allPageCount;
+    }
+
+    public boolean isExistPrePage() {
+        return existPrePage;
+    }
+
+    public void setExistPrePage(final boolean existPrePage) {
+        this.existPrePage = existPrePage;
+    }
+
+    public boolean isExistNextPage() {
+        return existNextPage;
+    }
+
+    public void setExistNextPage(final boolean existNextPage) {
+        this.existNextPage = existNextPage;
+    }
+
+    public int getPageSize() {
+        if (pageSize <= 0) {
+            pageSize = getDefaultPageSize();
+        }
+        return pageSize;
+    }
+
+    public void setPageSize(final int pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public int getCurrentPageNumber() {
+        if (currentPageNumber <= 0) {
+            currentPageNumber = getDefaultCurrentPageNumber();
+        }
+        return currentPageNumber;
+    }
+
+    public void setCurrentPageNumber(final int currentPageNumber) {
+        this.currentPageNumber = currentPageNumber;
+    }
+
+    public List<Integer> getPageNumberList() {
+        return pageNumberList;
+    }
+
+    public void setPageNumberList(final List<Integer> pageNumberList) {
+        this.pageNumberList = pageNumberList;
+    }
+}

+ 113 - 0
src/main/java/jp/sf/fess/crud/service/BsJobLogService.java

@@ -0,0 +1,113 @@
+/*
+ * Copyright 2009-2013 the Fess 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.JobLogCB;
+import jp.sf.fess.db.exbhv.JobLogBhv;
+import jp.sf.fess.db.exentity.JobLog;
+import jp.sf.fess.pager.JobLogPager;
+
+import org.seasar.dbflute.cbean.PagingResultBean;
+import org.seasar.framework.beans.util.Beans;
+
+public abstract class BsJobLogService {
+
+    @Resource
+    protected JobLogBhv jobLogBhv;
+
+    public BsJobLogService() {
+        super();
+    }
+
+    public List<JobLog> getJobLogList(final JobLogPager jobLogPager) {
+
+        final JobLogCB cb = new JobLogCB();
+
+        cb.fetchFirst(jobLogPager.getPageSize());
+        cb.fetchPage(jobLogPager.getCurrentPageNumber());
+
+        setupListCondition(cb, jobLogPager);
+
+        final PagingResultBean<JobLog> jobLogList = jobLogBhv.selectPage(cb);
+
+        // update pager
+        Beans.copy(jobLogList, jobLogPager)
+                .includes(CommonConstants.PAGER_CONVERSION_RULE).execute();
+        jobLogList.setPageRangeSize(5);
+        jobLogPager.setPageNumberList(jobLogList.pageRange()
+                .createPageNumberList());
+
+        return jobLogList;
+    }
+
+    public JobLog getJobLog(final Map<String, String> keys) {
+        final JobLogCB cb = new JobLogCB();
+
+        cb.query().setId_Equal(Long.parseLong(keys.get("id")));
+        // TODO Long, Integer, String supported only.
+
+        setupEntityCondition(cb, keys);
+
+        final JobLog jobLog = jobLogBhv.selectEntity(cb);
+        if (jobLog == null) {
+            // TODO exception?
+            return null;
+        }
+
+        return jobLog;
+    }
+
+    public void store(final JobLog jobLog) throws CrudMessageException {
+        setupStoreCondition(jobLog);
+
+        jobLogBhv.insertOrUpdate(jobLog);
+
+    }
+
+    public void delete(final JobLog jobLog) throws CrudMessageException {
+        setupDeleteCondition(jobLog);
+
+        jobLogBhv.delete(jobLog);
+
+    }
+
+    protected void setupListCondition(final JobLogCB cb,
+            final JobLogPager jobLogPager) {
+
+        if (jobLogPager.id != null) {
+            cb.query().setId_Equal(Long.parseLong(jobLogPager.id));
+        }
+        // TODO Long, Integer, String supported only.
+    }
+
+    protected void setupEntityCondition(final JobLogCB cb,
+            final Map<String, String> keys) {
+    }
+
+    protected void setupStoreCondition(final JobLog jobLog) {
+    }
+
+    protected void setupDeleteCondition(final JobLog jobLog) {
+    }
+}

+ 117 - 0
src/main/java/jp/sf/fess/crud/service/BsScheduledJobService.java

@@ -0,0 +1,117 @@
+/*
+ * Copyright 2009-2013 the Fess 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.ScheduledJobCB;
+import jp.sf.fess.db.exbhv.ScheduledJobBhv;
+import jp.sf.fess.db.exentity.ScheduledJob;
+import jp.sf.fess.pager.ScheduledJobPager;
+
+import org.seasar.dbflute.cbean.PagingResultBean;
+import org.seasar.framework.beans.util.Beans;
+
+public abstract class BsScheduledJobService {
+
+    @Resource
+    protected ScheduledJobBhv scheduledJobBhv;
+
+    public BsScheduledJobService() {
+        super();
+    }
+
+    public List<ScheduledJob> getScheduledJobList(
+            final ScheduledJobPager scheduledJobPager) {
+
+        final ScheduledJobCB cb = new ScheduledJobCB();
+
+        cb.fetchFirst(scheduledJobPager.getPageSize());
+        cb.fetchPage(scheduledJobPager.getCurrentPageNumber());
+
+        setupListCondition(cb, scheduledJobPager);
+
+        final PagingResultBean<ScheduledJob> scheduledJobList = scheduledJobBhv
+                .selectPage(cb);
+
+        // update pager
+        Beans.copy(scheduledJobList, scheduledJobPager)
+                .includes(CommonConstants.PAGER_CONVERSION_RULE).execute();
+        scheduledJobList.setPageRangeSize(5);
+        scheduledJobPager.setPageNumberList(scheduledJobList.pageRange()
+                .createPageNumberList());
+
+        return scheduledJobList;
+    }
+
+    public ScheduledJob getScheduledJob(final Map<String, String> keys) {
+        final ScheduledJobCB cb = new ScheduledJobCB();
+
+        cb.query().setId_Equal(Long.parseLong(keys.get("id")));
+        // TODO Long, Integer, String supported only.
+
+        setupEntityCondition(cb, keys);
+
+        final ScheduledJob scheduledJob = scheduledJobBhv.selectEntity(cb);
+        if (scheduledJob == null) {
+            // TODO exception?
+            return null;
+        }
+
+        return scheduledJob;
+    }
+
+    public void store(final ScheduledJob scheduledJob)
+            throws CrudMessageException {
+        setupStoreCondition(scheduledJob);
+
+        scheduledJobBhv.insertOrUpdate(scheduledJob);
+
+    }
+
+    public void delete(final ScheduledJob scheduledJob)
+            throws CrudMessageException {
+        setupDeleteCondition(scheduledJob);
+
+        scheduledJobBhv.delete(scheduledJob);
+
+    }
+
+    protected void setupListCondition(final ScheduledJobCB cb,
+            final ScheduledJobPager scheduledJobPager) {
+
+        if (scheduledJobPager.id != null) {
+            cb.query().setId_Equal(Long.parseLong(scheduledJobPager.id));
+        }
+        // TODO Long, Integer, String supported only.
+    }
+
+    protected void setupEntityCondition(final ScheduledJobCB cb,
+            final Map<String, String> keys) {
+    }
+
+    protected void setupStoreCondition(final ScheduledJob scheduledJob) {
+    }
+
+    protected void setupDeleteCondition(final ScheduledJob scheduledJob) {
+    }
+}

+ 3 - 0
src/main/java/jp/sf/fess/db/allcommon/DBMetaInstanceHandler.java

@@ -76,6 +76,7 @@ public class DBMetaInstanceHandler implements DBMetaProvider {
                 "jp.sf.fess.db.bsentity.dbmeta.FileConfigToRoleTypeMappingDbm");
         tmpMap.put("FILE_CRAWLING_CONFIG",
                 "jp.sf.fess.db.bsentity.dbmeta.FileCrawlingConfigDbm");
+        tmpMap.put("JOB_LOG", "jp.sf.fess.db.bsentity.dbmeta.JobLogDbm");
         tmpMap.put("LABEL_TYPE", "jp.sf.fess.db.bsentity.dbmeta.LabelTypeDbm");
         tmpMap.put("LABEL_TYPE_TO_ROLE_TYPE_MAPPING",
                 "jp.sf.fess.db.bsentity.dbmeta.LabelTypeToRoleTypeMappingDbm");
@@ -86,6 +87,8 @@ public class DBMetaInstanceHandler implements DBMetaProvider {
         tmpMap.put("REQUEST_HEADER",
                 "jp.sf.fess.db.bsentity.dbmeta.RequestHeaderDbm");
         tmpMap.put("ROLE_TYPE", "jp.sf.fess.db.bsentity.dbmeta.RoleTypeDbm");
+        tmpMap.put("SCHEDULED_JOB",
+                "jp.sf.fess.db.bsentity.dbmeta.ScheduledJobDbm");
         tmpMap.put("SEARCH_FIELD_LOG",
                 "jp.sf.fess.db.bsentity.dbmeta.SearchFieldLogDbm");
         tmpMap.put("SEARCH_LOG", "jp.sf.fess.db.bsentity.dbmeta.SearchLogDbm");

+ 65 - 29
src/main/java/jp/sf/fess/db/bsbhv/BsBrowserTypeBhv.java

@@ -1085,7 +1085,9 @@ public abstract class BsBrowserTypeBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param browserType The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -1140,7 +1142,9 @@ public abstract class BsBrowserTypeBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() }
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param browserType The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -1315,8 +1319,8 @@ public abstract class BsBrowserTypeBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param browserTypeList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -1346,13 +1350,14 @@ public abstract class BsBrowserTypeBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, ExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * browserTypeBhv.<span style="color: #FD4747">batchUpdate</span>(browserTypeList, new SpecifyQuery<BrowserTypeCB>() {
-     *     public void specify(BrowserTypeCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(BrowserTypeCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1367,10 +1372,23 @@ public abstract class BsBrowserTypeBhv extends AbstractBehaviorWritable {
     protected int[] doBatchUpdate(final List<BrowserType> browserTypeList,
             final UpdateOption<BrowserTypeCB> option) {
         assertObjectNotNull("browserTypeList", browserTypeList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(browserTypeList, option);
         return delegateBatchUpdate(browserTypeList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<BrowserType> browserTypeList,
+            final UpdateOption<BrowserTypeCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(browserTypeList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -1383,18 +1401,27 @@ public abstract class BsBrowserTypeBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, ExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * browserTypeBhv.<span style="color: #FD4747">batchUpdate</span>(browserTypeList, new SpecifyQuery<BrowserTypeCB>() {
+     *     public void specify(BrowserTypeCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * browserTypeBhv.<span style="color: #FD4747">batchUpdate</span>(browserTypeList, new SpecifyQuery<BrowserTypeCB>() {
-     *     public void specify(BrowserTypeCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(BrowserTypeCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param browserTypeList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)
@@ -1410,12 +1437,13 @@ public abstract class BsBrowserTypeBhv extends AbstractBehaviorWritable {
      * Batch-update the entity list non-strictly. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
      * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span>
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * So you should the other batchUpdateNonstrict() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * browserTypeBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(browserTypeList, new SpecifyQuery<BrowserTypeCB>() {
-     *     public void specify(BrowserTypeCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(BrowserTypeCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1431,24 +1459,32 @@ public abstract class BsBrowserTypeBhv extends AbstractBehaviorWritable {
             final List<BrowserType> browserTypeList,
             final UpdateOption<BrowserTypeCB> option) {
         assertObjectNotNull("browserTypeList", browserTypeList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(browserTypeList, option);
         return delegateBatchUpdateNonstrict(browserTypeList, option);
     }
 
     /**
      * Batch-update the entity list non-strictly. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * browserTypeBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(browserTypeList, new SpecifyQuery<BrowserTypeCB>() {
+     *     public void specify(BrowserTypeCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * browserTypeBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(browserTypeList, new SpecifyQuery<BrowserTypeCB>() {
-     *     public void specify(BrowserTypeCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(BrowserTypeCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>And you should specify columns that are modified in any entities (at least one entity).</p>
      * @param browserTypeList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 40 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsClickLogBhv.java

@@ -640,7 +640,9 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param clickLog The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -761,8 +763,8 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param clickLogList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -792,13 +794,14 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * clickLogBhv.<span style="color: #FD4747">batchUpdate</span>(clickLogList, new SpecifyQuery<ClickLogCB>() {
-     *     public void specify(ClickLogCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(ClickLogCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -813,10 +816,22 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
     protected int[] doBatchUpdate(final List<ClickLog> clickLogList,
             final UpdateOption<ClickLogCB> option) {
         assertObjectNotNull("clickLogList", clickLogList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(clickLogList, option);
         return delegateBatchUpdate(clickLogList, option);
     }
 
+    protected void prepareBatchUpdateOption(final List<ClickLog> clickLogList,
+            final UpdateOption<ClickLogCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(clickLogList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -829,18 +844,27 @@ public abstract class BsClickLogBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * clickLogBhv.<span style="color: #FD4747">batchUpdate</span>(clickLogList, new SpecifyQuery<ClickLogCB>() {
-     *     public void specify(ClickLogCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(ClickLogCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * clickLogBhv.<span style="color: #FD4747">batchUpdate</span>(clickLogList, new SpecifyQuery<ClickLogCB>() {
+     *     public void specify(ClickLogCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param clickLogList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 41 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsCrawlingSessionBhv.java

@@ -768,7 +768,9 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param crawlingSession The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -893,8 +895,8 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param crawlingSessionList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -925,13 +927,14 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * crawlingSessionBhv.<span style="color: #FD4747">batchUpdate</span>(crawlingSessionList, new SpecifyQuery<CrawlingSessionCB>() {
-     *     public void specify(CrawlingSessionCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(CrawlingSessionCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -947,10 +950,23 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
             final List<CrawlingSession> crawlingSessionList,
             final UpdateOption<CrawlingSessionCB> option) {
         assertObjectNotNull("crawlingSessionList", crawlingSessionList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(crawlingSessionList, option);
         return delegateBatchUpdate(crawlingSessionList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<CrawlingSession> crawlingSessionList,
+            final UpdateOption<CrawlingSessionCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(crawlingSessionList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -963,18 +979,27 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * crawlingSessionBhv.<span style="color: #FD4747">batchUpdate</span>(crawlingSessionList, new SpecifyQuery<CrawlingSessionCB>() {
-     *     public void specify(CrawlingSessionCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(CrawlingSessionCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * crawlingSessionBhv.<span style="color: #FD4747">batchUpdate</span>(crawlingSessionList, new SpecifyQuery<CrawlingSessionCB>() {
+     *     public void specify(CrawlingSessionCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param crawlingSessionList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 41 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsCrawlingSessionInfoBhv.java

@@ -665,7 +665,9 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param crawlingSessionInfo The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -792,8 +794,8 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param crawlingSessionInfoList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -825,13 +827,14 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * crawlingSessionInfoBhv.<span style="color: #FD4747">batchUpdate</span>(crawlingSessionInfoList, new SpecifyQuery<CrawlingSessionInfoCB>() {
-     *     public void specify(CrawlingSessionInfoCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(CrawlingSessionInfoCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -848,10 +851,23 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
             final List<CrawlingSessionInfo> crawlingSessionInfoList,
             final UpdateOption<CrawlingSessionInfoCB> option) {
         assertObjectNotNull("crawlingSessionInfoList", crawlingSessionInfoList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(crawlingSessionInfoList, option);
         return delegateBatchUpdate(crawlingSessionInfoList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<CrawlingSessionInfo> crawlingSessionInfoList,
+            final UpdateOption<CrawlingSessionInfoCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(crawlingSessionInfoList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -864,18 +880,27 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehaviorWritable
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * crawlingSessionInfoBhv.<span style="color: #FD4747">batchUpdate</span>(crawlingSessionInfoList, new SpecifyQuery<CrawlingSessionInfoCB>() {
-     *     public void specify(CrawlingSessionInfoCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(CrawlingSessionInfoCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * crawlingSessionInfoBhv.<span style="color: #FD4747">batchUpdate</span>(crawlingSessionInfoList, new SpecifyQuery<CrawlingSessionInfoCB>() {
+     *     public void specify(CrawlingSessionInfoCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param crawlingSessionInfoList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 41 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToBrowserTypeMappingBhv.java

@@ -715,7 +715,9 @@ public abstract class BsDataConfigToBrowserTypeMappingBhv extends
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param dataConfigToBrowserTypeMapping The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -848,8 +850,8 @@ public abstract class BsDataConfigToBrowserTypeMappingBhv extends
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param dataConfigToBrowserTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -882,13 +884,14 @@ public abstract class BsDataConfigToBrowserTypeMappingBhv extends
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * dataConfigToBrowserTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(dataConfigToBrowserTypeMappingList, new SpecifyQuery<DataConfigToBrowserTypeMappingCB>() {
-     *     public void specify(DataConfigToBrowserTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(DataConfigToBrowserTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -906,10 +909,23 @@ public abstract class BsDataConfigToBrowserTypeMappingBhv extends
             final UpdateOption<DataConfigToBrowserTypeMappingCB> option) {
         assertObjectNotNull("dataConfigToBrowserTypeMappingList",
                 dataConfigToBrowserTypeMappingList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(dataConfigToBrowserTypeMappingList, option);
         return delegateBatchUpdate(dataConfigToBrowserTypeMappingList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<DataConfigToBrowserTypeMapping> dataConfigToBrowserTypeMappingList,
+            final UpdateOption<DataConfigToBrowserTypeMappingCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(dataConfigToBrowserTypeMappingList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -922,18 +938,27 @@ public abstract class BsDataConfigToBrowserTypeMappingBhv extends
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * dataConfigToBrowserTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(dataConfigToBrowserTypeMappingList, new SpecifyQuery<DataConfigToBrowserTypeMappingCB>() {
-     *     public void specify(DataConfigToBrowserTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(DataConfigToBrowserTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * dataConfigToBrowserTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(dataConfigToBrowserTypeMappingList, new SpecifyQuery<DataConfigToBrowserTypeMappingCB>() {
+     *     public void specify(DataConfigToBrowserTypeMappingCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param dataConfigToBrowserTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 41 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToLabelTypeMappingBhv.java

@@ -712,7 +712,9 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param dataConfigToLabelTypeMapping The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -845,8 +847,8 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param dataConfigToLabelTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -879,13 +881,14 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * dataConfigToLabelTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(dataConfigToLabelTypeMappingList, new SpecifyQuery<DataConfigToLabelTypeMappingCB>() {
-     *     public void specify(DataConfigToLabelTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(DataConfigToLabelTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -903,10 +906,23 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
             final UpdateOption<DataConfigToLabelTypeMappingCB> option) {
         assertObjectNotNull("dataConfigToLabelTypeMappingList",
                 dataConfigToLabelTypeMappingList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(dataConfigToLabelTypeMappingList, option);
         return delegateBatchUpdate(dataConfigToLabelTypeMappingList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<DataConfigToLabelTypeMapping> dataConfigToLabelTypeMappingList,
+            final UpdateOption<DataConfigToLabelTypeMappingCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(dataConfigToLabelTypeMappingList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -919,18 +935,27 @@ public abstract class BsDataConfigToLabelTypeMappingBhv extends
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * dataConfigToLabelTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(dataConfigToLabelTypeMappingList, new SpecifyQuery<DataConfigToLabelTypeMappingCB>() {
-     *     public void specify(DataConfigToLabelTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(DataConfigToLabelTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * dataConfigToLabelTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(dataConfigToLabelTypeMappingList, new SpecifyQuery<DataConfigToLabelTypeMappingCB>() {
+     *     public void specify(DataConfigToLabelTypeMappingCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param dataConfigToLabelTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 41 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToRoleTypeMappingBhv.java

@@ -711,7 +711,9 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param dataConfigToRoleTypeMapping The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -844,8 +846,8 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param dataConfigToRoleTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -878,13 +880,14 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * dataConfigToRoleTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(dataConfigToRoleTypeMappingList, new SpecifyQuery<DataConfigToRoleTypeMappingCB>() {
-     *     public void specify(DataConfigToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(DataConfigToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -902,10 +905,23 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
             final UpdateOption<DataConfigToRoleTypeMappingCB> option) {
         assertObjectNotNull("dataConfigToRoleTypeMappingList",
                 dataConfigToRoleTypeMappingList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(dataConfigToRoleTypeMappingList, option);
         return delegateBatchUpdate(dataConfigToRoleTypeMappingList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<DataConfigToRoleTypeMapping> dataConfigToRoleTypeMappingList,
+            final UpdateOption<DataConfigToRoleTypeMappingCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(dataConfigToRoleTypeMappingList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -918,18 +934,27 @@ public abstract class BsDataConfigToRoleTypeMappingBhv extends
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * dataConfigToRoleTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(dataConfigToRoleTypeMappingList, new SpecifyQuery<DataConfigToRoleTypeMappingCB>() {
-     *     public void specify(DataConfigToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(DataConfigToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * dataConfigToRoleTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(dataConfigToRoleTypeMappingList, new SpecifyQuery<DataConfigToRoleTypeMappingCB>() {
+     *     public void specify(DataConfigToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param dataConfigToRoleTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 65 - 29
src/main/java/jp/sf/fess/db/bsbhv/BsDataCrawlingConfigBhv.java

@@ -1095,7 +1095,9 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param dataCrawlingConfig The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -1151,7 +1153,9 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() }
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param dataCrawlingConfig The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -1334,8 +1338,8 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param dataCrawlingConfigList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -1367,13 +1371,14 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, ExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * dataCrawlingConfigBhv.<span style="color: #FD4747">batchUpdate</span>(dataCrawlingConfigList, new SpecifyQuery<DataCrawlingConfigCB>() {
-     *     public void specify(DataCrawlingConfigCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(DataCrawlingConfigCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1390,10 +1395,23 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
             final List<DataCrawlingConfig> dataCrawlingConfigList,
             final UpdateOption<DataCrawlingConfigCB> option) {
         assertObjectNotNull("dataCrawlingConfigList", dataCrawlingConfigList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(dataCrawlingConfigList, option);
         return delegateBatchUpdate(dataCrawlingConfigList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<DataCrawlingConfig> dataCrawlingConfigList,
+            final UpdateOption<DataCrawlingConfigCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(dataCrawlingConfigList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -1406,18 +1424,27 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, ExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * dataCrawlingConfigBhv.<span style="color: #FD4747">batchUpdate</span>(dataCrawlingConfigList, new SpecifyQuery<DataCrawlingConfigCB>() {
+     *     public void specify(DataCrawlingConfigCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * dataCrawlingConfigBhv.<span style="color: #FD4747">batchUpdate</span>(dataCrawlingConfigList, new SpecifyQuery<DataCrawlingConfigCB>() {
-     *     public void specify(DataCrawlingConfigCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(DataCrawlingConfigCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param dataCrawlingConfigList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)
@@ -1434,12 +1461,13 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
      * Batch-update the entity list non-strictly. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
      * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span>
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * So you should the other batchUpdateNonstrict() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * dataCrawlingConfigBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(dataCrawlingConfigList, new SpecifyQuery<DataCrawlingConfigCB>() {
-     *     public void specify(DataCrawlingConfigCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(DataCrawlingConfigCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1456,24 +1484,32 @@ public abstract class BsDataCrawlingConfigBhv extends AbstractBehaviorWritable {
             final List<DataCrawlingConfig> dataCrawlingConfigList,
             final UpdateOption<DataCrawlingConfigCB> option) {
         assertObjectNotNull("dataCrawlingConfigList", dataCrawlingConfigList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(dataCrawlingConfigList, option);
         return delegateBatchUpdateNonstrict(dataCrawlingConfigList, option);
     }
 
     /**
      * Batch-update the entity list non-strictly. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * dataCrawlingConfigBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(dataCrawlingConfigList, new SpecifyQuery<DataCrawlingConfigCB>() {
+     *     public void specify(DataCrawlingConfigCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * dataCrawlingConfigBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(dataCrawlingConfigList, new SpecifyQuery<DataCrawlingConfigCB>() {
-     *     public void specify(DataCrawlingConfigCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(DataCrawlingConfigCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>And you should specify columns that are modified in any entities (at least one entity).</p>
      * @param dataCrawlingConfigList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 41 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsFailureUrlBhv.java

@@ -673,7 +673,9 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param failureUrl The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -795,8 +797,8 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param failureUrlList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -826,13 +828,14 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * failureUrlBhv.<span style="color: #FD4747">batchUpdate</span>(failureUrlList, new SpecifyQuery<FailureUrlCB>() {
-     *     public void specify(FailureUrlCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FailureUrlCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -847,10 +850,23 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
     protected int[] doBatchUpdate(final List<FailureUrl> failureUrlList,
             final UpdateOption<FailureUrlCB> option) {
         assertObjectNotNull("failureUrlList", failureUrlList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(failureUrlList, option);
         return delegateBatchUpdate(failureUrlList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<FailureUrl> failureUrlList,
+            final UpdateOption<FailureUrlCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(failureUrlList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -863,18 +879,27 @@ public abstract class BsFailureUrlBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * failureUrlBhv.<span style="color: #FD4747">batchUpdate</span>(failureUrlList, new SpecifyQuery<FailureUrlCB>() {
-     *     public void specify(FailureUrlCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FailureUrlCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * failureUrlBhv.<span style="color: #FD4747">batchUpdate</span>(failureUrlList, new SpecifyQuery<FailureUrlCB>() {
+     *     public void specify(FailureUrlCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param failureUrlList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 41 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsFavoriteLogBhv.java

@@ -649,7 +649,9 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param favoriteLog The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -772,8 +774,8 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param favoriteLogList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -803,13 +805,14 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * favoriteLogBhv.<span style="color: #FD4747">batchUpdate</span>(favoriteLogList, new SpecifyQuery<FavoriteLogCB>() {
-     *     public void specify(FavoriteLogCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FavoriteLogCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -824,10 +827,23 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
     protected int[] doBatchUpdate(final List<FavoriteLog> favoriteLogList,
             final UpdateOption<FavoriteLogCB> option) {
         assertObjectNotNull("favoriteLogList", favoriteLogList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(favoriteLogList, option);
         return delegateBatchUpdate(favoriteLogList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<FavoriteLog> favoriteLogList,
+            final UpdateOption<FavoriteLogCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(favoriteLogList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -840,18 +856,27 @@ public abstract class BsFavoriteLogBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * favoriteLogBhv.<span style="color: #FD4747">batchUpdate</span>(favoriteLogList, new SpecifyQuery<FavoriteLogCB>() {
-     *     public void specify(FavoriteLogCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FavoriteLogCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * favoriteLogBhv.<span style="color: #FD4747">batchUpdate</span>(favoriteLogList, new SpecifyQuery<FavoriteLogCB>() {
+     *     public void specify(FavoriteLogCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param favoriteLogList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 65 - 29
src/main/java/jp/sf/fess/db/bsbhv/BsFileAuthenticationBhv.java

@@ -702,7 +702,9 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param fileAuthentication The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -758,7 +760,9 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() }
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param fileAuthentication The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -941,8 +945,8 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param fileAuthenticationList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -974,13 +978,14 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, ExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * fileAuthenticationBhv.<span style="color: #FD4747">batchUpdate</span>(fileAuthenticationList, new SpecifyQuery<FileAuthenticationCB>() {
-     *     public void specify(FileAuthenticationCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FileAuthenticationCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -997,10 +1002,23 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
             final List<FileAuthentication> fileAuthenticationList,
             final UpdateOption<FileAuthenticationCB> option) {
         assertObjectNotNull("fileAuthenticationList", fileAuthenticationList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(fileAuthenticationList, option);
         return delegateBatchUpdate(fileAuthenticationList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<FileAuthentication> fileAuthenticationList,
+            final UpdateOption<FileAuthenticationCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(fileAuthenticationList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -1013,18 +1031,27 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, ExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * fileAuthenticationBhv.<span style="color: #FD4747">batchUpdate</span>(fileAuthenticationList, new SpecifyQuery<FileAuthenticationCB>() {
+     *     public void specify(FileAuthenticationCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * fileAuthenticationBhv.<span style="color: #FD4747">batchUpdate</span>(fileAuthenticationList, new SpecifyQuery<FileAuthenticationCB>() {
-     *     public void specify(FileAuthenticationCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FileAuthenticationCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param fileAuthenticationList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)
@@ -1041,12 +1068,13 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
      * Batch-update the entity list non-strictly. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
      * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span>
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * So you should the other batchUpdateNonstrict() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * fileAuthenticationBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(fileAuthenticationList, new SpecifyQuery<FileAuthenticationCB>() {
-     *     public void specify(FileAuthenticationCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FileAuthenticationCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1063,24 +1091,32 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehaviorWritable {
             final List<FileAuthentication> fileAuthenticationList,
             final UpdateOption<FileAuthenticationCB> option) {
         assertObjectNotNull("fileAuthenticationList", fileAuthenticationList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(fileAuthenticationList, option);
         return delegateBatchUpdateNonstrict(fileAuthenticationList, option);
     }
 
     /**
      * Batch-update the entity list non-strictly. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * fileAuthenticationBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(fileAuthenticationList, new SpecifyQuery<FileAuthenticationCB>() {
+     *     public void specify(FileAuthenticationCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * fileAuthenticationBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(fileAuthenticationList, new SpecifyQuery<FileAuthenticationCB>() {
-     *     public void specify(FileAuthenticationCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FileAuthenticationCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>And you should specify columns that are modified in any entities (at least one entity).</p>
      * @param fileAuthenticationList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 41 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToBrowserTypeMappingBhv.java

@@ -715,7 +715,9 @@ public abstract class BsFileConfigToBrowserTypeMappingBhv extends
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param fileConfigToBrowserTypeMapping The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -848,8 +850,8 @@ public abstract class BsFileConfigToBrowserTypeMappingBhv extends
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param fileConfigToBrowserTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -882,13 +884,14 @@ public abstract class BsFileConfigToBrowserTypeMappingBhv extends
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * fileConfigToBrowserTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(fileConfigToBrowserTypeMappingList, new SpecifyQuery<FileConfigToBrowserTypeMappingCB>() {
-     *     public void specify(FileConfigToBrowserTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FileConfigToBrowserTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -906,10 +909,23 @@ public abstract class BsFileConfigToBrowserTypeMappingBhv extends
             final UpdateOption<FileConfigToBrowserTypeMappingCB> option) {
         assertObjectNotNull("fileConfigToBrowserTypeMappingList",
                 fileConfigToBrowserTypeMappingList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(fileConfigToBrowserTypeMappingList, option);
         return delegateBatchUpdate(fileConfigToBrowserTypeMappingList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<FileConfigToBrowserTypeMapping> fileConfigToBrowserTypeMappingList,
+            final UpdateOption<FileConfigToBrowserTypeMappingCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(fileConfigToBrowserTypeMappingList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -922,18 +938,27 @@ public abstract class BsFileConfigToBrowserTypeMappingBhv extends
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * fileConfigToBrowserTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(fileConfigToBrowserTypeMappingList, new SpecifyQuery<FileConfigToBrowserTypeMappingCB>() {
-     *     public void specify(FileConfigToBrowserTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FileConfigToBrowserTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * fileConfigToBrowserTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(fileConfigToBrowserTypeMappingList, new SpecifyQuery<FileConfigToBrowserTypeMappingCB>() {
+     *     public void specify(FileConfigToBrowserTypeMappingCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param fileConfigToBrowserTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 41 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToLabelTypeMappingBhv.java

@@ -712,7 +712,9 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param fileConfigToLabelTypeMapping The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -845,8 +847,8 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param fileConfigToLabelTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -879,13 +881,14 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * fileConfigToLabelTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(fileConfigToLabelTypeMappingList, new SpecifyQuery<FileConfigToLabelTypeMappingCB>() {
-     *     public void specify(FileConfigToLabelTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FileConfigToLabelTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -903,10 +906,23 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
             final UpdateOption<FileConfigToLabelTypeMappingCB> option) {
         assertObjectNotNull("fileConfigToLabelTypeMappingList",
                 fileConfigToLabelTypeMappingList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(fileConfigToLabelTypeMappingList, option);
         return delegateBatchUpdate(fileConfigToLabelTypeMappingList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<FileConfigToLabelTypeMapping> fileConfigToLabelTypeMappingList,
+            final UpdateOption<FileConfigToLabelTypeMappingCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(fileConfigToLabelTypeMappingList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -919,18 +935,27 @@ public abstract class BsFileConfigToLabelTypeMappingBhv extends
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * fileConfigToLabelTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(fileConfigToLabelTypeMappingList, new SpecifyQuery<FileConfigToLabelTypeMappingCB>() {
-     *     public void specify(FileConfigToLabelTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FileConfigToLabelTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * fileConfigToLabelTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(fileConfigToLabelTypeMappingList, new SpecifyQuery<FileConfigToLabelTypeMappingCB>() {
+     *     public void specify(FileConfigToLabelTypeMappingCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param fileConfigToLabelTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 41 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToRoleTypeMappingBhv.java

@@ -711,7 +711,9 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param fileConfigToRoleTypeMapping The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -844,8 +846,8 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param fileConfigToRoleTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -878,13 +880,14 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * fileConfigToRoleTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(fileConfigToRoleTypeMappingList, new SpecifyQuery<FileConfigToRoleTypeMappingCB>() {
-     *     public void specify(FileConfigToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FileConfigToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -902,10 +905,23 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
             final UpdateOption<FileConfigToRoleTypeMappingCB> option) {
         assertObjectNotNull("fileConfigToRoleTypeMappingList",
                 fileConfigToRoleTypeMappingList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(fileConfigToRoleTypeMappingList, option);
         return delegateBatchUpdate(fileConfigToRoleTypeMappingList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<FileConfigToRoleTypeMapping> fileConfigToRoleTypeMappingList,
+            final UpdateOption<FileConfigToRoleTypeMappingCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(fileConfigToRoleTypeMappingList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -918,18 +934,27 @@ public abstract class BsFileConfigToRoleTypeMappingBhv extends
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * fileConfigToRoleTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(fileConfigToRoleTypeMappingList, new SpecifyQuery<FileConfigToRoleTypeMappingCB>() {
-     *     public void specify(FileConfigToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FileConfigToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * fileConfigToRoleTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(fileConfigToRoleTypeMappingList, new SpecifyQuery<FileConfigToRoleTypeMappingCB>() {
+     *     public void specify(FileConfigToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param fileConfigToRoleTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 65 - 29
src/main/java/jp/sf/fess/db/bsbhv/BsFileCrawlingConfigBhv.java

@@ -1364,7 +1364,9 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param fileCrawlingConfig The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -1420,7 +1422,9 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() }
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param fileCrawlingConfig The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -1603,8 +1607,8 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param fileCrawlingConfigList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -1636,13 +1640,14 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, ExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * fileCrawlingConfigBhv.<span style="color: #FD4747">batchUpdate</span>(fileCrawlingConfigList, new SpecifyQuery<FileCrawlingConfigCB>() {
-     *     public void specify(FileCrawlingConfigCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FileCrawlingConfigCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1659,10 +1664,23 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
             final List<FileCrawlingConfig> fileCrawlingConfigList,
             final UpdateOption<FileCrawlingConfigCB> option) {
         assertObjectNotNull("fileCrawlingConfigList", fileCrawlingConfigList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(fileCrawlingConfigList, option);
         return delegateBatchUpdate(fileCrawlingConfigList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<FileCrawlingConfig> fileCrawlingConfigList,
+            final UpdateOption<FileCrawlingConfigCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(fileCrawlingConfigList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -1675,18 +1693,27 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, ExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * fileCrawlingConfigBhv.<span style="color: #FD4747">batchUpdate</span>(fileCrawlingConfigList, new SpecifyQuery<FileCrawlingConfigCB>() {
+     *     public void specify(FileCrawlingConfigCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * fileCrawlingConfigBhv.<span style="color: #FD4747">batchUpdate</span>(fileCrawlingConfigList, new SpecifyQuery<FileCrawlingConfigCB>() {
-     *     public void specify(FileCrawlingConfigCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FileCrawlingConfigCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param fileCrawlingConfigList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)
@@ -1703,12 +1730,13 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
      * Batch-update the entity list non-strictly. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
      * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span>
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * So you should the other batchUpdateNonstrict() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * fileCrawlingConfigBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(fileCrawlingConfigList, new SpecifyQuery<FileCrawlingConfigCB>() {
-     *     public void specify(FileCrawlingConfigCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FileCrawlingConfigCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1725,24 +1753,32 @@ public abstract class BsFileCrawlingConfigBhv extends AbstractBehaviorWritable {
             final List<FileCrawlingConfig> fileCrawlingConfigList,
             final UpdateOption<FileCrawlingConfigCB> option) {
         assertObjectNotNull("fileCrawlingConfigList", fileCrawlingConfigList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(fileCrawlingConfigList, option);
         return delegateBatchUpdateNonstrict(fileCrawlingConfigList, option);
     }
 
     /**
      * Batch-update the entity list non-strictly. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * fileCrawlingConfigBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(fileCrawlingConfigList, new SpecifyQuery<FileCrawlingConfigCB>() {
+     *     public void specify(FileCrawlingConfigCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * fileCrawlingConfigBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(fileCrawlingConfigList, new SpecifyQuery<FileCrawlingConfigCB>() {
-     *     public void specify(FileCrawlingConfigCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(FileCrawlingConfigCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>And you should specify columns that are modified in any entities (at least one entity).</p>
      * @param fileCrawlingConfigList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 1474 - 0
src/main/java/jp/sf/fess/db/bsbhv/BsJobLogBhv.java

@@ -0,0 +1,1474 @@
+/*
+ * Copyright 2009-2013 the Fess 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.bsentity.dbmeta.JobLogDbm;
+import jp.sf.fess.db.cbean.JobLogCB;
+import jp.sf.fess.db.exbhv.JobLogBhv;
+import jp.sf.fess.db.exentity.JobLog;
+
+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.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.dbmeta.DBMeta;
+import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
+
+/**
+ * The behavior of JOB_LOG as TABLE. <br />
+ * <pre>
+ * [primary key]
+ *     ID
+ * 
+ * [column]
+ *     ID, JOB_NAME, JOB_STATUS, TARGET, SCRIPT_TYPE, SCRIPT_DATA, SCRIPT_RESULT, START_TIME, END_TIME
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     ID
+ * 
+ * [version-no]
+ *     
+ * 
+ * [foreign table]
+ *     
+ * 
+ * [referrer table]
+ *     
+ * 
+ * [foreign property]
+ *     
+ * 
+ * [referrer property]
+ *     
+ * </pre>
+ * @author DBFlute(AutoGenerator)
+ */
+public abstract class BsJobLogBhv extends AbstractBehaviorWritable {
+
+    // ===================================================================================
+    //                                                                          Definition
+    //                                                                          ==========
+    /*df:beginQueryPath*/
+    /*df:endQueryPath*/
+
+    // ===================================================================================
+    //                                                                          Table name
+    //                                                                          ==========
+    /** @return The name on database of table. (NotNull) */
+    @Override
+    public String getTableDbName() {
+        return "JOB_LOG";
+    }
+
+    // ===================================================================================
+    //                                                                              DBMeta
+    //                                                                              ======
+    /** @return The instance of DBMeta. (NotNull) */
+    @Override
+    public DBMeta getDBMeta() {
+        return JobLogDbm.getInstance();
+    }
+
+    /** @return The instance of DBMeta as my table type. (NotNull) */
+    public JobLogDbm getMyDBMeta() {
+        return JobLogDbm.getInstance();
+    }
+
+    // ===================================================================================
+    //                                                                        New Instance
+    //                                                                        ============
+    /** {@inheritDoc} */
+    @Override
+    public Entity newEntity() {
+        return newMyEntity();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public ConditionBean newConditionBean() {
+        return newMyConditionBean();
+    }
+
+    /** @return The instance of new entity as my table type. (NotNull) */
+    public JobLog newMyEntity() {
+        return new JobLog();
+    }
+
+    /** @return The instance of new condition-bean as my table type. (NotNull) */
+    public JobLogCB newMyConditionBean() {
+        return new JobLogCB();
+    }
+
+    // ===================================================================================
+    //                                                                        Count Select
+    //                                                                        ============
+    /**
+     * Select the count of uniquely-selected records by the condition-bean. {IgnorePagingCondition, IgnoreSpecifyColumn}<br />
+     * SpecifyColumn is ignored but you can use it only to remove text type column for union's distinct.
+     * <pre>
+     * JobLogCB cb = new JobLogCB();
+     * cb.query().setFoo...(value);
+     * int count = jobLogBhv.<span style="color: #FD4747">selectCount</span>(cb);
+     * </pre>
+     * @param cb The condition-bean of JobLog. (NotNull)
+     * @return The count for the condition. (NotMinus)
+     */
+    public int selectCount(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 selectCount(downcast(cb));
+    }
+
+    // ===================================================================================
+    //                                                                       Entity Select
+    //                                                                       =============
+    /**
+     * Select the entity by the condition-bean.
+     * <pre>
+     * JobLogCB cb = new JobLogCB();
+     * cb.query().setFoo...(value);
+     * JobLog jobLog = jobLogBhv.<span style="color: #FD4747">selectEntity</span>(cb);
+     * if (jobLog != null) {
+     *     ... = jobLog.get...();
+     * } else {
+     *     ...
+     * }
+     * </pre>
+     * @param cb The condition-bean of JobLog. (NotNull)
+     * @return The entity selected by the condition. (NullAllowed: if no data, it returns null)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.SelectEntityConditionNotFoundException When the condition for selecting an entity is not found.
+     */
+    public JobLog selectEntity(final JobLogCB cb) {
+        return doSelectEntity(cb, JobLog.class);
+    }
+
+    protected <ENTITY extends JobLog> ENTITY doSelectEntity(final JobLogCB cb,
+            final Class<ENTITY> entityType) {
+        assertCBStateValid(cb);
+        return helpSelectEntityInternally(cb, entityType,
+                new InternalSelectEntityCallback<ENTITY, JobLogCB>() {
+                    @Override
+                    public List<ENTITY> callbackSelectList(final JobLogCB cb,
+                            final Class<ENTITY> entityType) {
+                        return doSelectList(cb, entityType);
+                    }
+                });
+    }
+
+    @Override
+    protected Entity doReadEntity(final ConditionBean cb) {
+        return selectEntity(downcast(cb));
+    }
+
+    /**
+     * Select the entity by the condition-bean with deleted check.
+     * <pre>
+     * JobLogCB cb = new JobLogCB();
+     * cb.query().setFoo...(value);
+     * JobLog jobLog = jobLogBhv.<span style="color: #FD4747">selectEntityWithDeletedCheck</span>(cb);
+     * ... = jobLog.get...(); <span style="color: #3F7E5E">// the entity always be not null</span>
+     * </pre>
+     * @param cb The condition-bean of JobLog. (NotNull)
+     * @return The entity selected by the condition. (NotNull: if no data, throws exception)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.SelectEntityConditionNotFoundException When the condition for selecting an entity is not found.
+     */
+    public JobLog selectEntityWithDeletedCheck(final JobLogCB cb) {
+        return doSelectEntityWithDeletedCheck(cb, JobLog.class);
+    }
+
+    protected <ENTITY extends JobLog> ENTITY doSelectEntityWithDeletedCheck(
+            final JobLogCB cb, final Class<ENTITY> entityType) {
+        assertCBStateValid(cb);
+        return helpSelectEntityWithDeletedCheckInternally(
+                cb,
+                entityType,
+                new InternalSelectEntityWithDeletedCheckCallback<ENTITY, JobLogCB>() {
+                    @Override
+                    public List<ENTITY> callbackSelectList(final JobLogCB cb,
+                            final Class<ENTITY> entityType) {
+                        return doSelectList(cb, entityType);
+                    }
+                });
+    }
+
+    @Override
+    protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
+        return selectEntityWithDeletedCheck(downcast(cb));
+    }
+
+    /**
+     * Select the entity by the primary-key value.
+     * @param id The one of primary key. (NotNull)
+     * @return The entity selected by the PK. (NullAllowed: if no data, it returns null)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.SelectEntityConditionNotFoundException When the condition for selecting an entity is not found.
+     */
+    public JobLog selectByPKValue(final Long id) {
+        return doSelectByPKValue(id, JobLog.class);
+    }
+
+    protected <ENTITY extends JobLog> ENTITY doSelectByPKValue(final Long id,
+            final Class<ENTITY> entityType) {
+        return doSelectEntity(buildPKCB(id), entityType);
+    }
+
+    /**
+     * Select the entity by the primary-key value with deleted check.
+     * @param id The one of primary key. (NotNull)
+     * @return The entity selected by the PK. (NotNull: if no data, throws exception)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.SelectEntityConditionNotFoundException When the condition for selecting an entity is not found.
+     */
+    public JobLog selectByPKValueWithDeletedCheck(final Long id) {
+        return doSelectByPKValueWithDeletedCheck(id, JobLog.class);
+    }
+
+    protected <ENTITY extends JobLog> ENTITY doSelectByPKValueWithDeletedCheck(
+            final Long id, final Class<ENTITY> entityType) {
+        return doSelectEntityWithDeletedCheck(buildPKCB(id), entityType);
+    }
+
+    private JobLogCB buildPKCB(final Long id) {
+        assertObjectNotNull("id", id);
+        final JobLogCB cb = newMyConditionBean();
+        cb.query().setId_Equal(id);
+        return cb;
+    }
+
+    // ===================================================================================
+    //                                                                         List Select
+    //                                                                         ===========
+    /**
+     * Select the list as result bean.
+     * <pre>
+     * JobLogCB cb = new JobLogCB();
+     * cb.query().setFoo...(value);
+     * cb.query().addOrderBy_Bar...();
+     * ListResultBean&lt;JobLog&gt; jobLogList = jobLogBhv.<span style="color: #FD4747">selectList</span>(cb);
+     * for (JobLog jobLog : jobLogList) {
+     *     ... = jobLog.get...();
+     * }
+     * </pre>
+     * @param cb The condition-bean of JobLog. (NotNull)
+     * @return The result bean of selected list. (NotNull: if no data, returns empty list)
+     * @exception org.seasar.dbflute.exception.DangerousResultSizeException When the result size is over the specified safety size.
+     */
+    public ListResultBean<JobLog> selectList(final JobLogCB cb) {
+        return doSelectList(cb, JobLog.class);
+    }
+
+    protected <ENTITY extends JobLog> ListResultBean<ENTITY> doSelectList(
+            final JobLogCB cb, final Class<ENTITY> entityType) {
+        assertCBStateValid(cb);
+        assertObjectNotNull("entityType", entityType);
+        assertSpecifyDerivedReferrerEntityProperty(cb, entityType);
+        return helpSelectListInternally(cb, entityType,
+                new InternalSelectListCallback<ENTITY, JobLogCB>() {
+                    @Override
+                    public List<ENTITY> callbackSelectList(final JobLogCB cb,
+                            final Class<ENTITY> entityType) {
+                        return delegateSelectList(cb, entityType);
+                    }
+                });
+    }
+
+    @Override
+    protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
+        return selectList(downcast(cb));
+    }
+
+    // ===================================================================================
+    //                                                                         Page Select
+    //                                                                         ===========
+    /**
+     * Select the page as result bean. <br />
+     * (both count-select and paging-select are executed)
+     * <pre>
+     * JobLogCB cb = new JobLogCB();
+     * cb.query().setFoo...(value);
+     * cb.query().addOrderBy_Bar...();
+     * cb.<span style="color: #FD4747">paging</span>(20, 3); <span style="color: #3F7E5E">// 20 records per a page and current page number is 3</span>
+     * PagingResultBean&lt;JobLog&gt; page = jobLogBhv.<span style="color: #FD4747">selectPage</span>(cb);
+     * int allRecordCount = page.getAllRecordCount();
+     * int allPageCount = page.getAllPageCount();
+     * boolean isExistPrePage = page.isExistPrePage();
+     * boolean isExistNextPage = page.isExistNextPage();
+     * ...
+     * for (JobLog jobLog : page) {
+     *     ... = jobLog.get...();
+     * }
+     * </pre>
+     * @param cb The condition-bean of JobLog. (NotNull)
+     * @return The result bean of selected page. (NotNull: if no data, returns bean as empty list)
+     * @exception org.seasar.dbflute.exception.DangerousResultSizeException When the result size is over the specified safety size.
+     */
+    public PagingResultBean<JobLog> selectPage(final JobLogCB cb) {
+        return doSelectPage(cb, JobLog.class);
+    }
+
+    protected <ENTITY extends JobLog> PagingResultBean<ENTITY> doSelectPage(
+            final JobLogCB cb, final Class<ENTITY> entityType) {
+        assertCBStateValid(cb);
+        assertObjectNotNull("entityType", entityType);
+        return helpSelectPageInternally(cb, entityType,
+                new InternalSelectPageCallback<ENTITY, JobLogCB>() {
+                    @Override
+                    public int callbackSelectCount(final JobLogCB cb) {
+                        return doSelectCountPlainly(cb);
+                    }
+
+                    @Override
+                    public List<ENTITY> callbackSelectList(final JobLogCB cb,
+                            final Class<ENTITY> entityType) {
+                        return doSelectList(cb, entityType);
+                    }
+                });
+    }
+
+    @Override
+    protected PagingResultBean<? extends Entity> doReadPage(
+            final ConditionBean cb) {
+        return selectPage(downcast(cb));
+    }
+
+    // ===================================================================================
+    //                                                                       Cursor Select
+    //                                                                       =============
+    /**
+     * Select the cursor by the condition-bean.
+     * <pre>
+     * JobLogCB cb = new JobLogCB();
+     * cb.query().setFoo...(value);
+     * jobLogBhv.<span style="color: #FD4747">selectCursor</span>(cb, new EntityRowHandler&lt;JobLog&gt;() {
+     *     public void handle(JobLog entity) {
+     *         ... = entity.getFoo...();
+     *     }
+     * });
+     * </pre>
+     * @param cb The condition-bean of JobLog. (NotNull)
+     * @param entityRowHandler The handler of entity row of JobLog. (NotNull)
+     */
+    public void selectCursor(final JobLogCB cb,
+            final EntityRowHandler<JobLog> entityRowHandler) {
+        doSelectCursor(cb, entityRowHandler, JobLog.class);
+    }
+
+    protected <ENTITY extends JobLog> void doSelectCursor(final JobLogCB cb,
+            final EntityRowHandler<ENTITY> entityRowHandler,
+            final Class<ENTITY> entityType) {
+        assertCBStateValid(cb);
+        assertObjectNotNull("entityRowHandler<JobLog>", entityRowHandler);
+        assertObjectNotNull("entityType", entityType);
+        assertSpecifyDerivedReferrerEntityProperty(cb, entityType);
+        helpSelectCursorInternally(cb, entityRowHandler, entityType,
+                new InternalSelectCursorCallback<ENTITY, JobLogCB>() {
+                    @Override
+                    public void callbackSelectCursor(final JobLogCB cb,
+                            final EntityRowHandler<ENTITY> entityRowHandler,
+                            final Class<ENTITY> entityType) {
+                        delegateSelectCursor(cb, entityRowHandler, entityType);
+                    }
+
+                    @Override
+                    public List<ENTITY> callbackSelectList(final JobLogCB cb,
+                            final Class<ENTITY> entityType) {
+                        return doSelectList(cb, entityType);
+                    }
+                });
+    }
+
+    // ===================================================================================
+    //                                                                       Scalar Select
+    //                                                                       =============
+    /**
+     * Select the scalar value derived by a function from uniquely-selected records. <br />
+     * You should call a function method after this method called like as follows:
+     * <pre>
+     * jobLogBhv.<span style="color: #FD4747">scalarSelect</span>(Date.class).max(new ScalarQuery() {
+     *     public void query(JobLogCB cb) {
+     *         cb.specify().<span style="color: #FD4747">columnFooDatetime()</span>; <span style="color: #3F7E5E">// required for a function</span>
+     *         cb.query().setBarName_PrefixSearch("S");
+     *     }
+     * });
+     * </pre>
+     * @param <RESULT> The type of result.
+     * @param resultType The type of result. (NotNull)
+     * @return The scalar value derived by a function. (NullAllowed)
+     */
+    public <RESULT> SLFunction<JobLogCB, RESULT> scalarSelect(
+            final Class<RESULT> resultType) {
+        return doScalarSelect(resultType, newMyConditionBean());
+    }
+
+    protected <RESULT, CB extends JobLogCB> SLFunction<CB, RESULT> doScalarSelect(
+            final Class<RESULT> resultType, final CB cb) {
+        assertObjectNotNull("resultType", resultType);
+        assertCBStateValid(cb);
+        cb.xsetupForScalarSelect();
+        cb.getSqlClause().disableSelectIndex(); // for when you use union
+        return new SLFunction<CB, RESULT>(cb, resultType);
+    }
+
+    // ===================================================================================
+    //                                                                            Sequence
+    //                                                                            ========
+    @Override
+    protected Number doReadNextVal() {
+        final String msg = "This table is NOT related to sequence: "
+                + getTableDbName();
+        throw new UnsupportedOperationException(msg);
+    }
+
+    // ===================================================================================
+    //                                                                   Pull out Relation
+    //                                                                   =================
+
+    // ===================================================================================
+    //                                                                      Extract Column
+    //                                                                      ==============
+    /**
+     * Extract the value list of (single) primary key id.
+     * @param jobLogList The list of jobLog. (NotNull, EmptyAllowed)
+     * @return The list of the column value. (NotNull, EmptyAllowed, NotNullElement)
+     */
+    public List<Long> extractIdList(final List<JobLog> jobLogList) {
+        return helpExtractListInternally(jobLogList,
+                new InternalExtractCallback<JobLog, Long>() {
+                    @Override
+                    public Long getCV(final JobLog e) {
+                        return e.getId();
+                    }
+                });
+    }
+
+    // ===================================================================================
+    //                                                                       Entity Update
+    //                                                                       =============
+    /**
+     * Insert the entity. (DefaultConstraintsEnabled)
+     * <pre>
+     * JobLog jobLog = new JobLog();
+     * <span style="color: #3F7E5E">// if auto-increment, you don't need to set the PK value</span>
+     * jobLog.setFoo...(value);
+     * jobLog.setBar...(value);
+     * <span style="color: #3F7E5E">// you don't need to set values of common columns</span>
+     * <span style="color: #3F7E5E">//jobLog.setRegisterUser(value);</span>
+     * <span style="color: #3F7E5E">//jobLog.set...;</span>
+     * jobLogBhv.<span style="color: #FD4747">insert</span>(jobLog);
+     * ... = jobLog.getPK...(); <span style="color: #3F7E5E">// if auto-increment, you can get the value after</span>
+     * </pre>
+     * @param jobLog The entity of insert target. (NotNull, PrimaryKeyNullAllowed: when auto-increment)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void insert(final JobLog jobLog) {
+        doInsert(jobLog, null);
+    }
+
+    protected void doInsert(final JobLog jobLog,
+            final InsertOption<JobLogCB> option) {
+        assertObjectNotNull("jobLog", jobLog);
+        prepareInsertOption(option);
+        delegateInsert(jobLog, option);
+    }
+
+    protected void prepareInsertOption(final InsertOption<JobLogCB> option) {
+        if (option == null) {
+            return;
+        }
+        assertInsertOptionStatus(option);
+    }
+
+    @Override
+    protected void doCreate(final Entity entity,
+            final InsertOption<? extends ConditionBean> option) {
+        if (option == null) {
+            insert(downcast(entity));
+        } else {
+            varyingInsert(downcast(entity), downcast(option));
+        }
+    }
+
+    /**
+     * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl)
+     * <pre>
+     * JobLog jobLog = new JobLog();
+     * jobLog.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * jobLog.setFoo...(value); <span style="color: #3F7E5E">// you should set only modified columns</span>
+     * <span style="color: #3F7E5E">// you don't need to set values of common columns</span>
+     * <span style="color: #3F7E5E">//jobLog.setRegisterUser(value);</span>
+     * <span style="color: #3F7E5E">//jobLog.set...;</span>
+     * <span style="color: #3F7E5E">// if exclusive control, the value of exclusive control column is required</span>
+     * jobLog.<span style="color: #FD4747">setVersionNo</span>(value);
+     * try {
+     *     jobLogBhv.<span style="color: #FD4747">update</span>(jobLog);
+     * } catch (EntityAlreadyUpdatedException e) { <span style="color: #3F7E5E">// if concurrent update</span>
+     *     ...
+     * } 
+     * </pre>
+     * @param jobLog The entity of update target. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnRequired)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void update(final JobLog jobLog) {
+        doUpdate(jobLog, null);
+    }
+
+    protected void doUpdate(final JobLog jobLog,
+            final UpdateOption<JobLogCB> option) {
+        assertObjectNotNull("jobLog", jobLog);
+        prepareUpdateOption(option);
+        helpUpdateInternally(jobLog, new InternalUpdateCallback<JobLog>() {
+            @Override
+            public int callbackDelegateUpdate(final JobLog entity) {
+                return delegateUpdate(entity, option);
+            }
+        });
+    }
+
+    protected void prepareUpdateOption(final UpdateOption<JobLogCB> option) {
+        if (option == null) {
+            return;
+        }
+        assertUpdateOptionStatus(option);
+        if (option.hasSelfSpecification()) {
+            option.resolveSelfSpecification(createCBForVaryingUpdate());
+        }
+        if (option.hasSpecifiedUpdateColumn()) {
+            option.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
+        }
+    }
+
+    protected JobLogCB createCBForVaryingUpdate() {
+        final JobLogCB cb = newMyConditionBean();
+        cb.xsetupForVaryingUpdate();
+        return cb;
+    }
+
+    protected JobLogCB createCBForSpecifiedUpdate() {
+        final JobLogCB cb = newMyConditionBean();
+        cb.xsetupForSpecifiedUpdate();
+        return cb;
+    }
+
+    @Override
+    protected void doModify(final Entity entity,
+            final UpdateOption<? extends ConditionBean> option) {
+        if (option == null) {
+            update(downcast(entity));
+        } else {
+            varyingUpdate(downcast(entity), downcast(option));
+        }
+    }
+
+    @Override
+    protected void doModifyNonstrict(final Entity entity,
+            final UpdateOption<? extends ConditionBean> option) {
+        doModify(entity, option);
+    }
+
+    /**
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
+     * @param jobLog The entity of insert or update target. (NotNull)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void insertOrUpdate(final JobLog jobLog) {
+        doInesrtOrUpdate(jobLog, null, null);
+    }
+
+    protected void doInesrtOrUpdate(final JobLog jobLog,
+            final InsertOption<JobLogCB> insertOption,
+            final UpdateOption<JobLogCB> updateOption) {
+        helpInsertOrUpdateInternally(jobLog,
+                new InternalInsertOrUpdateCallback<JobLog, JobLogCB>() {
+                    @Override
+                    public void callbackInsert(final JobLog entity) {
+                        doInsert(entity, insertOption);
+                    }
+
+                    @Override
+                    public void callbackUpdate(final JobLog entity) {
+                        doUpdate(entity, updateOption);
+                    }
+
+                    @Override
+                    public JobLogCB callbackNewMyConditionBean() {
+                        return newMyConditionBean();
+                    }
+
+                    @Override
+                    public int callbackSelectCount(final JobLogCB cb) {
+                        return selectCount(cb);
+                    }
+                });
+    }
+
+    @Override
+    protected void doCreateOrModify(final Entity entity,
+            InsertOption<? extends ConditionBean> insertOption,
+            UpdateOption<? extends ConditionBean> updateOption) {
+        if (insertOption == null && updateOption == null) {
+            insertOrUpdate(downcast(entity));
+        } else {
+            insertOption = insertOption == null ? new InsertOption<JobLogCB>()
+                    : insertOption;
+            updateOption = updateOption == null ? new UpdateOption<JobLogCB>()
+                    : updateOption;
+            varyingInsertOrUpdate(downcast(entity), downcast(insertOption),
+                    downcast(updateOption));
+        }
+    }
+
+    @Override
+    protected void doCreateOrModifyNonstrict(final Entity entity,
+            final InsertOption<? extends ConditionBean> insertOption,
+            final UpdateOption<? extends ConditionBean> updateOption) {
+        doCreateOrModify(entity, insertOption, updateOption);
+    }
+
+    /**
+     * Delete the entity. (ZeroUpdateException, NonExclusiveControl)
+     * <pre>
+     * JobLog jobLog = new JobLog();
+     * jobLog.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * <span style="color: #3F7E5E">// if exclusive control, the value of exclusive control column is required</span>
+     * jobLog.<span style="color: #FD4747">setVersionNo</span>(value);
+     * try {
+     *     jobLogBhv.<span style="color: #FD4747">delete</span>(jobLog);
+     * } catch (EntityAlreadyUpdatedException e) { <span style="color: #3F7E5E">// if concurrent update</span>
+     *     ...
+     * } 
+     * </pre>
+     * @param jobLog The entity of delete target. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnRequired)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     */
+    public void delete(final JobLog jobLog) {
+        doDelete(jobLog, null);
+    }
+
+    protected void doDelete(final JobLog jobLog,
+            final DeleteOption<JobLogCB> option) {
+        assertObjectNotNull("jobLog", jobLog);
+        prepareDeleteOption(option);
+        helpDeleteInternally(jobLog, new InternalDeleteCallback<JobLog>() {
+            @Override
+            public int callbackDelegateDelete(final JobLog entity) {
+                return delegateDelete(entity, option);
+            }
+        });
+    }
+
+    protected void prepareDeleteOption(final DeleteOption<JobLogCB> option) {
+        if (option == null) {
+            return;
+        }
+        assertDeleteOptionStatus(option);
+    }
+
+    @Override
+    protected void doRemove(final Entity entity,
+            final DeleteOption<? extends ConditionBean> option) {
+        if (option == null) {
+            delete(downcast(entity));
+        } else {
+            varyingDelete(downcast(entity), downcast(option));
+        }
+    }
+
+    @Override
+    protected void doRemoveNonstrict(final Entity entity,
+            final DeleteOption<? extends ConditionBean> option) {
+        doRemove(entity, option);
+    }
+
+    // ===================================================================================
+    //                                                                        Batch Update
+    //                                                                        ============
+    /**
+     * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
+     * And if the table has an identity, entities after the process don't have incremented values.
+     * When you use the (normal) insert(), an entity after the process has an incremented value.
+     * @param jobLogList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
+     * @return The array of inserted count. (NotNull, EmptyAllowed)
+     */
+    public int[] batchInsert(final List<JobLog> jobLogList) {
+        return doBatchInsert(jobLogList, null);
+    }
+
+    protected int[] doBatchInsert(final List<JobLog> jobLogList,
+            final InsertOption<JobLogCB> option) {
+        assertObjectNotNull("jobLogList", jobLogList);
+        prepareInsertOption(option);
+        return delegateBatchInsert(jobLogList, option);
+    }
+
+    @Override
+    protected int[] doLumpCreate(final List<Entity> ls,
+            final InsertOption<? extends ConditionBean> option) {
+        if (option == null) {
+            return batchInsert(downcast(ls));
+        } else {
+            return varyingBatchInsert(downcast(ls), downcast(option));
+        }
+    }
+
+    /**
+     * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
+     * <pre>
+     * jobLogBhv.<span style="color: #FD4747">batchUpdate</span>(jobLogList, new SpecifyQuery<JobLogCB>() {
+     *     public void specify(JobLogCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
+     *     }
+     * });
+     * </pre>
+     * @param jobLogList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
+     * @return The array of updated count. (NotNull, EmptyAllowed)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     */
+    public int[] batchUpdate(final List<JobLog> jobLogList) {
+        return doBatchUpdate(jobLogList, null);
+    }
+
+    protected int[] doBatchUpdate(final List<JobLog> jobLogList,
+            final UpdateOption<JobLogCB> option) {
+        assertObjectNotNull("jobLogList", jobLogList);
+        prepareBatchUpdateOption(jobLogList, option);
+        return delegateBatchUpdate(jobLogList, option);
+    }
+
+    protected void prepareBatchUpdateOption(final List<JobLog> jobLogList,
+            final UpdateOption<JobLogCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(jobLogList);
+        //}
+    }
+
+    @Override
+    protected int[] doLumpModify(final List<Entity> ls,
+            final UpdateOption<? extends ConditionBean> option) {
+        if (option == null) {
+            return batchUpdate(downcast(ls));
+        } else {
+            return varyingBatchUpdate(downcast(ls), downcast(option));
+        }
+    }
+
+    /**
+     * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * jobLogBhv.<span style="color: #FD4747">batchUpdate</span>(jobLogList, new SpecifyQuery<JobLogCB>() {
+     *     public void specify(JobLogCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * jobLogBhv.<span style="color: #FD4747">batchUpdate</span>(jobLogList, new SpecifyQuery<JobLogCB>() {
+     *     public void specify(JobLogCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
+     *     }
+     * });
+     * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
+     * @param jobLogList 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 org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     */
+    public int[] batchUpdate(final List<JobLog> jobLogList,
+            final SpecifyQuery<JobLogCB> updateColumnSpec) {
+        return doBatchUpdate(jobLogList,
+                createSpecifiedUpdateOption(updateColumnSpec));
+    }
+
+    @Override
+    protected int[] doLumpModifyNonstrict(final List<Entity> ls,
+            final UpdateOption<? extends ConditionBean> option) {
+        return doLumpModify(ls, option);
+    }
+
+    /**
+     * Batch-delete the entity list. (NonExclusiveControl) <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * @param jobLogList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
+     * @return The array of deleted count. (NotNull, EmptyAllowed)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     */
+    public int[] batchDelete(final List<JobLog> jobLogList) {
+        return doBatchDelete(jobLogList, null);
+    }
+
+    protected int[] doBatchDelete(final List<JobLog> jobLogList,
+            final DeleteOption<JobLogCB> option) {
+        assertObjectNotNull("jobLogList", jobLogList);
+        prepareDeleteOption(option);
+        return delegateBatchDelete(jobLogList, option);
+    }
+
+    @Override
+    protected int[] doLumpRemove(final List<Entity> ls,
+            final DeleteOption<? extends ConditionBean> option) {
+        if (option == null) {
+            return batchDelete(downcast(ls));
+        } else {
+            return varyingBatchDelete(downcast(ls), downcast(option));
+        }
+    }
+
+    @Override
+    protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
+            final DeleteOption<? extends ConditionBean> option) {
+        return doLumpRemove(ls, option);
+    }
+
+    // ===================================================================================
+    //                                                                        Query Update
+    //                                                                        ============
+    /**
+     * Insert the several entities by query (modified-only for fixed value).
+     * <pre>
+     * jobLogBhv.<span style="color: #FD4747">queryInsert</span>(new QueryInsertSetupper&lt;JobLog, JobLogCB&gt;() {
+     *     public ConditionBean setup(jobLog entity, JobLogCB intoCB) {
+     *         FooCB cb = FooCB();
+     *         cb.setupSelect_Bar();
+     * 
+     *         <span style="color: #3F7E5E">// mapping</span>
+     *         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"); <span style="color: #3F7E5E">// fixed value</span>
+     *         <span style="color: #3F7E5E">// you don't need to set values of common columns</span>
+     *         <span style="color: #3F7E5E">//entity.setRegisterUser(value);</span>
+     *         <span style="color: #3F7E5E">//entity.set...;</span>
+     *         <span style="color: #3F7E5E">// you don't need to set a value of exclusive control column</span>
+     *         <span style="color: #3F7E5E">//entity.setVersionNo(value);</span>
+     * 
+     *         return cb;
+     *     }
+     * });
+     * </pre>
+     * @param setupper The setup-per of query-insert. (NotNull)
+     * @return The inserted count.
+     */
+    public int queryInsert(final QueryInsertSetupper<JobLog, JobLogCB> setupper) {
+        return doQueryInsert(setupper, null);
+    }
+
+    protected int doQueryInsert(
+            final QueryInsertSetupper<JobLog, JobLogCB> setupper,
+            final InsertOption<JobLogCB> option) {
+        assertObjectNotNull("setupper", setupper);
+        prepareInsertOption(option);
+        final JobLog entity = new JobLog();
+        final JobLogCB intoCB = createCBForQueryInsert();
+        final ConditionBean resourceCB = setupper.setup(entity, intoCB);
+        return delegateQueryInsert(entity, intoCB, resourceCB, option);
+    }
+
+    protected JobLogCB createCBForQueryInsert() {
+        final JobLogCB cb = newMyConditionBean();
+        cb.xsetupForQueryInsert();
+        return cb;
+    }
+
+    @Override
+    protected int doRangeCreate(
+            final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
+            final InsertOption<? extends ConditionBean> option) {
+        if (option == null) {
+            return queryInsert(downcast(setupper));
+        } else {
+            return varyingQueryInsert(downcast(setupper), downcast(option));
+        }
+    }
+
+    /**
+     * Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
+     * <pre>
+     * JobLog jobLog = new JobLog();
+     * <span style="color: #3F7E5E">// you don't need to set PK value</span>
+     * <span style="color: #3F7E5E">//jobLog.setPK...(value);</span>
+     * jobLog.setFoo...(value); <span style="color: #3F7E5E">// you should set only modified columns</span>
+     * <span style="color: #3F7E5E">// you don't need to set values of common columns</span>
+     * <span style="color: #3F7E5E">//jobLog.setRegisterUser(value);</span>
+     * <span style="color: #3F7E5E">//jobLog.set...;</span>
+     * <span style="color: #3F7E5E">// you don't need to set a value of exclusive control column</span>
+     * <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span>
+     * <span style="color: #3F7E5E">//jobLog.setVersionNo(value);</span>
+     * JobLogCB cb = new JobLogCB();
+     * cb.query().setFoo...(value);
+     * jobLogBhv.<span style="color: #FD4747">queryUpdate</span>(jobLog, cb);
+     * </pre>
+     * @param jobLog The entity that contains update values. (NotNull, PrimaryKeyNullAllowed)
+     * @param cb The condition-bean of JobLog. (NotNull)
+     * @return The updated count.
+     * @exception org.seasar.dbflute.exception.NonQueryUpdateNotAllowedException When the query has no condition.
+     */
+    public int queryUpdate(final JobLog jobLog, final JobLogCB cb) {
+        return doQueryUpdate(jobLog, cb, null);
+    }
+
+    protected int doQueryUpdate(final JobLog jobLog, final JobLogCB cb,
+            final UpdateOption<JobLogCB> option) {
+        assertObjectNotNull("jobLog", jobLog);
+        assertCBStateValid(cb);
+        prepareUpdateOption(option);
+        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(
+                jobLog, cb, option) : 0;
+    }
+
+    @Override
+    protected int doRangeModify(final Entity entity, final ConditionBean cb,
+            final UpdateOption<? extends ConditionBean> option) {
+        if (option == null) {
+            return queryUpdate(downcast(entity), (JobLogCB) cb);
+        } else {
+            return varyingQueryUpdate(downcast(entity), (JobLogCB) cb,
+                    downcast(option));
+        }
+    }
+
+    /**
+     * Delete the several entities by query. (NonExclusiveControl)
+     * <pre>
+     * JobLogCB cb = new JobLogCB();
+     * cb.query().setFoo...(value);
+     * jobLogBhv.<span style="color: #FD4747">queryDelete</span>(jobLog, cb);
+     * </pre>
+     * @param cb The condition-bean of JobLog. (NotNull)
+     * @return The deleted count.
+     * @exception org.seasar.dbflute.exception.NonQueryDeleteNotAllowedException When the query has no condition.
+     */
+    public int queryDelete(final JobLogCB cb) {
+        return doQueryDelete(cb, null);
+    }
+
+    protected int doQueryDelete(final JobLogCB cb,
+            final DeleteOption<JobLogCB> option) {
+        assertCBStateValid(cb);
+        prepareDeleteOption(option);
+        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
+                option) : 0;
+    }
+
+    @Override
+    protected int doRangeRemove(final ConditionBean cb,
+            final DeleteOption<? extends ConditionBean> option) {
+        if (option == null) {
+            return queryDelete((JobLogCB) cb);
+        } else {
+            return varyingQueryDelete((JobLogCB) cb, downcast(option));
+        }
+    }
+
+    // ===================================================================================
+    //                                                                      Varying Update
+    //                                                                      ==============
+    // -----------------------------------------------------
+    //                                         Entity Update
+    //                                         -------------
+    /**
+     * Insert the entity with varying requests. <br />
+     * For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
+     * Other specifications are same as insert(entity).
+     * <pre>
+     * JobLog jobLog = new JobLog();
+     * <span style="color: #3F7E5E">// if auto-increment, you don't need to set the PK value</span>
+     * jobLog.setFoo...(value);
+     * jobLog.setBar...(value);
+     * InsertOption<JobLogCB> option = new InsertOption<JobLogCB>();
+     * <span style="color: #3F7E5E">// you can insert by your values for common columns</span>
+     * option.disableCommonColumnAutoSetup();
+     * jobLogBhv.<span style="color: #FD4747">varyingInsert</span>(jobLog, option);
+     * ... = jobLog.getPK...(); <span style="color: #3F7E5E">// if auto-increment, you can get the value after</span>
+     * </pre>
+     * @param jobLog The entity of insert target. (NotNull, PrimaryKeyNullAllowed: when auto-increment)
+     * @param option The option of insert for varying requests. (NotNull)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void varyingInsert(final JobLog jobLog,
+            final InsertOption<JobLogCB> option) {
+        assertInsertOptionNotNull(option);
+        doInsert(jobLog, option);
+    }
+
+    /**
+     * Update the entity with varying requests modified-only. (ZeroUpdateException, NonExclusiveControl) <br />
+     * For example, self(selfCalculationSpecification), specify(updateColumnSpecification), disableCommonColumnAutoSetup(). <br />
+     * Other specifications are same as update(entity).
+     * <pre>
+     * JobLog jobLog = new JobLog();
+     * jobLog.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * jobLog.setOther...(value); <span style="color: #3F7E5E">// you should set only modified columns</span>
+     * <span style="color: #3F7E5E">// if exclusive control, the value of exclusive control column is required</span>
+     * jobLog.<span style="color: #FD4747">setVersionNo</span>(value);
+     * try {
+     *     <span style="color: #3F7E5E">// you can update by self calculation values</span>
+     *     UpdateOption&lt;JobLogCB&gt; option = new UpdateOption&lt;JobLogCB&gt;();
+     *     option.self(new SpecifyQuery&lt;JobLogCB&gt;() {
+     *         public void specify(JobLogCB cb) {
+     *             cb.specify().<span style="color: #FD4747">columnXxxCount()</span>;
+     *         }
+     *     }).plus(1); <span style="color: #3F7E5E">// XXX_COUNT = XXX_COUNT + 1</span>
+     *     jobLogBhv.<span style="color: #FD4747">varyingUpdate</span>(jobLog, option);
+     * } catch (EntityAlreadyUpdatedException e) { <span style="color: #3F7E5E">// if concurrent update</span>
+     *     ...
+     * }
+     * </pre>
+     * @param jobLog The entity of update target. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnRequired)
+     * @param option The option of update for varying requests. (NotNull)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void varyingUpdate(final JobLog jobLog,
+            final UpdateOption<JobLogCB> option) {
+        assertUpdateOptionNotNull(option);
+        doUpdate(jobLog, option);
+    }
+
+    /**
+     * Insert or update the entity with varying requests. (ExclusiveControl: when update) <br />
+     * Other specifications are same as insertOrUpdate(entity).
+     * @param jobLog The entity of insert or update target. (NotNull)
+     * @param insertOption The option of insert for varying requests. (NotNull)
+     * @param updateOption The option of update for varying requests. (NotNull)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void varyingInsertOrUpdate(final JobLog jobLog,
+            final InsertOption<JobLogCB> insertOption,
+            final UpdateOption<JobLogCB> updateOption) {
+        assertInsertOptionNotNull(insertOption);
+        assertUpdateOptionNotNull(updateOption);
+        doInesrtOrUpdate(jobLog, insertOption, updateOption);
+    }
+
+    /**
+     * Delete the entity with varying requests. (ZeroUpdateException, NonExclusiveControl) <br />
+     * Now a valid option does not exist. <br />
+     * Other specifications are same as delete(entity).
+     * @param jobLog The entity of delete target. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnRequired)
+     * @param option The option of update for varying requests. (NotNull)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     */
+    public void varyingDelete(final JobLog jobLog,
+            final DeleteOption<JobLogCB> option) {
+        assertDeleteOptionNotNull(option);
+        doDelete(jobLog, option);
+    }
+
+    // -----------------------------------------------------
+    //                                          Batch Update
+    //                                          ------------
+    /**
+     * Batch-insert the list with varying requests. <br />
+     * For example, disableCommonColumnAutoSetup()
+     * , disablePrimaryKeyIdentity(), limitBatchInsertLogging(). <br />
+     * Other specifications are same as batchInsert(entityList).
+     * @param jobLogList 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<JobLog> jobLogList,
+            final InsertOption<JobLogCB> option) {
+        assertInsertOptionNotNull(option);
+        return doBatchInsert(jobLogList, option);
+    }
+
+    /**
+     * Batch-update the list with varying requests. <br />
+     * For example, self(selfCalculationSpecification), specify(updateColumnSpecification)
+     * , disableCommonColumnAutoSetup(), limitBatchUpdateLogging(). <br />
+     * Other specifications are same as batchUpdate(entityList).
+     * @param jobLogList 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<JobLog> jobLogList,
+            final UpdateOption<JobLogCB> option) {
+        assertUpdateOptionNotNull(option);
+        return doBatchUpdate(jobLogList, option);
+    }
+
+    /**
+     * Batch-delete the list with varying requests. <br />
+     * For example, limitBatchDeleteLogging(). <br />
+     * Other specifications are same as batchDelete(entityList).
+     * @param jobLogList 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<JobLog> jobLogList,
+            final DeleteOption<JobLogCB> option) {
+        assertDeleteOptionNotNull(option);
+        return doBatchDelete(jobLogList, option);
+    }
+
+    // -----------------------------------------------------
+    //                                          Query Update
+    //                                          ------------
+    /**
+     * Insert the several entities by query with varying requests (modified-only for fixed value). <br />
+     * For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
+     * Other specifications are same as queryInsert(entity, setupper). 
+     * @param setupper The setup-per of query-insert. (NotNull)
+     * @param option The option of insert for varying requests. (NotNull)
+     * @return The inserted count.
+     */
+    public int varyingQueryInsert(
+            final QueryInsertSetupper<JobLog, JobLogCB> setupper,
+            final InsertOption<JobLogCB> option) {
+        assertInsertOptionNotNull(option);
+        return doQueryInsert(setupper, option);
+    }
+
+    /**
+     * Update the several entities by query with varying requests non-strictly modified-only. {NonExclusiveControl} <br />
+     * For example, self(selfCalculationSpecification), specify(updateColumnSpecification)
+     * , disableCommonColumnAutoSetup(), allowNonQueryUpdate(). <br />
+     * Other specifications are same as queryUpdate(entity, cb). 
+     * <pre>
+     * <span style="color: #3F7E5E">// ex) you can update by self calculation values</span>
+     * JobLog jobLog = new JobLog();
+     * <span style="color: #3F7E5E">// you don't need to set PK value</span>
+     * <span style="color: #3F7E5E">//jobLog.setPK...(value);</span>
+     * jobLog.setOther...(value); <span style="color: #3F7E5E">// you should set only modified columns</span>
+     * <span style="color: #3F7E5E">// you don't need to set a value of exclusive control column</span>
+     * <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span>
+     * <span style="color: #3F7E5E">//jobLog.setVersionNo(value);</span>
+     * JobLogCB cb = new JobLogCB();
+     * cb.query().setFoo...(value);
+     * UpdateOption&lt;JobLogCB&gt; option = new UpdateOption&lt;JobLogCB&gt;();
+     * option.self(new SpecifyQuery&lt;JobLogCB&gt;() {
+     *     public void specify(JobLogCB cb) {
+     *         cb.specify().<span style="color: #FD4747">columnFooCount()</span>;
+     *     }
+     * }).plus(1); <span style="color: #3F7E5E">// FOO_COUNT = FOO_COUNT + 1</span>
+     * jobLogBhv.<span style="color: #FD4747">varyingQueryUpdate</span>(jobLog, cb, option);
+     * </pre>
+     * @param jobLog The entity that contains update values. (NotNull) {PrimaryKeyNotRequired}
+     * @param cb The condition-bean of JobLog. (NotNull)
+     * @param option The option of update for varying requests. (NotNull)
+     * @return The updated count.
+     * @exception org.seasar.dbflute.exception.NonQueryUpdateNotAllowedException When the query has no condition (if not allowed).
+     */
+    public int varyingQueryUpdate(final JobLog jobLog, final JobLogCB cb,
+            final UpdateOption<JobLogCB> option) {
+        assertUpdateOptionNotNull(option);
+        return doQueryUpdate(jobLog, cb, option);
+    }
+
+    /**
+     * Delete the several entities by query with varying requests non-strictly. <br />
+     * For example, allowNonQueryDelete(). <br />
+     * Other specifications are same as batchUpdateNonstrict(entityList).
+     * @param cb The condition-bean of JobLog. (NotNull)
+     * @param option The option of delete for varying requests. (NotNull)
+     * @return The deleted count.
+     * @exception org.seasar.dbflute.exception.NonQueryDeleteNotAllowedException When the query has no condition (if not allowed).
+     */
+    public int varyingQueryDelete(final JobLogCB cb,
+            final DeleteOption<JobLogCB> option) {
+        assertDeleteOptionNotNull(option);
+        return doQueryDelete(cb, option);
+    }
+
+    // ===================================================================================
+    //                                                                          OutsideSql
+    //                                                                          ==========
+    /**
+     * Prepare the basic executor of outside-SQL to execute it. <br />
+     * The invoker of behavior command should be not null when you call this method.
+     * <pre>
+     * 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()
+     * </pre>
+     * @return The basic executor of outside-SQL. (NotNull) 
+     */
+    public OutsideSqlBasicExecutor<JobLogBhv> outsideSql() {
+        return doOutsideSql();
+    }
+
+    // ===================================================================================
+    //                                                                     Delegate Method
+    //                                                                     ===============
+    // [Behavior Command]
+    // -----------------------------------------------------
+    //                                                Select
+    //                                                ------
+    protected int delegateSelectCountUniquely(final JobLogCB cb) {
+        return invoke(createSelectCountCBCommand(cb, true));
+    }
+
+    protected int delegateSelectCountPlainly(final JobLogCB cb) {
+        return invoke(createSelectCountCBCommand(cb, false));
+    }
+
+    protected <ENTITY extends JobLog> void delegateSelectCursor(
+            final JobLogCB cb, final EntityRowHandler<ENTITY> erh,
+            final Class<ENTITY> et) {
+        invoke(createSelectCursorCBCommand(cb, erh, et));
+    }
+
+    protected <ENTITY extends JobLog> List<ENTITY> delegateSelectList(
+            final JobLogCB cb, final Class<ENTITY> et) {
+        return invoke(createSelectListCBCommand(cb, et));
+    }
+
+    // -----------------------------------------------------
+    //                                                Update
+    //                                                ------
+    protected int delegateInsert(final JobLog e, final InsertOption<JobLogCB> op) {
+        if (!processBeforeInsert(e, op)) {
+            return 0;
+        }
+        return invoke(createInsertEntityCommand(e, op));
+    }
+
+    protected int delegateUpdate(final JobLog e, final UpdateOption<JobLogCB> op) {
+        if (!processBeforeUpdate(e, op)) {
+            return 0;
+        }
+        return delegateUpdateNonstrict(e, op);
+    }
+
+    protected int delegateUpdateNonstrict(final JobLog e,
+            final UpdateOption<JobLogCB> op) {
+        if (!processBeforeUpdate(e, op)) {
+            return 0;
+        }
+        return invoke(createUpdateNonstrictEntityCommand(e, op));
+    }
+
+    protected int delegateDelete(final JobLog e, final DeleteOption<JobLogCB> op) {
+        if (!processBeforeDelete(e, op)) {
+            return 0;
+        }
+        return delegateDeleteNonstrict(e, op);
+    }
+
+    protected int delegateDeleteNonstrict(final JobLog e,
+            final DeleteOption<JobLogCB> op) {
+        if (!processBeforeDelete(e, op)) {
+            return 0;
+        }
+        return invoke(createDeleteNonstrictEntityCommand(e, op));
+    }
+
+    protected int[] delegateBatchInsert(final List<JobLog> ls,
+            final InsertOption<JobLogCB> op) {
+        if (ls.isEmpty()) {
+            return new int[] {};
+        }
+        return invoke(createBatchInsertCommand(processBatchInternally(ls, op),
+                op));
+    }
+
+    protected int[] delegateBatchUpdate(final List<JobLog> ls,
+            final UpdateOption<JobLogCB> op) {
+        if (ls.isEmpty()) {
+            return new int[] {};
+        }
+        return delegateBatchUpdateNonstrict(ls, op);
+    }
+
+    protected int[] delegateBatchUpdateNonstrict(final List<JobLog> ls,
+            final UpdateOption<JobLogCB> op) {
+        if (ls.isEmpty()) {
+            return new int[] {};
+        }
+        return invoke(createBatchUpdateNonstrictCommand(
+                processBatchInternally(ls, op, true), op));
+    }
+
+    protected int[] delegateBatchDelete(final List<JobLog> ls,
+            final DeleteOption<JobLogCB> op) {
+        if (ls.isEmpty()) {
+            return new int[] {};
+        }
+        return delegateBatchDeleteNonstrict(ls, op);
+    }
+
+    protected int[] delegateBatchDeleteNonstrict(final List<JobLog> ls,
+            final DeleteOption<JobLogCB> op) {
+        if (ls.isEmpty()) {
+            return new int[] {};
+        }
+        return invoke(createBatchDeleteNonstrictCommand(
+                processBatchInternally(ls, op, true), op));
+    }
+
+    protected int delegateQueryInsert(final JobLog e, final JobLogCB inCB,
+            final ConditionBean resCB, final InsertOption<JobLogCB> op) {
+        if (!processBeforeQueryInsert(e, inCB, resCB, op)) {
+            return 0;
+        }
+        return invoke(createQueryInsertCBCommand(e, inCB, resCB, op));
+    }
+
+    protected int delegateQueryUpdate(final JobLog e, final JobLogCB cb,
+            final UpdateOption<JobLogCB> op) {
+        if (!processBeforeQueryUpdate(e, cb, op)) {
+            return 0;
+        }
+        return invoke(createQueryUpdateCBCommand(e, cb, op));
+    }
+
+    protected int delegateQueryDelete(final JobLogCB cb,
+            final DeleteOption<JobLogCB> op) {
+        if (!processBeforeQueryDelete(cb, op)) {
+            return 0;
+        }
+        return invoke(createQueryDeleteCBCommand(cb, op));
+    }
+
+    // ===================================================================================
+    //                                                                Optimistic Lock Info
+    //                                                                ====================
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected boolean hasVersionNoValue(final Entity entity) {
+        return false;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected boolean hasUpdateDateValue(final Entity entity) {
+        return false;
+    }
+
+    // ===================================================================================
+    //                                                                     Downcast Helper
+    //                                                                     ===============
+    protected JobLog downcast(final Entity entity) {
+        return helpEntityDowncastInternally(entity, JobLog.class);
+    }
+
+    protected JobLogCB downcast(final ConditionBean cb) {
+        return helpConditionBeanDowncastInternally(cb, JobLogCB.class);
+    }
+
+    @SuppressWarnings("unchecked")
+    protected List<JobLog> downcast(final List<? extends Entity> entityList) {
+        return (List<JobLog>) entityList;
+    }
+
+    @SuppressWarnings("unchecked")
+    protected InsertOption<JobLogCB> downcast(
+            final InsertOption<? extends ConditionBean> option) {
+        return (InsertOption<JobLogCB>) option;
+    }
+
+    @SuppressWarnings("unchecked")
+    protected UpdateOption<JobLogCB> downcast(
+            final UpdateOption<? extends ConditionBean> option) {
+        return (UpdateOption<JobLogCB>) option;
+    }
+
+    @SuppressWarnings("unchecked")
+    protected DeleteOption<JobLogCB> downcast(
+            final DeleteOption<? extends ConditionBean> option) {
+        return (DeleteOption<JobLogCB>) option;
+    }
+
+    @SuppressWarnings("unchecked")
+    protected QueryInsertSetupper<JobLog, JobLogCB> downcast(
+            final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> option) {
+        return (QueryInsertSetupper<JobLog, JobLogCB>) option;
+    }
+}

+ 65 - 29
src/main/java/jp/sf/fess/db/bsbhv/BsLabelTypeBhv.java

@@ -1209,7 +1209,9 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param labelType The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -1263,7 +1265,9 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() }
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param labelType The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -1436,8 +1440,8 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param labelTypeList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -1467,13 +1471,14 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, ExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * labelTypeBhv.<span style="color: #FD4747">batchUpdate</span>(labelTypeList, new SpecifyQuery<LabelTypeCB>() {
-     *     public void specify(LabelTypeCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(LabelTypeCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1488,10 +1493,23 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
     protected int[] doBatchUpdate(final List<LabelType> labelTypeList,
             final UpdateOption<LabelTypeCB> option) {
         assertObjectNotNull("labelTypeList", labelTypeList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(labelTypeList, option);
         return delegateBatchUpdate(labelTypeList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<LabelType> labelTypeList,
+            final UpdateOption<LabelTypeCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(labelTypeList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -1504,18 +1522,27 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, ExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * labelTypeBhv.<span style="color: #FD4747">batchUpdate</span>(labelTypeList, new SpecifyQuery<LabelTypeCB>() {
+     *     public void specify(LabelTypeCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * labelTypeBhv.<span style="color: #FD4747">batchUpdate</span>(labelTypeList, new SpecifyQuery<LabelTypeCB>() {
-     *     public void specify(LabelTypeCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(LabelTypeCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param labelTypeList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)
@@ -1531,12 +1558,13 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
      * Batch-update the entity list non-strictly. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
      * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span>
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * So you should the other batchUpdateNonstrict() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * labelTypeBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(labelTypeList, new SpecifyQuery<LabelTypeCB>() {
-     *     public void specify(LabelTypeCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(LabelTypeCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1551,24 +1579,32 @@ public abstract class BsLabelTypeBhv extends AbstractBehaviorWritable {
     protected int[] doBatchUpdateNonstrict(final List<LabelType> labelTypeList,
             final UpdateOption<LabelTypeCB> option) {
         assertObjectNotNull("labelTypeList", labelTypeList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(labelTypeList, option);
         return delegateBatchUpdateNonstrict(labelTypeList, option);
     }
 
     /**
      * Batch-update the entity list non-strictly. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * labelTypeBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(labelTypeList, new SpecifyQuery<LabelTypeCB>() {
+     *     public void specify(LabelTypeCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * labelTypeBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(labelTypeList, new SpecifyQuery<LabelTypeCB>() {
-     *     public void specify(LabelTypeCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(LabelTypeCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>And you should specify columns that are modified in any entities (at least one entity).</p>
      * @param labelTypeList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 41 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsLabelTypeToRoleTypeMappingBhv.java

@@ -710,7 +710,9 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param labelTypeToRoleTypeMapping The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -843,8 +845,8 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param labelTypeToRoleTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -877,13 +879,14 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * labelTypeToRoleTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(labelTypeToRoleTypeMappingList, new SpecifyQuery<LabelTypeToRoleTypeMappingCB>() {
-     *     public void specify(LabelTypeToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(LabelTypeToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -901,10 +904,23 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
             final UpdateOption<LabelTypeToRoleTypeMappingCB> option) {
         assertObjectNotNull("labelTypeToRoleTypeMappingList",
                 labelTypeToRoleTypeMappingList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(labelTypeToRoleTypeMappingList, option);
         return delegateBatchUpdate(labelTypeToRoleTypeMappingList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<LabelTypeToRoleTypeMapping> labelTypeToRoleTypeMappingList,
+            final UpdateOption<LabelTypeToRoleTypeMappingCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(labelTypeToRoleTypeMappingList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -917,18 +933,27 @@ public abstract class BsLabelTypeToRoleTypeMappingBhv extends
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * labelTypeToRoleTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(labelTypeToRoleTypeMappingList, new SpecifyQuery<LabelTypeToRoleTypeMappingCB>() {
-     *     public void specify(LabelTypeToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(LabelTypeToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * labelTypeToRoleTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(labelTypeToRoleTypeMappingList, new SpecifyQuery<LabelTypeToRoleTypeMappingCB>() {
+     *     public void specify(LabelTypeToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param labelTypeToRoleTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 65 - 29
src/main/java/jp/sf/fess/db/bsbhv/BsOverlappingHostBhv.java

@@ -667,7 +667,9 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param overlappingHost The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -722,7 +724,9 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() }
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param overlappingHost The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -902,8 +906,8 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param overlappingHostList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -934,13 +938,14 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, ExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * overlappingHostBhv.<span style="color: #FD4747">batchUpdate</span>(overlappingHostList, new SpecifyQuery<OverlappingHostCB>() {
-     *     public void specify(OverlappingHostCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(OverlappingHostCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -956,10 +961,23 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
             final List<OverlappingHost> overlappingHostList,
             final UpdateOption<OverlappingHostCB> option) {
         assertObjectNotNull("overlappingHostList", overlappingHostList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(overlappingHostList, option);
         return delegateBatchUpdate(overlappingHostList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<OverlappingHost> overlappingHostList,
+            final UpdateOption<OverlappingHostCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(overlappingHostList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -972,18 +990,27 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, ExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * overlappingHostBhv.<span style="color: #FD4747">batchUpdate</span>(overlappingHostList, new SpecifyQuery<OverlappingHostCB>() {
+     *     public void specify(OverlappingHostCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * overlappingHostBhv.<span style="color: #FD4747">batchUpdate</span>(overlappingHostList, new SpecifyQuery<OverlappingHostCB>() {
-     *     public void specify(OverlappingHostCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(OverlappingHostCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param overlappingHostList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)
@@ -999,12 +1026,13 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
      * Batch-update the entity list non-strictly. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
      * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span>
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * So you should the other batchUpdateNonstrict() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * overlappingHostBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(overlappingHostList, new SpecifyQuery<OverlappingHostCB>() {
-     *     public void specify(OverlappingHostCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(OverlappingHostCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1021,24 +1049,32 @@ public abstract class BsOverlappingHostBhv extends AbstractBehaviorWritable {
             final List<OverlappingHost> overlappingHostList,
             final UpdateOption<OverlappingHostCB> option) {
         assertObjectNotNull("overlappingHostList", overlappingHostList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(overlappingHostList, option);
         return delegateBatchUpdateNonstrict(overlappingHostList, option);
     }
 
     /**
      * Batch-update the entity list non-strictly. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * overlappingHostBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(overlappingHostList, new SpecifyQuery<OverlappingHostCB>() {
+     *     public void specify(OverlappingHostCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * overlappingHostBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(overlappingHostList, new SpecifyQuery<OverlappingHostCB>() {
-     *     public void specify(OverlappingHostCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(OverlappingHostCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>And you should specify columns that are modified in any entities (at least one entity).</p>
      * @param overlappingHostList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 65 - 29
src/main/java/jp/sf/fess/db/bsbhv/BsPathMappingBhv.java

@@ -659,7 +659,9 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param pathMapping The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -714,7 +716,9 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() }
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param pathMapping The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -889,8 +893,8 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param pathMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -920,13 +924,14 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, ExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * pathMappingBhv.<span style="color: #FD4747">batchUpdate</span>(pathMappingList, new SpecifyQuery<PathMappingCB>() {
-     *     public void specify(PathMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(PathMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -941,10 +946,23 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
     protected int[] doBatchUpdate(final List<PathMapping> pathMappingList,
             final UpdateOption<PathMappingCB> option) {
         assertObjectNotNull("pathMappingList", pathMappingList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(pathMappingList, option);
         return delegateBatchUpdate(pathMappingList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<PathMapping> pathMappingList,
+            final UpdateOption<PathMappingCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(pathMappingList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -957,18 +975,27 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, ExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * pathMappingBhv.<span style="color: #FD4747">batchUpdate</span>(pathMappingList, new SpecifyQuery<PathMappingCB>() {
+     *     public void specify(PathMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * pathMappingBhv.<span style="color: #FD4747">batchUpdate</span>(pathMappingList, new SpecifyQuery<PathMappingCB>() {
-     *     public void specify(PathMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(PathMappingCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param pathMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)
@@ -984,12 +1011,13 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
      * Batch-update the entity list non-strictly. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
      * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span>
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * So you should the other batchUpdateNonstrict() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * pathMappingBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(pathMappingList, new SpecifyQuery<PathMappingCB>() {
-     *     public void specify(PathMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(PathMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1005,24 +1033,32 @@ public abstract class BsPathMappingBhv extends AbstractBehaviorWritable {
             final List<PathMapping> pathMappingList,
             final UpdateOption<PathMappingCB> option) {
         assertObjectNotNull("pathMappingList", pathMappingList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(pathMappingList, option);
         return delegateBatchUpdateNonstrict(pathMappingList, option);
     }
 
     /**
      * Batch-update the entity list non-strictly. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * pathMappingBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(pathMappingList, new SpecifyQuery<PathMappingCB>() {
+     *     public void specify(PathMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * pathMappingBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(pathMappingList, new SpecifyQuery<PathMappingCB>() {
-     *     public void specify(PathMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(PathMappingCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>And you should specify columns that are modified in any entities (at least one entity).</p>
      * @param pathMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 65 - 29
src/main/java/jp/sf/fess/db/bsbhv/BsRequestHeaderBhv.java

@@ -689,7 +689,9 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param requestHeader The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -744,7 +746,9 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() }
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param requestHeader The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -921,8 +925,8 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param requestHeaderList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -952,13 +956,14 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, ExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * requestHeaderBhv.<span style="color: #FD4747">batchUpdate</span>(requestHeaderList, new SpecifyQuery<RequestHeaderCB>() {
-     *     public void specify(RequestHeaderCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(RequestHeaderCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -973,10 +978,23 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
     protected int[] doBatchUpdate(final List<RequestHeader> requestHeaderList,
             final UpdateOption<RequestHeaderCB> option) {
         assertObjectNotNull("requestHeaderList", requestHeaderList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(requestHeaderList, option);
         return delegateBatchUpdate(requestHeaderList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<RequestHeader> requestHeaderList,
+            final UpdateOption<RequestHeaderCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(requestHeaderList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -989,18 +1007,27 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, ExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * requestHeaderBhv.<span style="color: #FD4747">batchUpdate</span>(requestHeaderList, new SpecifyQuery<RequestHeaderCB>() {
+     *     public void specify(RequestHeaderCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * requestHeaderBhv.<span style="color: #FD4747">batchUpdate</span>(requestHeaderList, new SpecifyQuery<RequestHeaderCB>() {
-     *     public void specify(RequestHeaderCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(RequestHeaderCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param requestHeaderList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)
@@ -1016,12 +1043,13 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
      * Batch-update the entity list non-strictly. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
      * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span>
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * So you should the other batchUpdateNonstrict() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * requestHeaderBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(requestHeaderList, new SpecifyQuery<RequestHeaderCB>() {
-     *     public void specify(RequestHeaderCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(RequestHeaderCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1038,24 +1066,32 @@ public abstract class BsRequestHeaderBhv extends AbstractBehaviorWritable {
             final List<RequestHeader> requestHeaderList,
             final UpdateOption<RequestHeaderCB> option) {
         assertObjectNotNull("requestHeaderList", requestHeaderList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(requestHeaderList, option);
         return delegateBatchUpdateNonstrict(requestHeaderList, option);
     }
 
     /**
      * Batch-update the entity list non-strictly. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * requestHeaderBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(requestHeaderList, new SpecifyQuery<RequestHeaderCB>() {
+     *     public void specify(RequestHeaderCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * requestHeaderBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(requestHeaderList, new SpecifyQuery<RequestHeaderCB>() {
-     *     public void specify(RequestHeaderCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(RequestHeaderCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>And you should specify columns that are modified in any entities (at least one entity).</p>
      * @param requestHeaderList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 64 - 29
src/main/java/jp/sf/fess/db/bsbhv/BsRoleTypeBhv.java

@@ -1206,7 +1206,9 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param roleType The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -1260,7 +1262,9 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() }
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param roleType The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -1432,8 +1436,8 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param roleTypeList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -1463,13 +1467,14 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, ExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * roleTypeBhv.<span style="color: #FD4747">batchUpdate</span>(roleTypeList, new SpecifyQuery<RoleTypeCB>() {
-     *     public void specify(RoleTypeCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(RoleTypeCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1484,10 +1489,22 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
     protected int[] doBatchUpdate(final List<RoleType> roleTypeList,
             final UpdateOption<RoleTypeCB> option) {
         assertObjectNotNull("roleTypeList", roleTypeList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(roleTypeList, option);
         return delegateBatchUpdate(roleTypeList, option);
     }
 
+    protected void prepareBatchUpdateOption(final List<RoleType> roleTypeList,
+            final UpdateOption<RoleTypeCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(roleTypeList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -1500,18 +1517,27 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, ExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * roleTypeBhv.<span style="color: #FD4747">batchUpdate</span>(roleTypeList, new SpecifyQuery<RoleTypeCB>() {
-     *     public void specify(RoleTypeCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(RoleTypeCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * roleTypeBhv.<span style="color: #FD4747">batchUpdate</span>(roleTypeList, new SpecifyQuery<RoleTypeCB>() {
+     *     public void specify(RoleTypeCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param roleTypeList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)
@@ -1527,12 +1553,13 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
      * Batch-update the entity list non-strictly. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
      * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span>
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * So you should the other batchUpdateNonstrict() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * roleTypeBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(roleTypeList, new SpecifyQuery<RoleTypeCB>() {
-     *     public void specify(RoleTypeCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(RoleTypeCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1547,24 +1574,32 @@ public abstract class BsRoleTypeBhv extends AbstractBehaviorWritable {
     protected int[] doBatchUpdateNonstrict(final List<RoleType> roleTypeList,
             final UpdateOption<RoleTypeCB> option) {
         assertObjectNotNull("roleTypeList", roleTypeList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(roleTypeList, option);
         return delegateBatchUpdateNonstrict(roleTypeList, option);
     }
 
     /**
      * Batch-update the entity list non-strictly. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * roleTypeBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(roleTypeList, new SpecifyQuery<RoleTypeCB>() {
+     *     public void specify(RoleTypeCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * roleTypeBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(roleTypeList, new SpecifyQuery<RoleTypeCB>() {
-     *     public void specify(RoleTypeCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(RoleTypeCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>And you should specify columns that are modified in any entities (at least one entity).</p>
      * @param roleTypeList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 1831 - 0
src/main/java/jp/sf/fess/db/bsbhv/BsScheduledJobBhv.java

@@ -0,0 +1,1831 @@
+/*
+ * Copyright 2009-2013 the Fess 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.bsentity.dbmeta.ScheduledJobDbm;
+import jp.sf.fess.db.cbean.ScheduledJobCB;
+import jp.sf.fess.db.exbhv.ScheduledJobBhv;
+import jp.sf.fess.db.exentity.ScheduledJob;
+
+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.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.dbmeta.DBMeta;
+import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
+
+/**
+ * The behavior of SCHEDULED_JOB as TABLE. <br />
+ * <pre>
+ * [primary key]
+ *     ID
+ * 
+ * [column]
+ *     ID, NAME, TARGET, CRON_EXPRESSION, SCRIPT_TYPE, SCRIPT_DATA, CRAWLER, JOB_LOGGING, SORT_ORDER, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETED_BY, DELETED_TIME, VERSION_NO
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     ID
+ * 
+ * [version-no]
+ *     VERSION_NO
+ * 
+ * [foreign table]
+ *     
+ * 
+ * [referrer table]
+ *     
+ * 
+ * [foreign property]
+ *     
+ * 
+ * [referrer property]
+ *     
+ * </pre>
+ * @author DBFlute(AutoGenerator)
+ */
+public abstract class BsScheduledJobBhv extends AbstractBehaviorWritable {
+
+    // ===================================================================================
+    //                                                                          Definition
+    //                                                                          ==========
+    /*df:beginQueryPath*/
+    /*df:endQueryPath*/
+
+    // ===================================================================================
+    //                                                                          Table name
+    //                                                                          ==========
+    /** @return The name on database of table. (NotNull) */
+    @Override
+    public String getTableDbName() {
+        return "SCHEDULED_JOB";
+    }
+
+    // ===================================================================================
+    //                                                                              DBMeta
+    //                                                                              ======
+    /** @return The instance of DBMeta. (NotNull) */
+    @Override
+    public DBMeta getDBMeta() {
+        return ScheduledJobDbm.getInstance();
+    }
+
+    /** @return The instance of DBMeta as my table type. (NotNull) */
+    public ScheduledJobDbm getMyDBMeta() {
+        return ScheduledJobDbm.getInstance();
+    }
+
+    // ===================================================================================
+    //                                                                        New Instance
+    //                                                                        ============
+    /** {@inheritDoc} */
+    @Override
+    public Entity newEntity() {
+        return newMyEntity();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public ConditionBean newConditionBean() {
+        return newMyConditionBean();
+    }
+
+    /** @return The instance of new entity as my table type. (NotNull) */
+    public ScheduledJob newMyEntity() {
+        return new ScheduledJob();
+    }
+
+    /** @return The instance of new condition-bean as my table type. (NotNull) */
+    public ScheduledJobCB newMyConditionBean() {
+        return new ScheduledJobCB();
+    }
+
+    // ===================================================================================
+    //                                                                        Count Select
+    //                                                                        ============
+    /**
+     * Select the count of uniquely-selected records by the condition-bean. {IgnorePagingCondition, IgnoreSpecifyColumn}<br />
+     * SpecifyColumn is ignored but you can use it only to remove text type column for union's distinct.
+     * <pre>
+     * ScheduledJobCB cb = new ScheduledJobCB();
+     * cb.query().setFoo...(value);
+     * int count = scheduledJobBhv.<span style="color: #FD4747">selectCount</span>(cb);
+     * </pre>
+     * @param cb The condition-bean of ScheduledJob. (NotNull)
+     * @return The count for the condition. (NotMinus)
+     */
+    public int selectCount(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 selectCount(downcast(cb));
+    }
+
+    // ===================================================================================
+    //                                                                       Entity Select
+    //                                                                       =============
+    /**
+     * Select the entity by the condition-bean.
+     * <pre>
+     * ScheduledJobCB cb = new ScheduledJobCB();
+     * cb.query().setFoo...(value);
+     * ScheduledJob scheduledJob = scheduledJobBhv.<span style="color: #FD4747">selectEntity</span>(cb);
+     * if (scheduledJob != null) {
+     *     ... = scheduledJob.get...();
+     * } else {
+     *     ...
+     * }
+     * </pre>
+     * @param cb The condition-bean of ScheduledJob. (NotNull)
+     * @return The entity selected by the condition. (NullAllowed: if no data, it returns null)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.SelectEntityConditionNotFoundException When the condition for selecting an entity is not found.
+     */
+    public ScheduledJob selectEntity(final ScheduledJobCB cb) {
+        return doSelectEntity(cb, ScheduledJob.class);
+    }
+
+    protected <ENTITY extends ScheduledJob> ENTITY doSelectEntity(
+            final ScheduledJobCB cb, final Class<ENTITY> entityType) {
+        assertCBStateValid(cb);
+        return helpSelectEntityInternally(cb, entityType,
+                new InternalSelectEntityCallback<ENTITY, ScheduledJobCB>() {
+                    @Override
+                    public List<ENTITY> callbackSelectList(
+                            final ScheduledJobCB cb,
+                            final Class<ENTITY> entityType) {
+                        return doSelectList(cb, entityType);
+                    }
+                });
+    }
+
+    @Override
+    protected Entity doReadEntity(final ConditionBean cb) {
+        return selectEntity(downcast(cb));
+    }
+
+    /**
+     * Select the entity by the condition-bean with deleted check.
+     * <pre>
+     * ScheduledJobCB cb = new ScheduledJobCB();
+     * cb.query().setFoo...(value);
+     * ScheduledJob scheduledJob = scheduledJobBhv.<span style="color: #FD4747">selectEntityWithDeletedCheck</span>(cb);
+     * ... = scheduledJob.get...(); <span style="color: #3F7E5E">// the entity always be not null</span>
+     * </pre>
+     * @param cb The condition-bean of ScheduledJob. (NotNull)
+     * @return The entity selected by the condition. (NotNull: if no data, throws exception)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.SelectEntityConditionNotFoundException When the condition for selecting an entity is not found.
+     */
+    public ScheduledJob selectEntityWithDeletedCheck(final ScheduledJobCB cb) {
+        return doSelectEntityWithDeletedCheck(cb, ScheduledJob.class);
+    }
+
+    protected <ENTITY extends ScheduledJob> ENTITY doSelectEntityWithDeletedCheck(
+            final ScheduledJobCB cb, final Class<ENTITY> entityType) {
+        assertCBStateValid(cb);
+        return helpSelectEntityWithDeletedCheckInternally(
+                cb,
+                entityType,
+                new InternalSelectEntityWithDeletedCheckCallback<ENTITY, ScheduledJobCB>() {
+                    @Override
+                    public List<ENTITY> callbackSelectList(
+                            final ScheduledJobCB cb,
+                            final Class<ENTITY> entityType) {
+                        return doSelectList(cb, entityType);
+                    }
+                });
+    }
+
+    @Override
+    protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
+        return selectEntityWithDeletedCheck(downcast(cb));
+    }
+
+    /**
+     * Select the entity by the primary-key value.
+     * @param id The one of primary key. (NotNull)
+     * @return The entity selected by the PK. (NullAllowed: if no data, it returns null)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.SelectEntityConditionNotFoundException When the condition for selecting an entity is not found.
+     */
+    public ScheduledJob selectByPKValue(final Long id) {
+        return doSelectByPKValue(id, ScheduledJob.class);
+    }
+
+    protected <ENTITY extends ScheduledJob> ENTITY doSelectByPKValue(
+            final Long id, final Class<ENTITY> entityType) {
+        return doSelectEntity(buildPKCB(id), entityType);
+    }
+
+    /**
+     * Select the entity by the primary-key value with deleted check.
+     * @param id The one of primary key. (NotNull)
+     * @return The entity selected by the PK. (NotNull: if no data, throws exception)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.SelectEntityConditionNotFoundException When the condition for selecting an entity is not found.
+     */
+    public ScheduledJob selectByPKValueWithDeletedCheck(final Long id) {
+        return doSelectByPKValueWithDeletedCheck(id, ScheduledJob.class);
+    }
+
+    protected <ENTITY extends ScheduledJob> ENTITY doSelectByPKValueWithDeletedCheck(
+            final Long id, final Class<ENTITY> entityType) {
+        return doSelectEntityWithDeletedCheck(buildPKCB(id), entityType);
+    }
+
+    private ScheduledJobCB buildPKCB(final Long id) {
+        assertObjectNotNull("id", id);
+        final ScheduledJobCB cb = newMyConditionBean();
+        cb.query().setId_Equal(id);
+        return cb;
+    }
+
+    // ===================================================================================
+    //                                                                         List Select
+    //                                                                         ===========
+    /**
+     * Select the list as result bean.
+     * <pre>
+     * ScheduledJobCB cb = new ScheduledJobCB();
+     * cb.query().setFoo...(value);
+     * cb.query().addOrderBy_Bar...();
+     * ListResultBean&lt;ScheduledJob&gt; scheduledJobList = scheduledJobBhv.<span style="color: #FD4747">selectList</span>(cb);
+     * for (ScheduledJob scheduledJob : scheduledJobList) {
+     *     ... = scheduledJob.get...();
+     * }
+     * </pre>
+     * @param cb The condition-bean of ScheduledJob. (NotNull)
+     * @return The result bean of selected list. (NotNull: if no data, returns empty list)
+     * @exception org.seasar.dbflute.exception.DangerousResultSizeException When the result size is over the specified safety size.
+     */
+    public ListResultBean<ScheduledJob> selectList(final ScheduledJobCB cb) {
+        return doSelectList(cb, ScheduledJob.class);
+    }
+
+    protected <ENTITY extends ScheduledJob> ListResultBean<ENTITY> doSelectList(
+            final ScheduledJobCB cb, final Class<ENTITY> entityType) {
+        assertCBStateValid(cb);
+        assertObjectNotNull("entityType", entityType);
+        assertSpecifyDerivedReferrerEntityProperty(cb, entityType);
+        return helpSelectListInternally(cb, entityType,
+                new InternalSelectListCallback<ENTITY, ScheduledJobCB>() {
+                    @Override
+                    public List<ENTITY> callbackSelectList(
+                            final ScheduledJobCB cb,
+                            final Class<ENTITY> entityType) {
+                        return delegateSelectList(cb, entityType);
+                    }
+                });
+    }
+
+    @Override
+    protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
+        return selectList(downcast(cb));
+    }
+
+    // ===================================================================================
+    //                                                                         Page Select
+    //                                                                         ===========
+    /**
+     * Select the page as result bean. <br />
+     * (both count-select and paging-select are executed)
+     * <pre>
+     * ScheduledJobCB cb = new ScheduledJobCB();
+     * cb.query().setFoo...(value);
+     * cb.query().addOrderBy_Bar...();
+     * cb.<span style="color: #FD4747">paging</span>(20, 3); <span style="color: #3F7E5E">// 20 records per a page and current page number is 3</span>
+     * PagingResultBean&lt;ScheduledJob&gt; page = scheduledJobBhv.<span style="color: #FD4747">selectPage</span>(cb);
+     * int allRecordCount = page.getAllRecordCount();
+     * int allPageCount = page.getAllPageCount();
+     * boolean isExistPrePage = page.isExistPrePage();
+     * boolean isExistNextPage = page.isExistNextPage();
+     * ...
+     * for (ScheduledJob scheduledJob : page) {
+     *     ... = scheduledJob.get...();
+     * }
+     * </pre>
+     * @param cb The condition-bean of ScheduledJob. (NotNull)
+     * @return The result bean of selected page. (NotNull: if no data, returns bean as empty list)
+     * @exception org.seasar.dbflute.exception.DangerousResultSizeException When the result size is over the specified safety size.
+     */
+    public PagingResultBean<ScheduledJob> selectPage(final ScheduledJobCB cb) {
+        return doSelectPage(cb, ScheduledJob.class);
+    }
+
+    protected <ENTITY extends ScheduledJob> PagingResultBean<ENTITY> doSelectPage(
+            final ScheduledJobCB cb, final Class<ENTITY> entityType) {
+        assertCBStateValid(cb);
+        assertObjectNotNull("entityType", entityType);
+        return helpSelectPageInternally(cb, entityType,
+                new InternalSelectPageCallback<ENTITY, ScheduledJobCB>() {
+                    @Override
+                    public int callbackSelectCount(final ScheduledJobCB cb) {
+                        return doSelectCountPlainly(cb);
+                    }
+
+                    @Override
+                    public List<ENTITY> callbackSelectList(
+                            final ScheduledJobCB cb,
+                            final Class<ENTITY> entityType) {
+                        return doSelectList(cb, entityType);
+                    }
+                });
+    }
+
+    @Override
+    protected PagingResultBean<? extends Entity> doReadPage(
+            final ConditionBean cb) {
+        return selectPage(downcast(cb));
+    }
+
+    // ===================================================================================
+    //                                                                       Cursor Select
+    //                                                                       =============
+    /**
+     * Select the cursor by the condition-bean.
+     * <pre>
+     * ScheduledJobCB cb = new ScheduledJobCB();
+     * cb.query().setFoo...(value);
+     * scheduledJobBhv.<span style="color: #FD4747">selectCursor</span>(cb, new EntityRowHandler&lt;ScheduledJob&gt;() {
+     *     public void handle(ScheduledJob entity) {
+     *         ... = entity.getFoo...();
+     *     }
+     * });
+     * </pre>
+     * @param cb The condition-bean of ScheduledJob. (NotNull)
+     * @param entityRowHandler The handler of entity row of ScheduledJob. (NotNull)
+     */
+    public void selectCursor(final ScheduledJobCB cb,
+            final EntityRowHandler<ScheduledJob> entityRowHandler) {
+        doSelectCursor(cb, entityRowHandler, ScheduledJob.class);
+    }
+
+    protected <ENTITY extends ScheduledJob> void doSelectCursor(
+            final ScheduledJobCB cb,
+            final EntityRowHandler<ENTITY> entityRowHandler,
+            final Class<ENTITY> entityType) {
+        assertCBStateValid(cb);
+        assertObjectNotNull("entityRowHandler<ScheduledJob>", entityRowHandler);
+        assertObjectNotNull("entityType", entityType);
+        assertSpecifyDerivedReferrerEntityProperty(cb, entityType);
+        helpSelectCursorInternally(cb, entityRowHandler, entityType,
+                new InternalSelectCursorCallback<ENTITY, ScheduledJobCB>() {
+                    @Override
+                    public void callbackSelectCursor(final ScheduledJobCB cb,
+                            final EntityRowHandler<ENTITY> entityRowHandler,
+                            final Class<ENTITY> entityType) {
+                        delegateSelectCursor(cb, entityRowHandler, entityType);
+                    }
+
+                    @Override
+                    public List<ENTITY> callbackSelectList(
+                            final ScheduledJobCB cb,
+                            final Class<ENTITY> entityType) {
+                        return doSelectList(cb, entityType);
+                    }
+                });
+    }
+
+    // ===================================================================================
+    //                                                                       Scalar Select
+    //                                                                       =============
+    /**
+     * Select the scalar value derived by a function from uniquely-selected records. <br />
+     * You should call a function method after this method called like as follows:
+     * <pre>
+     * scheduledJobBhv.<span style="color: #FD4747">scalarSelect</span>(Date.class).max(new ScalarQuery() {
+     *     public void query(ScheduledJobCB cb) {
+     *         cb.specify().<span style="color: #FD4747">columnFooDatetime()</span>; <span style="color: #3F7E5E">// required for a function</span>
+     *         cb.query().setBarName_PrefixSearch("S");
+     *     }
+     * });
+     * </pre>
+     * @param <RESULT> The type of result.
+     * @param resultType The type of result. (NotNull)
+     * @return The scalar value derived by a function. (NullAllowed)
+     */
+    public <RESULT> SLFunction<ScheduledJobCB, RESULT> scalarSelect(
+            final Class<RESULT> resultType) {
+        return doScalarSelect(resultType, newMyConditionBean());
+    }
+
+    protected <RESULT, CB extends ScheduledJobCB> SLFunction<CB, RESULT> doScalarSelect(
+            final Class<RESULT> resultType, final CB cb) {
+        assertObjectNotNull("resultType", resultType);
+        assertCBStateValid(cb);
+        cb.xsetupForScalarSelect();
+        cb.getSqlClause().disableSelectIndex(); // for when you use union
+        return new SLFunction<CB, RESULT>(cb, resultType);
+    }
+
+    // ===================================================================================
+    //                                                                            Sequence
+    //                                                                            ========
+    @Override
+    protected Number doReadNextVal() {
+        final String msg = "This table is NOT related to sequence: "
+                + getTableDbName();
+        throw new UnsupportedOperationException(msg);
+    }
+
+    // ===================================================================================
+    //                                                                   Pull out Relation
+    //                                                                   =================
+
+    // ===================================================================================
+    //                                                                      Extract Column
+    //                                                                      ==============
+    /**
+     * Extract the value list of (single) primary key id.
+     * @param scheduledJobList The list of scheduledJob. (NotNull, EmptyAllowed)
+     * @return The list of the column value. (NotNull, EmptyAllowed, NotNullElement)
+     */
+    public List<Long> extractIdList(final List<ScheduledJob> scheduledJobList) {
+        return helpExtractListInternally(scheduledJobList,
+                new InternalExtractCallback<ScheduledJob, Long>() {
+                    @Override
+                    public Long getCV(final ScheduledJob e) {
+                        return e.getId();
+                    }
+                });
+    }
+
+    // ===================================================================================
+    //                                                                       Entity Update
+    //                                                                       =============
+    /**
+     * Insert the entity. (DefaultConstraintsEnabled)
+     * <pre>
+     * ScheduledJob scheduledJob = new ScheduledJob();
+     * <span style="color: #3F7E5E">// if auto-increment, you don't need to set the PK value</span>
+     * scheduledJob.setFoo...(value);
+     * scheduledJob.setBar...(value);
+     * <span style="color: #3F7E5E">// you don't need to set values of common columns</span>
+     * <span style="color: #3F7E5E">//scheduledJob.setRegisterUser(value);</span>
+     * <span style="color: #3F7E5E">//scheduledJob.set...;</span>
+     * scheduledJobBhv.<span style="color: #FD4747">insert</span>(scheduledJob);
+     * ... = scheduledJob.getPK...(); <span style="color: #3F7E5E">// if auto-increment, you can get the value after</span>
+     * </pre>
+     * @param scheduledJob The entity of insert target. (NotNull, PrimaryKeyNullAllowed: when auto-increment)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void insert(final ScheduledJob scheduledJob) {
+        doInsert(scheduledJob, null);
+    }
+
+    protected void doInsert(final ScheduledJob scheduledJob,
+            final InsertOption<ScheduledJobCB> option) {
+        assertObjectNotNull("scheduledJob", scheduledJob);
+        prepareInsertOption(option);
+        delegateInsert(scheduledJob, option);
+    }
+
+    protected void prepareInsertOption(final InsertOption<ScheduledJobCB> option) {
+        if (option == null) {
+            return;
+        }
+        assertInsertOptionStatus(option);
+    }
+
+    @Override
+    protected void doCreate(final Entity entity,
+            final InsertOption<? extends ConditionBean> option) {
+        if (option == null) {
+            insert(downcast(entity));
+        } else {
+            varyingInsert(downcast(entity), downcast(option));
+        }
+    }
+
+    /**
+     * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl)
+     * <pre>
+     * ScheduledJob scheduledJob = new ScheduledJob();
+     * scheduledJob.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * scheduledJob.setFoo...(value); <span style="color: #3F7E5E">// you should set only modified columns</span>
+     * <span style="color: #3F7E5E">// you don't need to set values of common columns</span>
+     * <span style="color: #3F7E5E">//scheduledJob.setRegisterUser(value);</span>
+     * <span style="color: #3F7E5E">//scheduledJob.set...;</span>
+     * <span style="color: #3F7E5E">// if exclusive control, the value of exclusive control column is required</span>
+     * scheduledJob.<span style="color: #FD4747">setVersionNo</span>(value);
+     * try {
+     *     scheduledJobBhv.<span style="color: #FD4747">update</span>(scheduledJob);
+     * } catch (EntityAlreadyUpdatedException e) { <span style="color: #3F7E5E">// if concurrent update</span>
+     *     ...
+     * } 
+     * </pre>
+     * @param scheduledJob The entity of update target. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnRequired)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void update(final ScheduledJob scheduledJob) {
+        doUpdate(scheduledJob, null);
+    }
+
+    protected void doUpdate(final ScheduledJob scheduledJob,
+            final UpdateOption<ScheduledJobCB> option) {
+        assertObjectNotNull("scheduledJob", scheduledJob);
+        prepareUpdateOption(option);
+        helpUpdateInternally(scheduledJob,
+                new InternalUpdateCallback<ScheduledJob>() {
+                    @Override
+                    public int callbackDelegateUpdate(final ScheduledJob entity) {
+                        return delegateUpdate(entity, option);
+                    }
+                });
+    }
+
+    protected void prepareUpdateOption(final UpdateOption<ScheduledJobCB> option) {
+        if (option == null) {
+            return;
+        }
+        assertUpdateOptionStatus(option);
+        if (option.hasSelfSpecification()) {
+            option.resolveSelfSpecification(createCBForVaryingUpdate());
+        }
+        if (option.hasSpecifiedUpdateColumn()) {
+            option.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
+        }
+    }
+
+    protected ScheduledJobCB createCBForVaryingUpdate() {
+        final ScheduledJobCB cb = newMyConditionBean();
+        cb.xsetupForVaryingUpdate();
+        return cb;
+    }
+
+    protected ScheduledJobCB createCBForSpecifiedUpdate() {
+        final ScheduledJobCB cb = newMyConditionBean();
+        cb.xsetupForSpecifiedUpdate();
+        return cb;
+    }
+
+    @Override
+    protected void doModify(final Entity entity,
+            final UpdateOption<? extends ConditionBean> option) {
+        if (option == null) {
+            update(downcast(entity));
+        } else {
+            varyingUpdate(downcast(entity), downcast(option));
+        }
+    }
+
+    /**
+     * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
+     * <pre>
+     * ScheduledJob scheduledJob = new ScheduledJob();
+     * scheduledJob.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * scheduledJob.setFoo...(value); <span style="color: #3F7E5E">// you should set only modified columns</span>
+     * <span style="color: #3F7E5E">// you don't need to set values of common columns</span>
+     * <span style="color: #3F7E5E">//scheduledJob.setRegisterUser(value);</span>
+     * <span style="color: #3F7E5E">//scheduledJob.set...;</span>
+     * <span style="color: #3F7E5E">// you don't need to set a value of exclusive control column</span>
+     * <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span>
+     * <span style="color: #3F7E5E">//scheduledJob.setVersionNo(value);</span>
+     * scheduledJobBhv.<span style="color: #FD4747">updateNonstrict</span>(scheduledJob);
+     * </pre>
+     * @param scheduledJob The entity of update target. (NotNull, PrimaryKeyNotNull)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void updateNonstrict(final ScheduledJob scheduledJob) {
+        doUpdateNonstrict(scheduledJob, null);
+    }
+
+    protected void doUpdateNonstrict(final ScheduledJob scheduledJob,
+            final UpdateOption<ScheduledJobCB> option) {
+        assertObjectNotNull("scheduledJob", scheduledJob);
+        prepareUpdateOption(option);
+        helpUpdateNonstrictInternally(scheduledJob,
+                new InternalUpdateNonstrictCallback<ScheduledJob>() {
+                    @Override
+                    public int callbackDelegateUpdateNonstrict(
+                            final ScheduledJob entity) {
+                        return delegateUpdateNonstrict(entity, option);
+                    }
+                });
+    }
+
+    @Override
+    protected void doModifyNonstrict(final Entity entity,
+            final UpdateOption<? extends ConditionBean> option) {
+        if (option == null) {
+            updateNonstrict(downcast(entity));
+        } else {
+            varyingUpdateNonstrict(downcast(entity), downcast(option));
+        }
+    }
+
+    /**
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
+     * @param scheduledJob The entity of insert or update target. (NotNull)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void insertOrUpdate(final ScheduledJob scheduledJob) {
+        doInesrtOrUpdate(scheduledJob, null, null);
+    }
+
+    protected void doInesrtOrUpdate(final ScheduledJob scheduledJob,
+            final InsertOption<ScheduledJobCB> insertOption,
+            final UpdateOption<ScheduledJobCB> updateOption) {
+        helpInsertOrUpdateInternally(
+                scheduledJob,
+                new InternalInsertOrUpdateCallback<ScheduledJob, ScheduledJobCB>() {
+                    @Override
+                    public void callbackInsert(final ScheduledJob entity) {
+                        doInsert(entity, insertOption);
+                    }
+
+                    @Override
+                    public void callbackUpdate(final ScheduledJob entity) {
+                        doUpdate(entity, updateOption);
+                    }
+
+                    @Override
+                    public ScheduledJobCB callbackNewMyConditionBean() {
+                        return newMyConditionBean();
+                    }
+
+                    @Override
+                    public int callbackSelectCount(final ScheduledJobCB cb) {
+                        return selectCount(cb);
+                    }
+                });
+    }
+
+    @Override
+    protected void doCreateOrModify(final Entity entity,
+            InsertOption<? extends ConditionBean> insertOption,
+            UpdateOption<? extends ConditionBean> updateOption) {
+        if (insertOption == null && updateOption == null) {
+            insertOrUpdate(downcast(entity));
+        } else {
+            insertOption = insertOption == null ? new InsertOption<ScheduledJobCB>()
+                    : insertOption;
+            updateOption = updateOption == null ? new UpdateOption<ScheduledJobCB>()
+                    : updateOption;
+            varyingInsertOrUpdate(downcast(entity), downcast(insertOption),
+                    downcast(updateOption));
+        }
+    }
+
+    /**
+     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() }
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
+     * @param scheduledJob The entity of insert or update target. (NotNull)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void insertOrUpdateNonstrict(final ScheduledJob scheduledJob) {
+        doInesrtOrUpdateNonstrict(scheduledJob, null, null);
+    }
+
+    protected void doInesrtOrUpdateNonstrict(final ScheduledJob scheduledJob,
+            final InsertOption<ScheduledJobCB> insertOption,
+            final UpdateOption<ScheduledJobCB> updateOption) {
+        helpInsertOrUpdateInternally(scheduledJob,
+                new InternalInsertOrUpdateNonstrictCallback<ScheduledJob>() {
+                    @Override
+                    public void callbackInsert(final ScheduledJob entity) {
+                        doInsert(entity, insertOption);
+                    }
+
+                    @Override
+                    public void callbackUpdateNonstrict(
+                            final ScheduledJob entity) {
+                        doUpdateNonstrict(entity, updateOption);
+                    }
+                });
+    }
+
+    @Override
+    protected void doCreateOrModifyNonstrict(final Entity entity,
+            InsertOption<? extends ConditionBean> insertOption,
+            UpdateOption<? extends ConditionBean> updateOption) {
+        if (insertOption == null && updateOption == null) {
+            insertOrUpdateNonstrict(downcast(entity));
+        } else {
+            insertOption = insertOption == null ? new InsertOption<ScheduledJobCB>()
+                    : insertOption;
+            updateOption = updateOption == null ? new UpdateOption<ScheduledJobCB>()
+                    : updateOption;
+            varyingInsertOrUpdateNonstrict(downcast(entity),
+                    downcast(insertOption), downcast(updateOption));
+        }
+    }
+
+    /**
+     * Delete the entity. (ZeroUpdateException, ExclusiveControl)
+     * <pre>
+     * ScheduledJob scheduledJob = new ScheduledJob();
+     * scheduledJob.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * <span style="color: #3F7E5E">// if exclusive control, the value of exclusive control column is required</span>
+     * scheduledJob.<span style="color: #FD4747">setVersionNo</span>(value);
+     * try {
+     *     scheduledJobBhv.<span style="color: #FD4747">delete</span>(scheduledJob);
+     * } catch (EntityAlreadyUpdatedException e) { <span style="color: #3F7E5E">// if concurrent update</span>
+     *     ...
+     * } 
+     * </pre>
+     * @param scheduledJob The entity of delete target. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnRequired)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     */
+    public void delete(final ScheduledJob scheduledJob) {
+        doDelete(scheduledJob, null);
+    }
+
+    protected void doDelete(final ScheduledJob scheduledJob,
+            final DeleteOption<ScheduledJobCB> option) {
+        assertObjectNotNull("scheduledJob", scheduledJob);
+        prepareDeleteOption(option);
+        helpDeleteInternally(scheduledJob,
+                new InternalDeleteCallback<ScheduledJob>() {
+                    @Override
+                    public int callbackDelegateDelete(final ScheduledJob entity) {
+                        return delegateDelete(entity, option);
+                    }
+                });
+    }
+
+    protected void prepareDeleteOption(final DeleteOption<ScheduledJobCB> option) {
+        if (option == null) {
+            return;
+        }
+        assertDeleteOptionStatus(option);
+    }
+
+    @Override
+    protected void doRemove(final Entity entity,
+            final DeleteOption<? extends ConditionBean> option) {
+        if (option == null) {
+            delete(downcast(entity));
+        } else {
+            varyingDelete(downcast(entity), downcast(option));
+        }
+    }
+
+    /**
+     * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
+     * <pre>
+     * ScheduledJob scheduledJob = new ScheduledJob();
+     * scheduledJob.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * <span style="color: #3F7E5E">// you don't need to set a value of exclusive control column</span>
+     * <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span>
+     * <span style="color: #3F7E5E">//scheduledJob.setVersionNo(value);</span>
+     * scheduledJobBhv.<span style="color: #FD4747">deleteNonstrict</span>(scheduledJob);
+     * </pre>
+     * @param scheduledJob The entity of delete target. (NotNull, PrimaryKeyNotNull)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     */
+    public void deleteNonstrict(final ScheduledJob scheduledJob) {
+        doDeleteNonstrict(scheduledJob, null);
+    }
+
+    protected void doDeleteNonstrict(final ScheduledJob scheduledJob,
+            final DeleteOption<ScheduledJobCB> option) {
+        assertObjectNotNull("scheduledJob", scheduledJob);
+        prepareDeleteOption(option);
+        helpDeleteNonstrictInternally(scheduledJob,
+                new InternalDeleteNonstrictCallback<ScheduledJob>() {
+                    @Override
+                    public int callbackDelegateDeleteNonstrict(
+                            final ScheduledJob entity) {
+                        return delegateDeleteNonstrict(entity, option);
+                    }
+                });
+    }
+
+    /**
+     * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
+     * <pre>
+     * ScheduledJob scheduledJob = new ScheduledJob();
+     * scheduledJob.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * <span style="color: #3F7E5E">// you don't need to set a value of exclusive control column</span>
+     * <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span>
+     * <span style="color: #3F7E5E">//scheduledJob.setVersionNo(value);</span>
+     * scheduledJobBhv.<span style="color: #FD4747">deleteNonstrictIgnoreDeleted</span>(scheduledJob);
+     * <span style="color: #3F7E5E">// if the target entity doesn't exist, no exception</span>
+     * </pre>
+     * @param scheduledJob The entity of delete target. (NotNull, PrimaryKeyNotNull)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     */
+    public void deleteNonstrictIgnoreDeleted(final ScheduledJob scheduledJob) {
+        doDeleteNonstrictIgnoreDeleted(scheduledJob, null);
+    }
+
+    protected void doDeleteNonstrictIgnoreDeleted(
+            final ScheduledJob scheduledJob,
+            final DeleteOption<ScheduledJobCB> option) {
+        assertObjectNotNull("scheduledJob", scheduledJob);
+        prepareDeleteOption(option);
+        helpDeleteNonstrictIgnoreDeletedInternally(
+                scheduledJob,
+                new InternalDeleteNonstrictIgnoreDeletedCallback<ScheduledJob>() {
+                    @Override
+                    public int callbackDelegateDeleteNonstrict(
+                            final ScheduledJob entity) {
+                        return delegateDeleteNonstrict(entity, option);
+                    }
+                });
+    }
+
+    @Override
+    protected void doRemoveNonstrict(final Entity entity,
+            final DeleteOption<? extends ConditionBean> option) {
+        if (option == null) {
+            deleteNonstrict(downcast(entity));
+        } else {
+            varyingDeleteNonstrict(downcast(entity), downcast(option));
+        }
+    }
+
+    // ===================================================================================
+    //                                                                        Batch Update
+    //                                                                        ============
+    /**
+     * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
+     * And if the table has an identity, entities after the process don't have incremented values.
+     * When you use the (normal) insert(), an entity after the process has an incremented value.
+     * @param scheduledJobList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
+     * @return The array of inserted count. (NotNull, EmptyAllowed)
+     */
+    public int[] batchInsert(final List<ScheduledJob> scheduledJobList) {
+        return doBatchInsert(scheduledJobList, null);
+    }
+
+    protected int[] doBatchInsert(final List<ScheduledJob> scheduledJobList,
+            final InsertOption<ScheduledJobCB> option) {
+        assertObjectNotNull("scheduledJobList", scheduledJobList);
+        prepareInsertOption(option);
+        return delegateBatchInsert(scheduledJobList, option);
+    }
+
+    @Override
+    protected int[] doLumpCreate(final List<Entity> ls,
+            final InsertOption<? extends ConditionBean> option) {
+        if (option == null) {
+            return batchInsert(downcast(ls));
+        } else {
+            return varyingBatchInsert(downcast(ls), downcast(option));
+        }
+    }
+
+    /**
+     * Batch-update the entity list. (AllColumnsUpdated, ExclusiveControl) <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
+     * <pre>
+     * scheduledJobBhv.<span style="color: #FD4747">batchUpdate</span>(scheduledJobList, new SpecifyQuery<ScheduledJobCB>() {
+     *     public void specify(ScheduledJobCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
+     *     }
+     * });
+     * </pre>
+     * @param scheduledJobList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
+     * @return The array of updated count. (NotNull, EmptyAllowed)
+     * @exception org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException When the entity has already been updated. This exception extends EntityAlreadyUpdatedException.
+     */
+    public int[] batchUpdate(final List<ScheduledJob> scheduledJobList) {
+        return doBatchUpdate(scheduledJobList, null);
+    }
+
+    protected int[] doBatchUpdate(final List<ScheduledJob> scheduledJobList,
+            final UpdateOption<ScheduledJobCB> option) {
+        assertObjectNotNull("scheduledJobList", scheduledJobList);
+        prepareBatchUpdateOption(scheduledJobList, option);
+        return delegateBatchUpdate(scheduledJobList, option);
+    }
+
+    protected void prepareBatchUpdateOption(
+            final List<ScheduledJob> scheduledJobList,
+            final UpdateOption<ScheduledJobCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(scheduledJobList);
+        //}
+    }
+
+    @Override
+    protected int[] doLumpModify(final List<Entity> ls,
+            final UpdateOption<? extends ConditionBean> option) {
+        if (option == null) {
+            return batchUpdate(downcast(ls));
+        } else {
+            return varyingBatchUpdate(downcast(ls), downcast(option));
+        }
+    }
+
+    /**
+     * Batch-update the entity list. (SpecifiedColumnsUpdated, ExclusiveControl) <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * scheduledJobBhv.<span style="color: #FD4747">batchUpdate</span>(scheduledJobList, new SpecifyQuery<ScheduledJobCB>() {
+     *     public void specify(ScheduledJobCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * scheduledJobBhv.<span style="color: #FD4747">batchUpdate</span>(scheduledJobList, new SpecifyQuery<ScheduledJobCB>() {
+     *     public void specify(ScheduledJobCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
+     *     }
+     * });
+     * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
+     * @param scheduledJobList 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 org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException When the entity has already been updated. This exception extends EntityAlreadyUpdatedException.
+     */
+    public int[] batchUpdate(final List<ScheduledJob> scheduledJobList,
+            final SpecifyQuery<ScheduledJobCB> updateColumnSpec) {
+        return doBatchUpdate(scheduledJobList,
+                createSpecifiedUpdateOption(updateColumnSpec));
+    }
+
+    /**
+     * Batch-update the entity list non-strictly. (AllColumnsUpdated, NonExclusiveControl) <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
+     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span>
+     * So you should the other batchUpdateNonstrict() (overload) method for performace,
+     * which you can specify update columns like this:
+     * <pre>
+     * scheduledJobBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(scheduledJobList, new SpecifyQuery<ScheduledJobCB>() {
+     *     public void specify(ScheduledJobCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
+     *     }
+     * });
+     * </pre>
+     * @param scheduledJobList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
+     * @return The array of updated count. (NotNull, EmptyAllowed)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     */
+    public int[] batchUpdateNonstrict(final List<ScheduledJob> scheduledJobList) {
+        return doBatchUpdateNonstrict(scheduledJobList, null);
+    }
+
+    protected int[] doBatchUpdateNonstrict(
+            final List<ScheduledJob> scheduledJobList,
+            final UpdateOption<ScheduledJobCB> option) {
+        assertObjectNotNull("scheduledJobList", scheduledJobList);
+        prepareBatchUpdateOption(scheduledJobList, option);
+        return delegateBatchUpdateNonstrict(scheduledJobList, option);
+    }
+
+    /**
+     * Batch-update the entity list non-strictly. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * scheduledJobBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(scheduledJobList, new SpecifyQuery<ScheduledJobCB>() {
+     *     public void specify(ScheduledJobCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * scheduledJobBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(scheduledJobList, new SpecifyQuery<ScheduledJobCB>() {
+     *     public void specify(ScheduledJobCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
+     *     }
+     * });
+     * </pre>
+     * <p>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.</p>
+     * <p>And you should specify columns that are modified in any entities (at least one entity).</p>
+     * @param scheduledJobList 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 org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     */
+    public int[] batchUpdateNonstrict(
+            final List<ScheduledJob> scheduledJobList,
+            final SpecifyQuery<ScheduledJobCB> updateColumnSpec) {
+        return doBatchUpdateNonstrict(scheduledJobList,
+                createSpecifiedUpdateOption(updateColumnSpec));
+    }
+
+    @Override
+    protected int[] doLumpModifyNonstrict(final List<Entity> ls,
+            final UpdateOption<? extends ConditionBean> option) {
+        if (option == null) {
+            return batchUpdateNonstrict(downcast(ls));
+        } else {
+            return varyingBatchUpdateNonstrict(downcast(ls), downcast(option));
+        }
+    }
+
+    /**
+     * Batch-delete the entity list. (ExclusiveControl) <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * @param scheduledJobList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
+     * @return The array of deleted count. (NotNull, EmptyAllowed)
+     * @exception org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException When the entity has already been updated. This exception extends EntityAlreadyUpdatedException.
+     */
+    public int[] batchDelete(final List<ScheduledJob> scheduledJobList) {
+        return doBatchDelete(scheduledJobList, null);
+    }
+
+    protected int[] doBatchDelete(final List<ScheduledJob> scheduledJobList,
+            final DeleteOption<ScheduledJobCB> option) {
+        assertObjectNotNull("scheduledJobList", scheduledJobList);
+        prepareDeleteOption(option);
+        return delegateBatchDelete(scheduledJobList, option);
+    }
+
+    @Override
+    protected int[] doLumpRemove(final List<Entity> ls,
+            final DeleteOption<? extends ConditionBean> option) {
+        if (option == null) {
+            return batchDelete(downcast(ls));
+        } else {
+            return varyingBatchDelete(downcast(ls), downcast(option));
+        }
+    }
+
+    /**
+     * Batch-delete the entity list non-strictly. {NonExclusiveControl} <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * @param scheduledJobList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
+     * @return The array of deleted count. (NotNull, EmptyAllowed)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     */
+    public int[] batchDeleteNonstrict(final List<ScheduledJob> scheduledJobList) {
+        return doBatchDeleteNonstrict(scheduledJobList, null);
+    }
+
+    protected int[] doBatchDeleteNonstrict(
+            final List<ScheduledJob> scheduledJobList,
+            final DeleteOption<ScheduledJobCB> option) {
+        assertObjectNotNull("scheduledJobList", scheduledJobList);
+        prepareDeleteOption(option);
+        return delegateBatchDeleteNonstrict(scheduledJobList, option);
+    }
+
+    @Override
+    protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
+            final DeleteOption<? extends ConditionBean> option) {
+        if (option == null) {
+            return batchDeleteNonstrict(downcast(ls));
+        } else {
+            return varyingBatchDeleteNonstrict(downcast(ls), downcast(option));
+        }
+    }
+
+    // ===================================================================================
+    //                                                                        Query Update
+    //                                                                        ============
+    /**
+     * Insert the several entities by query (modified-only for fixed value).
+     * <pre>
+     * scheduledJobBhv.<span style="color: #FD4747">queryInsert</span>(new QueryInsertSetupper&lt;ScheduledJob, ScheduledJobCB&gt;() {
+     *     public ConditionBean setup(scheduledJob entity, ScheduledJobCB intoCB) {
+     *         FooCB cb = FooCB();
+     *         cb.setupSelect_Bar();
+     * 
+     *         <span style="color: #3F7E5E">// mapping</span>
+     *         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"); <span style="color: #3F7E5E">// fixed value</span>
+     *         <span style="color: #3F7E5E">// you don't need to set values of common columns</span>
+     *         <span style="color: #3F7E5E">//entity.setRegisterUser(value);</span>
+     *         <span style="color: #3F7E5E">//entity.set...;</span>
+     *         <span style="color: #3F7E5E">// you don't need to set a value of exclusive control column</span>
+     *         <span style="color: #3F7E5E">//entity.setVersionNo(value);</span>
+     * 
+     *         return cb;
+     *     }
+     * });
+     * </pre>
+     * @param setupper The setup-per of query-insert. (NotNull)
+     * @return The inserted count.
+     */
+    public int queryInsert(
+            final QueryInsertSetupper<ScheduledJob, ScheduledJobCB> setupper) {
+        return doQueryInsert(setupper, null);
+    }
+
+    protected int doQueryInsert(
+            final QueryInsertSetupper<ScheduledJob, ScheduledJobCB> setupper,
+            final InsertOption<ScheduledJobCB> option) {
+        assertObjectNotNull("setupper", setupper);
+        prepareInsertOption(option);
+        final ScheduledJob entity = new ScheduledJob();
+        final ScheduledJobCB intoCB = createCBForQueryInsert();
+        final ConditionBean resourceCB = setupper.setup(entity, intoCB);
+        return delegateQueryInsert(entity, intoCB, resourceCB, option);
+    }
+
+    protected ScheduledJobCB createCBForQueryInsert() {
+        final ScheduledJobCB cb = newMyConditionBean();
+        cb.xsetupForQueryInsert();
+        return cb;
+    }
+
+    @Override
+    protected int doRangeCreate(
+            final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
+            final InsertOption<? extends ConditionBean> option) {
+        if (option == null) {
+            return queryInsert(downcast(setupper));
+        } else {
+            return varyingQueryInsert(downcast(setupper), downcast(option));
+        }
+    }
+
+    /**
+     * Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
+     * <pre>
+     * ScheduledJob scheduledJob = new ScheduledJob();
+     * <span style="color: #3F7E5E">// you don't need to set PK value</span>
+     * <span style="color: #3F7E5E">//scheduledJob.setPK...(value);</span>
+     * scheduledJob.setFoo...(value); <span style="color: #3F7E5E">// you should set only modified columns</span>
+     * <span style="color: #3F7E5E">// you don't need to set values of common columns</span>
+     * <span style="color: #3F7E5E">//scheduledJob.setRegisterUser(value);</span>
+     * <span style="color: #3F7E5E">//scheduledJob.set...;</span>
+     * <span style="color: #3F7E5E">// you don't need to set a value of exclusive control column</span>
+     * <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span>
+     * <span style="color: #3F7E5E">//scheduledJob.setVersionNo(value);</span>
+     * ScheduledJobCB cb = new ScheduledJobCB();
+     * cb.query().setFoo...(value);
+     * scheduledJobBhv.<span style="color: #FD4747">queryUpdate</span>(scheduledJob, cb);
+     * </pre>
+     * @param scheduledJob The entity that contains update values. (NotNull, PrimaryKeyNullAllowed)
+     * @param cb The condition-bean of ScheduledJob. (NotNull)
+     * @return The updated count.
+     * @exception org.seasar.dbflute.exception.NonQueryUpdateNotAllowedException When the query has no condition.
+     */
+    public int queryUpdate(final ScheduledJob scheduledJob,
+            final ScheduledJobCB cb) {
+        return doQueryUpdate(scheduledJob, cb, null);
+    }
+
+    protected int doQueryUpdate(final ScheduledJob scheduledJob,
+            final ScheduledJobCB cb, final UpdateOption<ScheduledJobCB> option) {
+        assertObjectNotNull("scheduledJob", scheduledJob);
+        assertCBStateValid(cb);
+        prepareUpdateOption(option);
+        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(
+                scheduledJob, cb, option) : 0;
+    }
+
+    @Override
+    protected int doRangeModify(final Entity entity, final ConditionBean cb,
+            final UpdateOption<? extends ConditionBean> option) {
+        if (option == null) {
+            return queryUpdate(downcast(entity), (ScheduledJobCB) cb);
+        } else {
+            return varyingQueryUpdate(downcast(entity), (ScheduledJobCB) cb,
+                    downcast(option));
+        }
+    }
+
+    /**
+     * Delete the several entities by query. (NonExclusiveControl)
+     * <pre>
+     * ScheduledJobCB cb = new ScheduledJobCB();
+     * cb.query().setFoo...(value);
+     * scheduledJobBhv.<span style="color: #FD4747">queryDelete</span>(scheduledJob, cb);
+     * </pre>
+     * @param cb The condition-bean of ScheduledJob. (NotNull)
+     * @return The deleted count.
+     * @exception org.seasar.dbflute.exception.NonQueryDeleteNotAllowedException When the query has no condition.
+     */
+    public int queryDelete(final ScheduledJobCB cb) {
+        return doQueryDelete(cb, null);
+    }
+
+    protected int doQueryDelete(final ScheduledJobCB cb,
+            final DeleteOption<ScheduledJobCB> option) {
+        assertCBStateValid(cb);
+        prepareDeleteOption(option);
+        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
+                option) : 0;
+    }
+
+    @Override
+    protected int doRangeRemove(final ConditionBean cb,
+            final DeleteOption<? extends ConditionBean> option) {
+        if (option == null) {
+            return queryDelete((ScheduledJobCB) cb);
+        } else {
+            return varyingQueryDelete((ScheduledJobCB) cb, downcast(option));
+        }
+    }
+
+    // ===================================================================================
+    //                                                                      Varying Update
+    //                                                                      ==============
+    // -----------------------------------------------------
+    //                                         Entity Update
+    //                                         -------------
+    /**
+     * Insert the entity with varying requests. <br />
+     * For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
+     * Other specifications are same as insert(entity).
+     * <pre>
+     * ScheduledJob scheduledJob = new ScheduledJob();
+     * <span style="color: #3F7E5E">// if auto-increment, you don't need to set the PK value</span>
+     * scheduledJob.setFoo...(value);
+     * scheduledJob.setBar...(value);
+     * InsertOption<ScheduledJobCB> option = new InsertOption<ScheduledJobCB>();
+     * <span style="color: #3F7E5E">// you can insert by your values for common columns</span>
+     * option.disableCommonColumnAutoSetup();
+     * scheduledJobBhv.<span style="color: #FD4747">varyingInsert</span>(scheduledJob, option);
+     * ... = scheduledJob.getPK...(); <span style="color: #3F7E5E">// if auto-increment, you can get the value after</span>
+     * </pre>
+     * @param scheduledJob The entity of insert target. (NotNull, PrimaryKeyNullAllowed: when auto-increment)
+     * @param option The option of insert for varying requests. (NotNull)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void varyingInsert(final ScheduledJob scheduledJob,
+            final InsertOption<ScheduledJobCB> option) {
+        assertInsertOptionNotNull(option);
+        doInsert(scheduledJob, option);
+    }
+
+    /**
+     * Update the entity with varying requests modified-only. (ZeroUpdateException, ExclusiveControl) <br />
+     * For example, self(selfCalculationSpecification), specify(updateColumnSpecification), disableCommonColumnAutoSetup(). <br />
+     * Other specifications are same as update(entity).
+     * <pre>
+     * ScheduledJob scheduledJob = new ScheduledJob();
+     * scheduledJob.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * scheduledJob.setOther...(value); <span style="color: #3F7E5E">// you should set only modified columns</span>
+     * <span style="color: #3F7E5E">// if exclusive control, the value of exclusive control column is required</span>
+     * scheduledJob.<span style="color: #FD4747">setVersionNo</span>(value);
+     * try {
+     *     <span style="color: #3F7E5E">// you can update by self calculation values</span>
+     *     UpdateOption&lt;ScheduledJobCB&gt; option = new UpdateOption&lt;ScheduledJobCB&gt;();
+     *     option.self(new SpecifyQuery&lt;ScheduledJobCB&gt;() {
+     *         public void specify(ScheduledJobCB cb) {
+     *             cb.specify().<span style="color: #FD4747">columnXxxCount()</span>;
+     *         }
+     *     }).plus(1); <span style="color: #3F7E5E">// XXX_COUNT = XXX_COUNT + 1</span>
+     *     scheduledJobBhv.<span style="color: #FD4747">varyingUpdate</span>(scheduledJob, option);
+     * } catch (EntityAlreadyUpdatedException e) { <span style="color: #3F7E5E">// if concurrent update</span>
+     *     ...
+     * }
+     * </pre>
+     * @param scheduledJob The entity of update target. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnRequired)
+     * @param option The option of update for varying requests. (NotNull)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void varyingUpdate(final ScheduledJob scheduledJob,
+            final UpdateOption<ScheduledJobCB> option) {
+        assertUpdateOptionNotNull(option);
+        doUpdate(scheduledJob, option);
+    }
+
+    /**
+     * Update the entity with varying requests non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl) <br />
+     * For example, self(selfCalculationSpecification), specify(updateColumnSpecification), disableCommonColumnAutoSetup(). <br />
+     * Other specifications are same as updateNonstrict(entity).
+     * <pre>
+     * <span style="color: #3F7E5E">// ex) you can update by self calculation values</span>
+     * ScheduledJob scheduledJob = new ScheduledJob();
+     * scheduledJob.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * scheduledJob.setOther...(value); <span style="color: #3F7E5E">// you should set only modified columns</span>
+     * <span style="color: #3F7E5E">// you don't need to set a value of exclusive control column</span>
+     * <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span>
+     * <span style="color: #3F7E5E">//scheduledJob.setVersionNo(value);</span>
+     * UpdateOption&lt;ScheduledJobCB&gt; option = new UpdateOption&lt;ScheduledJobCB&gt;();
+     * option.self(new SpecifyQuery&lt;ScheduledJobCB&gt;() {
+     *     public void specify(ScheduledJobCB cb) {
+     *         cb.specify().<span style="color: #FD4747">columnFooCount()</span>;
+     *     }
+     * }).plus(1); <span style="color: #3F7E5E">// FOO_COUNT = FOO_COUNT + 1</span>
+     * scheduledJobBhv.<span style="color: #FD4747">varyingUpdateNonstrict</span>(scheduledJob, option);
+     * </pre>
+     * @param scheduledJob The entity of update target. (NotNull, PrimaryKeyNotNull)
+     * @param option The option of update for varying requests. (NotNull)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void varyingUpdateNonstrict(final ScheduledJob scheduledJob,
+            final UpdateOption<ScheduledJobCB> option) {
+        assertUpdateOptionNotNull(option);
+        doUpdateNonstrict(scheduledJob, option);
+    }
+
+    /**
+     * Insert or update the entity with varying requests. (ExclusiveControl: when update) <br />
+     * Other specifications are same as insertOrUpdate(entity).
+     * @param scheduledJob The entity of insert or update target. (NotNull)
+     * @param insertOption The option of insert for varying requests. (NotNull)
+     * @param updateOption The option of update for varying requests. (NotNull)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void varyingInsertOrUpdate(final ScheduledJob scheduledJob,
+            final InsertOption<ScheduledJobCB> insertOption,
+            final UpdateOption<ScheduledJobCB> updateOption) {
+        assertInsertOptionNotNull(insertOption);
+        assertUpdateOptionNotNull(updateOption);
+        doInesrtOrUpdate(scheduledJob, insertOption, updateOption);
+    }
+
+    /**
+     * Insert or update the entity with varying requests non-strictly. (NonExclusiveControl: when update) <br />
+     * Other specifications are same as insertOrUpdateNonstrict(entity).
+     * @param scheduledJob The entity of insert or update target. (NotNull)
+     * @param insertOption The option of insert for varying requests. (NotNull)
+     * @param updateOption The option of update for varying requests. (NotNull)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     * @exception org.seasar.dbflute.exception.EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void varyingInsertOrUpdateNonstrict(final ScheduledJob scheduledJob,
+            final InsertOption<ScheduledJobCB> insertOption,
+            final UpdateOption<ScheduledJobCB> updateOption) {
+        assertInsertOptionNotNull(insertOption);
+        assertUpdateOptionNotNull(updateOption);
+        doInesrtOrUpdateNonstrict(scheduledJob, insertOption, updateOption);
+    }
+
+    /**
+     * Delete the entity with varying requests. (ZeroUpdateException, ExclusiveControl) <br />
+     * Now a valid option does not exist. <br />
+     * Other specifications are same as delete(entity).
+     * @param scheduledJob The entity of delete target. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnRequired)
+     * @param option The option of update for varying requests. (NotNull)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     */
+    public void varyingDelete(final ScheduledJob scheduledJob,
+            final DeleteOption<ScheduledJobCB> option) {
+        assertDeleteOptionNotNull(option);
+        doDelete(scheduledJob, option);
+    }
+
+    /**
+     * Delete the entity with varying requests non-strictly. (ZeroUpdateException, NonExclusiveControl) <br />
+     * Now a valid option does not exist. <br />
+     * Other specifications are same as deleteNonstrict(entity).
+     * @param scheduledJob The entity of delete target. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnRequired)
+     * @param option The option of update for varying requests. (NotNull)
+     * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
+     */
+    public void varyingDeleteNonstrict(final ScheduledJob scheduledJob,
+            final DeleteOption<ScheduledJobCB> option) {
+        assertDeleteOptionNotNull(option);
+        doDeleteNonstrict(scheduledJob, option);
+    }
+
+    // -----------------------------------------------------
+    //                                          Batch Update
+    //                                          ------------
+    /**
+     * Batch-insert the list with varying requests. <br />
+     * For example, disableCommonColumnAutoSetup()
+     * , disablePrimaryKeyIdentity(), limitBatchInsertLogging(). <br />
+     * Other specifications are same as batchInsert(entityList).
+     * @param scheduledJobList 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<ScheduledJob> scheduledJobList,
+            final InsertOption<ScheduledJobCB> option) {
+        assertInsertOptionNotNull(option);
+        return doBatchInsert(scheduledJobList, option);
+    }
+
+    /**
+     * Batch-update the list with varying requests. <br />
+     * For example, self(selfCalculationSpecification), specify(updateColumnSpecification)
+     * , disableCommonColumnAutoSetup(), limitBatchUpdateLogging(). <br />
+     * Other specifications are same as batchUpdate(entityList).
+     * @param scheduledJobList 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<ScheduledJob> scheduledJobList,
+            final UpdateOption<ScheduledJobCB> option) {
+        assertUpdateOptionNotNull(option);
+        return doBatchUpdate(scheduledJobList, option);
+    }
+
+    /**
+     * Batch-update the list with varying requests non-strictly. <br />
+     * For example, self(selfCalculationSpecification), specify(updateColumnSpecification)
+     * , disableCommonColumnAutoSetup(), limitBatchUpdateLogging(). <br />
+     * Other specifications are same as batchUpdateNonstrict(entityList).
+     * @param scheduledJobList 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<ScheduledJob> scheduledJobList,
+            final UpdateOption<ScheduledJobCB> option) {
+        assertUpdateOptionNotNull(option);
+        return doBatchUpdateNonstrict(scheduledJobList, option);
+    }
+
+    /**
+     * Batch-delete the list with varying requests. <br />
+     * For example, limitBatchDeleteLogging(). <br />
+     * Other specifications are same as batchDelete(entityList).
+     * @param scheduledJobList 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<ScheduledJob> scheduledJobList,
+            final DeleteOption<ScheduledJobCB> option) {
+        assertDeleteOptionNotNull(option);
+        return doBatchDelete(scheduledJobList, option);
+    }
+
+    /**
+     * Batch-delete the list with varying requests non-strictly. <br />
+     * For example, limitBatchDeleteLogging(). <br />
+     * Other specifications are same as batchDeleteNonstrict(entityList).
+     * @param scheduledJobList 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<ScheduledJob> scheduledJobList,
+            final DeleteOption<ScheduledJobCB> option) {
+        assertDeleteOptionNotNull(option);
+        return doBatchDeleteNonstrict(scheduledJobList, option);
+    }
+
+    // -----------------------------------------------------
+    //                                          Query Update
+    //                                          ------------
+    /**
+     * Insert the several entities by query with varying requests (modified-only for fixed value). <br />
+     * For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
+     * Other specifications are same as queryInsert(entity, setupper). 
+     * @param setupper The setup-per of query-insert. (NotNull)
+     * @param option The option of insert for varying requests. (NotNull)
+     * @return The inserted count.
+     */
+    public int varyingQueryInsert(
+            final QueryInsertSetupper<ScheduledJob, ScheduledJobCB> setupper,
+            final InsertOption<ScheduledJobCB> option) {
+        assertInsertOptionNotNull(option);
+        return doQueryInsert(setupper, option);
+    }
+
+    /**
+     * Update the several entities by query with varying requests non-strictly modified-only. {NonExclusiveControl} <br />
+     * For example, self(selfCalculationSpecification), specify(updateColumnSpecification)
+     * , disableCommonColumnAutoSetup(), allowNonQueryUpdate(). <br />
+     * Other specifications are same as queryUpdate(entity, cb). 
+     * <pre>
+     * <span style="color: #3F7E5E">// ex) you can update by self calculation values</span>
+     * ScheduledJob scheduledJob = new ScheduledJob();
+     * <span style="color: #3F7E5E">// you don't need to set PK value</span>
+     * <span style="color: #3F7E5E">//scheduledJob.setPK...(value);</span>
+     * scheduledJob.setOther...(value); <span style="color: #3F7E5E">// you should set only modified columns</span>
+     * <span style="color: #3F7E5E">// you don't need to set a value of exclusive control column</span>
+     * <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span>
+     * <span style="color: #3F7E5E">//scheduledJob.setVersionNo(value);</span>
+     * ScheduledJobCB cb = new ScheduledJobCB();
+     * cb.query().setFoo...(value);
+     * UpdateOption&lt;ScheduledJobCB&gt; option = new UpdateOption&lt;ScheduledJobCB&gt;();
+     * option.self(new SpecifyQuery&lt;ScheduledJobCB&gt;() {
+     *     public void specify(ScheduledJobCB cb) {
+     *         cb.specify().<span style="color: #FD4747">columnFooCount()</span>;
+     *     }
+     * }).plus(1); <span style="color: #3F7E5E">// FOO_COUNT = FOO_COUNT + 1</span>
+     * scheduledJobBhv.<span style="color: #FD4747">varyingQueryUpdate</span>(scheduledJob, cb, option);
+     * </pre>
+     * @param scheduledJob The entity that contains update values. (NotNull) {PrimaryKeyNotRequired}
+     * @param cb The condition-bean of ScheduledJob. (NotNull)
+     * @param option The option of update for varying requests. (NotNull)
+     * @return The updated count.
+     * @exception org.seasar.dbflute.exception.NonQueryUpdateNotAllowedException When the query has no condition (if not allowed).
+     */
+    public int varyingQueryUpdate(final ScheduledJob scheduledJob,
+            final ScheduledJobCB cb, final UpdateOption<ScheduledJobCB> option) {
+        assertUpdateOptionNotNull(option);
+        return doQueryUpdate(scheduledJob, cb, option);
+    }
+
+    /**
+     * Delete the several entities by query with varying requests non-strictly. <br />
+     * For example, allowNonQueryDelete(). <br />
+     * Other specifications are same as batchUpdateNonstrict(entityList).
+     * @param cb The condition-bean of ScheduledJob. (NotNull)
+     * @param option The option of delete for varying requests. (NotNull)
+     * @return The deleted count.
+     * @exception org.seasar.dbflute.exception.NonQueryDeleteNotAllowedException When the query has no condition (if not allowed).
+     */
+    public int varyingQueryDelete(final ScheduledJobCB cb,
+            final DeleteOption<ScheduledJobCB> option) {
+        assertDeleteOptionNotNull(option);
+        return doQueryDelete(cb, option);
+    }
+
+    // ===================================================================================
+    //                                                                          OutsideSql
+    //                                                                          ==========
+    /**
+     * Prepare the basic executor of outside-SQL to execute it. <br />
+     * The invoker of behavior command should be not null when you call this method.
+     * <pre>
+     * 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()
+     * </pre>
+     * @return The basic executor of outside-SQL. (NotNull) 
+     */
+    public OutsideSqlBasicExecutor<ScheduledJobBhv> outsideSql() {
+        return doOutsideSql();
+    }
+
+    // ===================================================================================
+    //                                                                     Delegate Method
+    //                                                                     ===============
+    // [Behavior Command]
+    // -----------------------------------------------------
+    //                                                Select
+    //                                                ------
+    protected int delegateSelectCountUniquely(final ScheduledJobCB cb) {
+        return invoke(createSelectCountCBCommand(cb, true));
+    }
+
+    protected int delegateSelectCountPlainly(final ScheduledJobCB cb) {
+        return invoke(createSelectCountCBCommand(cb, false));
+    }
+
+    protected <ENTITY extends ScheduledJob> void delegateSelectCursor(
+            final ScheduledJobCB cb, final EntityRowHandler<ENTITY> erh,
+            final Class<ENTITY> et) {
+        invoke(createSelectCursorCBCommand(cb, erh, et));
+    }
+
+    protected <ENTITY extends ScheduledJob> List<ENTITY> delegateSelectList(
+            final ScheduledJobCB cb, final Class<ENTITY> et) {
+        return invoke(createSelectListCBCommand(cb, et));
+    }
+
+    // -----------------------------------------------------
+    //                                                Update
+    //                                                ------
+    protected int delegateInsert(final ScheduledJob e,
+            final InsertOption<ScheduledJobCB> op) {
+        if (!processBeforeInsert(e, op)) {
+            return 0;
+        }
+        return invoke(createInsertEntityCommand(e, op));
+    }
+
+    protected int delegateUpdate(final ScheduledJob e,
+            final UpdateOption<ScheduledJobCB> op) {
+        if (!processBeforeUpdate(e, op)) {
+            return 0;
+        }
+        return invoke(createUpdateEntityCommand(e, op));
+    }
+
+    protected int delegateUpdateNonstrict(final ScheduledJob e,
+            final UpdateOption<ScheduledJobCB> op) {
+        if (!processBeforeUpdate(e, op)) {
+            return 0;
+        }
+        return invoke(createUpdateNonstrictEntityCommand(e, op));
+    }
+
+    protected int delegateDelete(final ScheduledJob e,
+            final DeleteOption<ScheduledJobCB> op) {
+        if (!processBeforeDelete(e, op)) {
+            return 0;
+        }
+        return invoke(createDeleteEntityCommand(e, op));
+    }
+
+    protected int delegateDeleteNonstrict(final ScheduledJob e,
+            final DeleteOption<ScheduledJobCB> op) {
+        if (!processBeforeDelete(e, op)) {
+            return 0;
+        }
+        return invoke(createDeleteNonstrictEntityCommand(e, op));
+    }
+
+    protected int[] delegateBatchInsert(final List<ScheduledJob> ls,
+            final InsertOption<ScheduledJobCB> op) {
+        if (ls.isEmpty()) {
+            return new int[] {};
+        }
+        return invoke(createBatchInsertCommand(processBatchInternally(ls, op),
+                op));
+    }
+
+    protected int[] delegateBatchUpdate(final List<ScheduledJob> ls,
+            final UpdateOption<ScheduledJobCB> op) {
+        if (ls.isEmpty()) {
+            return new int[] {};
+        }
+        return invoke(createBatchUpdateCommand(
+                processBatchInternally(ls, op, false), op));
+    }
+
+    protected int[] delegateBatchUpdateNonstrict(final List<ScheduledJob> ls,
+            final UpdateOption<ScheduledJobCB> op) {
+        if (ls.isEmpty()) {
+            return new int[] {};
+        }
+        return invoke(createBatchUpdateNonstrictCommand(
+                processBatchInternally(ls, op, true), op));
+    }
+
+    protected int[] delegateBatchDelete(final List<ScheduledJob> ls,
+            final DeleteOption<ScheduledJobCB> op) {
+        if (ls.isEmpty()) {
+            return new int[] {};
+        }
+        return invoke(createBatchDeleteCommand(
+                processBatchInternally(ls, op, false), op));
+    }
+
+    protected int[] delegateBatchDeleteNonstrict(final List<ScheduledJob> ls,
+            final DeleteOption<ScheduledJobCB> op) {
+        if (ls.isEmpty()) {
+            return new int[] {};
+        }
+        return invoke(createBatchDeleteNonstrictCommand(
+                processBatchInternally(ls, op, true), op));
+    }
+
+    protected int delegateQueryInsert(final ScheduledJob e,
+            final ScheduledJobCB inCB, final ConditionBean resCB,
+            final InsertOption<ScheduledJobCB> op) {
+        if (!processBeforeQueryInsert(e, inCB, resCB, op)) {
+            return 0;
+        }
+        return invoke(createQueryInsertCBCommand(e, inCB, resCB, op));
+    }
+
+    protected int delegateQueryUpdate(final ScheduledJob e,
+            final ScheduledJobCB cb, final UpdateOption<ScheduledJobCB> op) {
+        if (!processBeforeQueryUpdate(e, cb, op)) {
+            return 0;
+        }
+        return invoke(createQueryUpdateCBCommand(e, cb, op));
+    }
+
+    protected int delegateQueryDelete(final ScheduledJobCB cb,
+            final DeleteOption<ScheduledJobCB> op) {
+        if (!processBeforeQueryDelete(cb, op)) {
+            return 0;
+        }
+        return invoke(createQueryDeleteCBCommand(cb, op));
+    }
+
+    // ===================================================================================
+    //                                                                Optimistic Lock Info
+    //                                                                ====================
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected boolean hasVersionNoValue(final Entity entity) {
+        return !(downcast(entity).getVersionNo() + "").equals("null");// For primitive type
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected boolean hasUpdateDateValue(final Entity entity) {
+        return false;
+    }
+
+    // ===================================================================================
+    //                                                                     Downcast Helper
+    //                                                                     ===============
+    protected ScheduledJob downcast(final Entity entity) {
+        return helpEntityDowncastInternally(entity, ScheduledJob.class);
+    }
+
+    protected ScheduledJobCB downcast(final ConditionBean cb) {
+        return helpConditionBeanDowncastInternally(cb, ScheduledJobCB.class);
+    }
+
+    @SuppressWarnings("unchecked")
+    protected List<ScheduledJob> downcast(
+            final List<? extends Entity> entityList) {
+        return (List<ScheduledJob>) entityList;
+    }
+
+    @SuppressWarnings("unchecked")
+    protected InsertOption<ScheduledJobCB> downcast(
+            final InsertOption<? extends ConditionBean> option) {
+        return (InsertOption<ScheduledJobCB>) option;
+    }
+
+    @SuppressWarnings("unchecked")
+    protected UpdateOption<ScheduledJobCB> downcast(
+            final UpdateOption<? extends ConditionBean> option) {
+        return (UpdateOption<ScheduledJobCB>) option;
+    }
+
+    @SuppressWarnings("unchecked")
+    protected DeleteOption<ScheduledJobCB> downcast(
+            final DeleteOption<? extends ConditionBean> option) {
+        return (DeleteOption<ScheduledJobCB>) option;
+    }
+
+    @SuppressWarnings("unchecked")
+    protected QueryInsertSetupper<ScheduledJob, ScheduledJobCB> downcast(
+            final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> option) {
+        return (QueryInsertSetupper<ScheduledJob, ScheduledJobCB>) option;
+    }
+}

+ 41 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsSearchFieldLogBhv.java

@@ -652,7 +652,9 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param searchFieldLog The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -777,8 +779,8 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param searchFieldLogList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -809,13 +811,14 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * searchFieldLogBhv.<span style="color: #FD4747">batchUpdate</span>(searchFieldLogList, new SpecifyQuery<SearchFieldLogCB>() {
-     *     public void specify(SearchFieldLogCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(SearchFieldLogCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -831,10 +834,23 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
             final List<SearchFieldLog> searchFieldLogList,
             final UpdateOption<SearchFieldLogCB> option) {
         assertObjectNotNull("searchFieldLogList", searchFieldLogList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(searchFieldLogList, option);
         return delegateBatchUpdate(searchFieldLogList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<SearchFieldLog> searchFieldLogList,
+            final UpdateOption<SearchFieldLogCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(searchFieldLogList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -847,18 +863,27 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * searchFieldLogBhv.<span style="color: #FD4747">batchUpdate</span>(searchFieldLogList, new SpecifyQuery<SearchFieldLogCB>() {
-     *     public void specify(SearchFieldLogCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(SearchFieldLogCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * searchFieldLogBhv.<span style="color: #FD4747">batchUpdate</span>(searchFieldLogList, new SpecifyQuery<SearchFieldLogCB>() {
+     *     public void specify(SearchFieldLogCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param searchFieldLogList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 41 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsSearchLogBhv.java

@@ -918,7 +918,9 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param searchLog The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -1040,8 +1042,8 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param searchLogList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -1071,13 +1073,14 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * searchLogBhv.<span style="color: #FD4747">batchUpdate</span>(searchLogList, new SpecifyQuery<SearchLogCB>() {
-     *     public void specify(SearchLogCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(SearchLogCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1092,10 +1095,23 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
     protected int[] doBatchUpdate(final List<SearchLog> searchLogList,
             final UpdateOption<SearchLogCB> option) {
         assertObjectNotNull("searchLogList", searchLogList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(searchLogList, option);
         return delegateBatchUpdate(searchLogList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<SearchLog> searchLogList,
+            final UpdateOption<SearchLogCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(searchLogList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -1108,18 +1124,27 @@ public abstract class BsSearchLogBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * searchLogBhv.<span style="color: #FD4747">batchUpdate</span>(searchLogList, new SpecifyQuery<SearchLogCB>() {
-     *     public void specify(SearchLogCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(SearchLogCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * searchLogBhv.<span style="color: #FD4747">batchUpdate</span>(searchLogList, new SpecifyQuery<SearchLogCB>() {
+     *     public void specify(SearchLogCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param searchLogList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 40 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsUserInfoBhv.java

@@ -873,7 +873,9 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param userInfo The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -994,8 +996,8 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param userInfoList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -1025,13 +1027,14 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * userInfoBhv.<span style="color: #FD4747">batchUpdate</span>(userInfoList, new SpecifyQuery<UserInfoCB>() {
-     *     public void specify(UserInfoCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(UserInfoCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1046,10 +1049,22 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
     protected int[] doBatchUpdate(final List<UserInfo> userInfoList,
             final UpdateOption<UserInfoCB> option) {
         assertObjectNotNull("userInfoList", userInfoList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(userInfoList, option);
         return delegateBatchUpdate(userInfoList, option);
     }
 
+    protected void prepareBatchUpdateOption(final List<UserInfo> userInfoList,
+            final UpdateOption<UserInfoCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(userInfoList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -1062,18 +1077,27 @@ public abstract class BsUserInfoBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * userInfoBhv.<span style="color: #FD4747">batchUpdate</span>(userInfoList, new SpecifyQuery<UserInfoCB>() {
-     *     public void specify(UserInfoCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(UserInfoCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * userInfoBhv.<span style="color: #FD4747">batchUpdate</span>(userInfoList, new SpecifyQuery<UserInfoCB>() {
+     *     public void specify(UserInfoCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param userInfoList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 65 - 29
src/main/java/jp/sf/fess/db/bsbhv/BsWebAuthenticationBhv.java

@@ -701,7 +701,9 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param webAuthentication The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -756,7 +758,9 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() }
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param webAuthentication The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -938,8 +942,8 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param webAuthenticationList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -970,13 +974,14 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, ExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * webAuthenticationBhv.<span style="color: #FD4747">batchUpdate</span>(webAuthenticationList, new SpecifyQuery<WebAuthenticationCB>() {
-     *     public void specify(WebAuthenticationCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(WebAuthenticationCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -992,10 +997,23 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
             final List<WebAuthentication> webAuthenticationList,
             final UpdateOption<WebAuthenticationCB> option) {
         assertObjectNotNull("webAuthenticationList", webAuthenticationList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(webAuthenticationList, option);
         return delegateBatchUpdate(webAuthenticationList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<WebAuthentication> webAuthenticationList,
+            final UpdateOption<WebAuthenticationCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(webAuthenticationList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -1008,18 +1026,27 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, ExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * webAuthenticationBhv.<span style="color: #FD4747">batchUpdate</span>(webAuthenticationList, new SpecifyQuery<WebAuthenticationCB>() {
+     *     public void specify(WebAuthenticationCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * webAuthenticationBhv.<span style="color: #FD4747">batchUpdate</span>(webAuthenticationList, new SpecifyQuery<WebAuthenticationCB>() {
-     *     public void specify(WebAuthenticationCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(WebAuthenticationCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param webAuthenticationList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)
@@ -1036,12 +1063,13 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
      * Batch-update the entity list non-strictly. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
      * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span>
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * So you should the other batchUpdateNonstrict() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * webAuthenticationBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(webAuthenticationList, new SpecifyQuery<WebAuthenticationCB>() {
-     *     public void specify(WebAuthenticationCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(WebAuthenticationCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1058,24 +1086,32 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehaviorWritable {
             final List<WebAuthentication> webAuthenticationList,
             final UpdateOption<WebAuthenticationCB> option) {
         assertObjectNotNull("webAuthenticationList", webAuthenticationList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(webAuthenticationList, option);
         return delegateBatchUpdateNonstrict(webAuthenticationList, option);
     }
 
     /**
      * Batch-update the entity list non-strictly. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * webAuthenticationBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(webAuthenticationList, new SpecifyQuery<WebAuthenticationCB>() {
+     *     public void specify(WebAuthenticationCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * webAuthenticationBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(webAuthenticationList, new SpecifyQuery<WebAuthenticationCB>() {
-     *     public void specify(WebAuthenticationCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(WebAuthenticationCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>And you should specify columns that are modified in any entities (at least one entity).</p>
      * @param webAuthenticationList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 41 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToBrowserTypeMappingBhv.java

@@ -714,7 +714,9 @@ public abstract class BsWebConfigToBrowserTypeMappingBhv extends
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param webConfigToBrowserTypeMapping The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -847,8 +849,8 @@ public abstract class BsWebConfigToBrowserTypeMappingBhv extends
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param webConfigToBrowserTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -881,13 +883,14 @@ public abstract class BsWebConfigToBrowserTypeMappingBhv extends
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * webConfigToBrowserTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(webConfigToBrowserTypeMappingList, new SpecifyQuery<WebConfigToBrowserTypeMappingCB>() {
-     *     public void specify(WebConfigToBrowserTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(WebConfigToBrowserTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -905,10 +908,23 @@ public abstract class BsWebConfigToBrowserTypeMappingBhv extends
             final UpdateOption<WebConfigToBrowserTypeMappingCB> option) {
         assertObjectNotNull("webConfigToBrowserTypeMappingList",
                 webConfigToBrowserTypeMappingList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(webConfigToBrowserTypeMappingList, option);
         return delegateBatchUpdate(webConfigToBrowserTypeMappingList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<WebConfigToBrowserTypeMapping> webConfigToBrowserTypeMappingList,
+            final UpdateOption<WebConfigToBrowserTypeMappingCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(webConfigToBrowserTypeMappingList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -921,18 +937,27 @@ public abstract class BsWebConfigToBrowserTypeMappingBhv extends
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * webConfigToBrowserTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(webConfigToBrowserTypeMappingList, new SpecifyQuery<WebConfigToBrowserTypeMappingCB>() {
-     *     public void specify(WebConfigToBrowserTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(WebConfigToBrowserTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * webConfigToBrowserTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(webConfigToBrowserTypeMappingList, new SpecifyQuery<WebConfigToBrowserTypeMappingCB>() {
+     *     public void specify(WebConfigToBrowserTypeMappingCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param webConfigToBrowserTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 41 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToLabelTypeMappingBhv.java

@@ -711,7 +711,9 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param webConfigToLabelTypeMapping The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -844,8 +846,8 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param webConfigToLabelTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -878,13 +880,14 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * webConfigToLabelTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(webConfigToLabelTypeMappingList, new SpecifyQuery<WebConfigToLabelTypeMappingCB>() {
-     *     public void specify(WebConfigToLabelTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(WebConfigToLabelTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -902,10 +905,23 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
             final UpdateOption<WebConfigToLabelTypeMappingCB> option) {
         assertObjectNotNull("webConfigToLabelTypeMappingList",
                 webConfigToLabelTypeMappingList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(webConfigToLabelTypeMappingList, option);
         return delegateBatchUpdate(webConfigToLabelTypeMappingList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<WebConfigToLabelTypeMapping> webConfigToLabelTypeMappingList,
+            final UpdateOption<WebConfigToLabelTypeMappingCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(webConfigToLabelTypeMappingList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -918,18 +934,27 @@ public abstract class BsWebConfigToLabelTypeMappingBhv extends
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * webConfigToLabelTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(webConfigToLabelTypeMappingList, new SpecifyQuery<WebConfigToLabelTypeMappingCB>() {
-     *     public void specify(WebConfigToLabelTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(WebConfigToLabelTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * webConfigToLabelTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(webConfigToLabelTypeMappingList, new SpecifyQuery<WebConfigToLabelTypeMappingCB>() {
+     *     public void specify(WebConfigToLabelTypeMappingCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param webConfigToLabelTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 41 - 16
src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToRoleTypeMappingBhv.java

@@ -711,7 +711,9 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param webConfigToRoleTypeMapping The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -844,8 +846,8 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param webConfigToRoleTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -878,13 +880,14 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
     /**
      * Batch-update the entity list. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * webConfigToRoleTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(webConfigToRoleTypeMappingList, new SpecifyQuery<WebConfigToRoleTypeMappingCB>() {
-     *     public void specify(WebConfigToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(WebConfigToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -902,10 +905,23 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
             final UpdateOption<WebConfigToRoleTypeMappingCB> option) {
         assertObjectNotNull("webConfigToRoleTypeMappingList",
                 webConfigToRoleTypeMappingList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(webConfigToRoleTypeMappingList, option);
         return delegateBatchUpdate(webConfigToRoleTypeMappingList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<WebConfigToRoleTypeMapping> webConfigToRoleTypeMappingList,
+            final UpdateOption<WebConfigToRoleTypeMappingCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(webConfigToRoleTypeMappingList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -918,18 +934,27 @@ public abstract class BsWebConfigToRoleTypeMappingBhv extends
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
      * webConfigToRoleTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(webConfigToRoleTypeMappingList, new SpecifyQuery<WebConfigToRoleTypeMappingCB>() {
-     *     public void specify(WebConfigToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(WebConfigToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
+     * webConfigToRoleTypeMappingBhv.<span style="color: #FD4747">batchUpdate</span>(webConfigToRoleTypeMappingList, new SpecifyQuery<WebConfigToRoleTypeMappingCB>() {
+     *     public void specify(WebConfigToRoleTypeMappingCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param webConfigToRoleTypeMappingList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 65 - 29
src/main/java/jp/sf/fess/db/bsbhv/BsWebCrawlingConfigBhv.java

@@ -1494,7 +1494,9 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl)
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param webCrawlingConfig The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyUpdatedException When the entity has already been updated.
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -1549,7 +1551,9 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
     }
 
     /**
-     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl)
+     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() }
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
      * @param webCrawlingConfig The entity of insert or update target. (NotNull)
      * @exception org.seasar.dbflute.exception.EntityAlreadyDeletedException When the entity has already been deleted. (not found)
      * @exception org.seasar.dbflute.exception.EntityDuplicatedException When the entity has been duplicated.
@@ -1731,8 +1735,8 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
     //                                                                        ============
     /**
      * Batch-insert the entity list. (DefaultConstraintsDisabled) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are insert target. (so default constraints are not available in this method)</span> <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <p><span style="color: #FD4747; font-size: 120%">Attention, all columns are insert target. (so default constraints are not available)</span></p>
      * And if the table has an identity, entities after the process don't have incremented values.
      * When you use the (normal) insert(), an entity after the process has an incremented value.
      * @param webCrawlingConfigList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
@@ -1763,13 +1767,14 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
     /**
      * Batch-update the entity list. (AllColumnsUpdated, ExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span> <br />
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * <span style="color: #FD4747; font-size: 140%">Attention, all columns are update target. {NOT modified only}</span> <br />
+     * So you should the other batchUpdate() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * webCrawlingConfigBhv.<span style="color: #FD4747">batchUpdate</span>(webCrawlingConfigList, new SpecifyQuery<WebCrawlingConfigCB>() {
-     *     public void specify(WebCrawlingConfigCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(WebCrawlingConfigCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1785,10 +1790,23 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
             final List<WebCrawlingConfig> webCrawlingConfigList,
             final UpdateOption<WebCrawlingConfigCB> option) {
         assertObjectNotNull("webCrawlingConfigList", webCrawlingConfigList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(webCrawlingConfigList, option);
         return delegateBatchUpdate(webCrawlingConfigList, option);
     }
 
+    protected void prepareBatchUpdateOption(
+            final List<WebCrawlingConfig> webCrawlingConfigList,
+            final UpdateOption<WebCrawlingConfigCB> option) {
+        if (option == null) {
+            return;
+        }
+        prepareUpdateOption(option);
+        // under review
+        //if (option.hasSpecifiedUpdateColumn()) {
+        //    option.xgatherUpdateColumnModifiedProperties(webCrawlingConfigList);
+        //}
+    }
+
     @Override
     protected int[] doLumpModify(final List<Entity> ls,
             final UpdateOption<? extends ConditionBean> option) {
@@ -1801,18 +1819,27 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
 
     /**
      * Batch-update the entity list. (SpecifiedColumnsUpdated, ExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * webCrawlingConfigBhv.<span style="color: #FD4747">batchUpdate</span>(webCrawlingConfigList, new SpecifyQuery<WebCrawlingConfigCB>() {
+     *     public void specify(WebCrawlingConfigCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * webCrawlingConfigBhv.<span style="color: #FD4747">batchUpdate</span>(webCrawlingConfigList, new SpecifyQuery<WebCrawlingConfigCB>() {
-     *     public void specify(WebCrawlingConfigCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(WebCrawlingConfigCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>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.</p>
      * @param webCrawlingConfigList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)
@@ -1829,12 +1856,13 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
      * Batch-update the entity list non-strictly. (AllColumnsUpdated, NonExclusiveControl) <br />
      * This method uses executeBatch() of java.sql.PreparedStatement. <br />
      * <span style="color: #FD4747">All columns are update target. {NOT modified only}</span>
-     * So you should the other batchUpdate() method, which you can specify update columns like this:
+     * So you should the other batchUpdateNonstrict() (overload) method for performace,
+     * which you can specify update columns like this:
      * <pre>
      * webCrawlingConfigBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(webCrawlingConfigList, new SpecifyQuery<WebCrawlingConfigCB>() {
-     *     public void specify(WebCrawlingConfigCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(WebCrawlingConfigCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>;
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>;
      *     }
      * });
      * </pre>
@@ -1851,24 +1879,32 @@ public abstract class BsWebCrawlingConfigBhv extends AbstractBehaviorWritable {
             final List<WebCrawlingConfig> webCrawlingConfigList,
             final UpdateOption<WebCrawlingConfigCB> option) {
         assertObjectNotNull("webCrawlingConfigList", webCrawlingConfigList);
-        prepareUpdateOption(option);
+        prepareBatchUpdateOption(webCrawlingConfigList, option);
         return delegateBatchUpdateNonstrict(webCrawlingConfigList, option);
     }
 
     /**
      * Batch-update the entity list non-strictly. (SpecifiedColumnsUpdated, NonExclusiveControl) <br />
-     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
-     * 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 optimistick lock column because they are specified implicitly.
+     * This method uses executeBatch() of java.sql.PreparedStatement.
      * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span> 
+     * webCrawlingConfigBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(webCrawlingConfigList, new SpecifyQuery<WebCrawlingConfigCB>() {
+     *     public void specify(WebCrawlingConfigCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #FD4747">columnBarDate()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *     }
+     * });
+     * <span style="color: #3F7E5E">// e.g. update every column in the table</span> 
      * webCrawlingConfigBhv.<span style="color: #FD4747">batchUpdateNonstrict</span>(webCrawlingConfigList, new SpecifyQuery<WebCrawlingConfigCB>() {
-     *     public void specify(WebCrawlingConfigCB cb) { <span style="color: #3F7E5E">// FOO_STATUS_CODE, BAR_DATE only updated</span>
-     *         cb.specify().columnFooStatusCode();
-     *         cb.specify().columnBarDate();
+     *     public void specify(WebCrawlingConfigCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #FD4747">columnEveryColumn()</span>; <span style="color: #3F7E5E">// no check of modified properties</span>
      *     }
      * });
      * </pre>
+     * <p>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.</p>
+     * <p>And you should specify columns that are modified in any entities (at least one entity).</p>
      * @param webCrawlingConfigList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
      * @param updateColumnSpec The specification of update columns. (NotNull)
      * @return The array of updated count. (NotNull, EmptyAllowed)

+ 496 - 0
src/main/java/jp/sf/fess/db/bsentity/BsJobLog.java

@@ -0,0 +1,496 @@
+/*
+ * Copyright 2009-2013 the Fess 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.JobLog;
+
+import org.seasar.dbflute.Entity;
+import org.seasar.dbflute.dbmeta.DBMeta;
+
+/**
+ * The entity of JOB_LOG as TABLE. <br />
+ * <pre>
+ * [primary-key]
+ *     ID
+ * 
+ * [column]
+ *     ID, JOB_NAME, JOB_STATUS, TARGET, SCRIPT_TYPE, SCRIPT_DATA, SCRIPT_RESULT, START_TIME, END_TIME
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     ID
+ * 
+ * [version-no]
+ *     
+ * 
+ * [foreign table]
+ *     
+ * 
+ * [referrer table]
+ *     
+ * 
+ * [foreign property]
+ *     
+ * 
+ * [referrer property]
+ *     
+ * 
+ * [get/set template]
+ * /= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+ * Long id = entity.getId();
+ * String jobName = entity.getJobName();
+ * String jobStatus = entity.getJobStatus();
+ * String target = entity.getTarget();
+ * String scriptType = entity.getScriptType();
+ * String scriptData = entity.getScriptData();
+ * String scriptResult = entity.getScriptResult();
+ * java.sql.Timestamp startTime = entity.getStartTime();
+ * java.sql.Timestamp endTime = entity.getEndTime();
+ * entity.setId(id);
+ * entity.setJobName(jobName);
+ * entity.setJobStatus(jobStatus);
+ * entity.setTarget(target);
+ * entity.setScriptType(scriptType);
+ * entity.setScriptData(scriptData);
+ * entity.setScriptResult(scriptResult);
+ * entity.setStartTime(startTime);
+ * entity.setEndTime(endTime);
+ * = = = = = = = = = =/
+ * </pre>
+ * @author DBFlute(AutoGenerator)
+ */
+public abstract class BsJobLog 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;
+
+    /** JOB_NAME: {NotNull, VARCHAR(100)} */
+    protected String _jobName;
+
+    /** JOB_STATUS: {NotNull, VARCHAR(10)} */
+    protected String _jobStatus;
+
+    /** TARGET: {NotNull, VARCHAR(100)} */
+    protected String _target;
+
+    /** SCRIPT_TYPE: {NotNull, VARCHAR(100)} */
+    protected String _scriptType;
+
+    /** SCRIPT_DATA: {VARCHAR(4000)} */
+    protected String _scriptData;
+
+    /** SCRIPT_RESULT: {VARCHAR(4000)} */
+    protected String _scriptResult;
+
+    /** START_TIME: {NotNull, TIMESTAMP(23, 10)} */
+    protected java.sql.Timestamp _startTime;
+
+    /** END_TIME: {NotNull, TIMESTAMP(23, 10)} */
+    protected java.sql.Timestamp _endTime;
+
+    // -----------------------------------------------------
+    //                                              Internal
+    //                                              --------
+    /** The modified properties for this entity. (NotNull) */
+    protected final EntityModifiedProperties __modifiedProperties = newModifiedProperties();
+
+    // ===================================================================================
+    //                                                                          Table Name
+    //                                                                          ==========
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getTableDbName() {
+        return "JOB_LOG";
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getTablePropertyName() { // according to Java Beans rule
+        return "jobLog";
+    }
+
+    // ===================================================================================
+    //                                                                              DBMeta
+    //                                                                              ======
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public DBMeta getDBMeta() {
+        return DBMetaInstanceHandler.findDBMeta(getTableDbName());
+    }
+
+    // ===================================================================================
+    //                                                                         Primary Key
+    //                                                                         ===========
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean hasPrimaryKeyValue() {
+        if (getId() == null) {
+            return false;
+        }
+        return true;
+    }
+
+    // ===================================================================================
+    //                                                                    Foreign Property
+    //                                                                    ================
+    // ===================================================================================
+    //                                                                   Referrer Property
+    //                                                                   =================
+    protected <ELEMENT> List<ELEMENT> newReferrerList() {
+        return new ArrayList<ELEMENT>();
+    }
+
+    // ===================================================================================
+    //                                                                 Modified Properties
+    //                                                                 ===================
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Set<String> modifiedProperties() {
+        return __modifiedProperties.getPropertyNames();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void clearModifiedInfo() {
+        __modifiedProperties.clear();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean hasModification() {
+        return !__modifiedProperties.isEmpty();
+    }
+
+    protected EntityModifiedProperties newModifiedProperties() {
+        return new EntityModifiedProperties();
+    }
+
+    // ===================================================================================
+    //                                                                      Basic Override
+    //                                                                      ==============
+    /**
+     * Determine the object is equal with this. <br />
+     * If primary-keys or columns of the other are same as this one, returns true.
+     * @param other The other entity. (NullAllowed: if null, returns false fixedly)
+     * @return Comparing result.
+     */
+    @Override
+    public boolean equals(final Object other) {
+        if (other == null || !(other instanceof BsJobLog)) {
+            return false;
+        }
+        final BsJobLog otherEntity = (BsJobLog) other;
+        if (!xSV(getId(), otherEntity.getId())) {
+            return false;
+        }
+        return true;
+    }
+
+    protected boolean xSV(final Object value1, final Object value2) { // isSameValue()
+        return InternalUtil.isSameValue(value1, value2);
+    }
+
+    /**
+     * Calculate the hash-code from primary-keys or columns.
+     * @return The hash-code from primary-key or columns.
+     */
+    @Override
+    public int hashCode() {
+        int result = 17;
+        result = xCH(result, getTableDbName());
+        result = xCH(result, getId());
+        return result;
+    }
+
+    protected int xCH(final int result, final Object value) { // calculateHashcode()
+        return InternalUtil.calculateHashcode(result, value);
+    }
+
+    /**
+     * {@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(InternalUtil.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 delimiter = ", ";
+        sb.append(delimiter).append(getId());
+        sb.append(delimiter).append(getJobName());
+        sb.append(delimiter).append(getJobStatus());
+        sb.append(delimiter).append(getTarget());
+        sb.append(delimiter).append(getScriptType());
+        sb.append(delimiter).append(getScriptData());
+        sb.append(delimiter).append(getScriptResult());
+        sb.append(delimiter).append(getStartTime());
+        sb.append(delimiter).append(getEndTime());
+        if (sb.length() > delimiter.length()) {
+            sb.delete(0, delimiter.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 JobLog clone() {
+        try {
+            return (JobLog) super.clone();
+        } catch (final CloneNotSupportedException e) {
+            throw new IllegalStateException("Failed to clone the entity: "
+                    + toString(), e);
+        }
+    }
+
+    // ===================================================================================
+    //                                                                            Accessor
+    //                                                                            ========
+    /**
+     * [get] ID: {PK, ID, NotNull, BIGINT(19)} <br />
+     * @return The value of the column 'ID'. (basically NotNull if selected: for the constraint)
+     */
+    public Long getId() {
+        return _id;
+    }
+
+    /**
+     * [set] ID: {PK, ID, NotNull, BIGINT(19)} <br />
+     * @param id The value of the column 'ID'. (basically NotNull if update: for the constraint)
+     */
+    public void setId(final Long id) {
+        __modifiedProperties.addPropertyName("id");
+        _id = id;
+    }
+
+    /**
+     * [get] JOB_NAME: {NotNull, VARCHAR(100)} <br />
+     * @return The value of the column 'JOB_NAME'. (basically NotNull if selected: for the constraint)
+     */
+    public String getJobName() {
+        return _jobName;
+    }
+
+    /**
+     * [set] JOB_NAME: {NotNull, VARCHAR(100)} <br />
+     * @param jobName The value of the column 'JOB_NAME'. (basically NotNull if update: for the constraint)
+     */
+    public void setJobName(final String jobName) {
+        __modifiedProperties.addPropertyName("jobName");
+        _jobName = jobName;
+    }
+
+    /**
+     * [get] JOB_STATUS: {NotNull, VARCHAR(10)} <br />
+     * @return The value of the column 'JOB_STATUS'. (basically NotNull if selected: for the constraint)
+     */
+    public String getJobStatus() {
+        return _jobStatus;
+    }
+
+    /**
+     * [set] JOB_STATUS: {NotNull, VARCHAR(10)} <br />
+     * @param jobStatus The value of the column 'JOB_STATUS'. (basically NotNull if update: for the constraint)
+     */
+    public void setJobStatus(final String jobStatus) {
+        __modifiedProperties.addPropertyName("jobStatus");
+        _jobStatus = jobStatus;
+    }
+
+    /**
+     * [get] TARGET: {NotNull, VARCHAR(100)} <br />
+     * @return The value of the column 'TARGET'. (basically NotNull if selected: for the constraint)
+     */
+    public String getTarget() {
+        return _target;
+    }
+
+    /**
+     * [set] TARGET: {NotNull, VARCHAR(100)} <br />
+     * @param target The value of the column 'TARGET'. (basically NotNull if update: for the constraint)
+     */
+    public void setTarget(final String target) {
+        __modifiedProperties.addPropertyName("target");
+        _target = target;
+    }
+
+    /**
+     * [get] SCRIPT_TYPE: {NotNull, VARCHAR(100)} <br />
+     * @return The value of the column 'SCRIPT_TYPE'. (basically NotNull if selected: for the constraint)
+     */
+    public String getScriptType() {
+        return _scriptType;
+    }
+
+    /**
+     * [set] SCRIPT_TYPE: {NotNull, VARCHAR(100)} <br />
+     * @param scriptType The value of the column 'SCRIPT_TYPE'. (basically NotNull if update: for the constraint)
+     */
+    public void setScriptType(final String scriptType) {
+        __modifiedProperties.addPropertyName("scriptType");
+        _scriptType = scriptType;
+    }
+
+    /**
+     * [get] SCRIPT_DATA: {VARCHAR(4000)} <br />
+     * @return The value of the column 'SCRIPT_DATA'. (NullAllowed even if selected: for no constraint)
+     */
+    public String getScriptData() {
+        return _scriptData;
+    }
+
+    /**
+     * [set] SCRIPT_DATA: {VARCHAR(4000)} <br />
+     * @param scriptData The value of the column 'SCRIPT_DATA'. (NullAllowed: null update allowed for no constraint)
+     */
+    public void setScriptData(final String scriptData) {
+        __modifiedProperties.addPropertyName("scriptData");
+        _scriptData = scriptData;
+    }
+
+    /**
+     * [get] SCRIPT_RESULT: {VARCHAR(4000)} <br />
+     * @return The value of the column 'SCRIPT_RESULT'. (NullAllowed even if selected: for no constraint)
+     */
+    public String getScriptResult() {
+        return _scriptResult;
+    }
+
+    /**
+     * [set] SCRIPT_RESULT: {VARCHAR(4000)} <br />
+     * @param scriptResult The value of the column 'SCRIPT_RESULT'. (NullAllowed: null update allowed for no constraint)
+     */
+    public void setScriptResult(final String scriptResult) {
+        __modifiedProperties.addPropertyName("scriptResult");
+        _scriptResult = scriptResult;
+    }
+
+    /**
+     * [get] START_TIME: {NotNull, TIMESTAMP(23, 10)} <br />
+     * @return The value of the column 'START_TIME'. (basically NotNull if selected: for the constraint)
+     */
+    public java.sql.Timestamp getStartTime() {
+        return _startTime;
+    }
+
+    /**
+     * [set] START_TIME: {NotNull, TIMESTAMP(23, 10)} <br />
+     * @param startTime The value of the column 'START_TIME'. (basically NotNull if update: for the constraint)
+     */
+    public void setStartTime(final java.sql.Timestamp startTime) {
+        __modifiedProperties.addPropertyName("startTime");
+        _startTime = startTime;
+    }
+
+    /**
+     * [get] END_TIME: {NotNull, TIMESTAMP(23, 10)} <br />
+     * @return The value of the column 'END_TIME'. (basically NotNull if selected: for the constraint)
+     */
+    public java.sql.Timestamp getEndTime() {
+        return _endTime;
+    }
+
+    /**
+     * [set] END_TIME: {NotNull, TIMESTAMP(23, 10)} <br />
+     * @param endTime The value of the column 'END_TIME'. (basically NotNull if update: for the constraint)
+     */
+    public void setEndTime(final java.sql.Timestamp endTime) {
+        __modifiedProperties.addPropertyName("endTime");
+        _endTime = endTime;
+    }
+}

+ 657 - 0
src/main/java/jp/sf/fess/db/bsentity/BsScheduledJob.java

@@ -0,0 +1,657 @@
+/*
+ * Copyright 2009-2013 the Fess 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.ScheduledJob;
+
+import org.seasar.dbflute.Entity;
+import org.seasar.dbflute.dbmeta.DBMeta;
+
+/**
+ * The entity of SCHEDULED_JOB as TABLE. <br />
+ * <pre>
+ * [primary-key]
+ *     ID
+ * 
+ * [column]
+ *     ID, NAME, TARGET, CRON_EXPRESSION, SCRIPT_TYPE, SCRIPT_DATA, CRAWLER, JOB_LOGGING, 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 name = entity.getName();
+ * String target = entity.getTarget();
+ * String cronExpression = entity.getCronExpression();
+ * String scriptType = entity.getScriptType();
+ * String scriptData = entity.getScriptData();
+ * String crawler = entity.getCrawler();
+ * String jobLogging = entity.getJobLogging();
+ * 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.setName(name);
+ * entity.setTarget(target);
+ * entity.setCronExpression(cronExpression);
+ * entity.setScriptType(scriptType);
+ * entity.setScriptData(scriptData);
+ * entity.setCrawler(crawler);
+ * entity.setJobLogging(jobLogging);
+ * entity.setSortOrder(sortOrder);
+ * entity.setCreatedBy(createdBy);
+ * entity.setCreatedTime(createdTime);
+ * entity.setUpdatedBy(updatedBy);
+ * entity.setUpdatedTime(updatedTime);
+ * entity.setDeletedBy(deletedBy);
+ * entity.setDeletedTime(deletedTime);
+ * entity.setVersionNo(versionNo);
+ * = = = = = = = = = =/
+ * </pre>
+ * @author DBFlute(AutoGenerator)
+ */
+public abstract class BsScheduledJob 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;
+
+    /** NAME: {NotNull, VARCHAR(100)} */
+    protected String _name;
+
+    /** TARGET: {NotNull, VARCHAR(100)} */
+    protected String _target;
+
+    /** CRON_EXPRESSION: {NotNull, VARCHAR(100)} */
+    protected String _cronExpression;
+
+    /** SCRIPT_TYPE: {NotNull, VARCHAR(100)} */
+    protected String _scriptType;
+
+    /** SCRIPT_DATA: {VARCHAR(4000)} */
+    protected String _scriptData;
+
+    /** CRAWLER: {NotNull, VARCHAR(1)} */
+    protected String _crawler;
+
+    /** JOB_LOGGING: {NotNull, VARCHAR(1)} */
+    protected String _jobLogging;
+
+    /** 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 modified properties for this entity. (NotNull) */
+    protected final EntityModifiedProperties __modifiedProperties = newModifiedProperties();
+
+    // ===================================================================================
+    //                                                                          Table Name
+    //                                                                          ==========
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getTableDbName() {
+        return "SCHEDULED_JOB";
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getTablePropertyName() { // according to Java Beans rule
+        return "scheduledJob";
+    }
+
+    // ===================================================================================
+    //                                                                              DBMeta
+    //                                                                              ======
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public DBMeta getDBMeta() {
+        return DBMetaInstanceHandler.findDBMeta(getTableDbName());
+    }
+
+    // ===================================================================================
+    //                                                                         Primary Key
+    //                                                                         ===========
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean hasPrimaryKeyValue() {
+        if (getId() == null) {
+            return false;
+        }
+        return true;
+    }
+
+    // ===================================================================================
+    //                                                                    Foreign Property
+    //                                                                    ================
+    // ===================================================================================
+    //                                                                   Referrer Property
+    //                                                                   =================
+    protected <ELEMENT> List<ELEMENT> newReferrerList() {
+        return new ArrayList<ELEMENT>();
+    }
+
+    // ===================================================================================
+    //                                                                 Modified Properties
+    //                                                                 ===================
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Set<String> modifiedProperties() {
+        return __modifiedProperties.getPropertyNames();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void clearModifiedInfo() {
+        __modifiedProperties.clear();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean hasModification() {
+        return !__modifiedProperties.isEmpty();
+    }
+
+    protected EntityModifiedProperties newModifiedProperties() {
+        return new EntityModifiedProperties();
+    }
+
+    // ===================================================================================
+    //                                                                      Basic Override
+    //                                                                      ==============
+    /**
+     * Determine the object is equal with this. <br />
+     * If primary-keys or columns of the other are same as this one, returns true.
+     * @param other The other entity. (NullAllowed: if null, returns false fixedly)
+     * @return Comparing result.
+     */
+    @Override
+    public boolean equals(final Object other) {
+        if (other == null || !(other instanceof BsScheduledJob)) {
+            return false;
+        }
+        final BsScheduledJob otherEntity = (BsScheduledJob) other;
+        if (!xSV(getId(), otherEntity.getId())) {
+            return false;
+        }
+        return true;
+    }
+
+    protected boolean xSV(final Object value1, final Object value2) { // isSameValue()
+        return InternalUtil.isSameValue(value1, value2);
+    }
+
+    /**
+     * Calculate the hash-code from primary-keys or columns.
+     * @return The hash-code from primary-key or columns.
+     */
+    @Override
+    public int hashCode() {
+        int result = 17;
+        result = xCH(result, getTableDbName());
+        result = xCH(result, getId());
+        return result;
+    }
+
+    protected int xCH(final int result, final Object value) { // calculateHashcode()
+        return InternalUtil.calculateHashcode(result, value);
+    }
+
+    /**
+     * {@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(InternalUtil.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 delimiter = ", ";
+        sb.append(delimiter).append(getId());
+        sb.append(delimiter).append(getName());
+        sb.append(delimiter).append(getTarget());
+        sb.append(delimiter).append(getCronExpression());
+        sb.append(delimiter).append(getScriptType());
+        sb.append(delimiter).append(getScriptData());
+        sb.append(delimiter).append(getCrawler());
+        sb.append(delimiter).append(getJobLogging());
+        sb.append(delimiter).append(getSortOrder());
+        sb.append(delimiter).append(getCreatedBy());
+        sb.append(delimiter).append(getCreatedTime());
+        sb.append(delimiter).append(getUpdatedBy());
+        sb.append(delimiter).append(getUpdatedTime());
+        sb.append(delimiter).append(getDeletedBy());
+        sb.append(delimiter).append(getDeletedTime());
+        sb.append(delimiter).append(getVersionNo());
+        if (sb.length() > delimiter.length()) {
+            sb.delete(0, delimiter.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 ScheduledJob clone() {
+        try {
+            return (ScheduledJob) super.clone();
+        } catch (final CloneNotSupportedException e) {
+            throw new IllegalStateException("Failed to clone the entity: "
+                    + toString(), e);
+        }
+    }
+
+    // ===================================================================================
+    //                                                                            Accessor
+    //                                                                            ========
+    /**
+     * [get] ID: {PK, ID, NotNull, BIGINT(19)} <br />
+     * @return The value of the column 'ID'. (basically NotNull if selected: for the constraint)
+     */
+    public Long getId() {
+        return _id;
+    }
+
+    /**
+     * [set] ID: {PK, ID, NotNull, BIGINT(19)} <br />
+     * @param id The value of the column 'ID'. (basically NotNull if update: for the constraint)
+     */
+    public void setId(final Long id) {
+        __modifiedProperties.addPropertyName("id");
+        _id = id;
+    }
+
+    /**
+     * [get] NAME: {NotNull, VARCHAR(100)} <br />
+     * @return The value of the column 'NAME'. (basically NotNull if selected: for the constraint)
+     */
+    public String getName() {
+        return _name;
+    }
+
+    /**
+     * [set] NAME: {NotNull, VARCHAR(100)} <br />
+     * @param name The value of the column 'NAME'. (basically NotNull if update: for the constraint)
+     */
+    public void setName(final String name) {
+        __modifiedProperties.addPropertyName("name");
+        _name = name;
+    }
+
+    /**
+     * [get] TARGET: {NotNull, VARCHAR(100)} <br />
+     * @return The value of the column 'TARGET'. (basically NotNull if selected: for the constraint)
+     */
+    public String getTarget() {
+        return _target;
+    }
+
+    /**
+     * [set] TARGET: {NotNull, VARCHAR(100)} <br />
+     * @param target The value of the column 'TARGET'. (basically NotNull if update: for the constraint)
+     */
+    public void setTarget(final String target) {
+        __modifiedProperties.addPropertyName("target");
+        _target = target;
+    }
+
+    /**
+     * [get] CRON_EXPRESSION: {NotNull, VARCHAR(100)} <br />
+     * @return The value of the column 'CRON_EXPRESSION'. (basically NotNull if selected: for the constraint)
+     */
+    public String getCronExpression() {
+        return _cronExpression;
+    }
+
+    /**
+     * [set] CRON_EXPRESSION: {NotNull, VARCHAR(100)} <br />
+     * @param cronExpression The value of the column 'CRON_EXPRESSION'. (basically NotNull if update: for the constraint)
+     */
+    public void setCronExpression(final String cronExpression) {
+        __modifiedProperties.addPropertyName("cronExpression");
+        _cronExpression = cronExpression;
+    }
+
+    /**
+     * [get] SCRIPT_TYPE: {NotNull, VARCHAR(100)} <br />
+     * @return The value of the column 'SCRIPT_TYPE'. (basically NotNull if selected: for the constraint)
+     */
+    public String getScriptType() {
+        return _scriptType;
+    }
+
+    /**
+     * [set] SCRIPT_TYPE: {NotNull, VARCHAR(100)} <br />
+     * @param scriptType The value of the column 'SCRIPT_TYPE'. (basically NotNull if update: for the constraint)
+     */
+    public void setScriptType(final String scriptType) {
+        __modifiedProperties.addPropertyName("scriptType");
+        _scriptType = scriptType;
+    }
+
+    /**
+     * [get] SCRIPT_DATA: {VARCHAR(4000)} <br />
+     * @return The value of the column 'SCRIPT_DATA'. (NullAllowed even if selected: for no constraint)
+     */
+    public String getScriptData() {
+        return _scriptData;
+    }
+
+    /**
+     * [set] SCRIPT_DATA: {VARCHAR(4000)} <br />
+     * @param scriptData The value of the column 'SCRIPT_DATA'. (NullAllowed: null update allowed for no constraint)
+     */
+    public void setScriptData(final String scriptData) {
+        __modifiedProperties.addPropertyName("scriptData");
+        _scriptData = scriptData;
+    }
+
+    /**
+     * [get] CRAWLER: {NotNull, VARCHAR(1)} <br />
+     * @return The value of the column 'CRAWLER'. (basically NotNull if selected: for the constraint)
+     */
+    public String getCrawler() {
+        return _crawler;
+    }
+
+    /**
+     * [set] CRAWLER: {NotNull, VARCHAR(1)} <br />
+     * @param crawler The value of the column 'CRAWLER'. (basically NotNull if update: for the constraint)
+     */
+    public void setCrawler(final String crawler) {
+        __modifiedProperties.addPropertyName("crawler");
+        _crawler = crawler;
+    }
+
+    /**
+     * [get] JOB_LOGGING: {NotNull, VARCHAR(1)} <br />
+     * @return The value of the column 'JOB_LOGGING'. (basically NotNull if selected: for the constraint)
+     */
+    public String getJobLogging() {
+        return _jobLogging;
+    }
+
+    /**
+     * [set] JOB_LOGGING: {NotNull, VARCHAR(1)} <br />
+     * @param jobLogging The value of the column 'JOB_LOGGING'. (basically NotNull if update: for the constraint)
+     */
+    public void setJobLogging(final String jobLogging) {
+        __modifiedProperties.addPropertyName("jobLogging");
+        _jobLogging = jobLogging;
+    }
+
+    /**
+     * [get] SORT_ORDER: {NotNull, INTEGER(10)} <br />
+     * @return The value of the column 'SORT_ORDER'. (basically NotNull if selected: for the constraint)
+     */
+    public Integer getSortOrder() {
+        return _sortOrder;
+    }
+
+    /**
+     * [set] SORT_ORDER: {NotNull, INTEGER(10)} <br />
+     * @param sortOrder The value of the column 'SORT_ORDER'. (basically NotNull if update: for the constraint)
+     */
+    public void setSortOrder(final Integer sortOrder) {
+        __modifiedProperties.addPropertyName("sortOrder");
+        _sortOrder = sortOrder;
+    }
+
+    /**
+     * [get] CREATED_BY: {NotNull, VARCHAR(255)} <br />
+     * @return The value of the column 'CREATED_BY'. (basically NotNull if selected: for the constraint)
+     */
+    public String getCreatedBy() {
+        return _createdBy;
+    }
+
+    /**
+     * [set] CREATED_BY: {NotNull, VARCHAR(255)} <br />
+     * @param createdBy The value of the column 'CREATED_BY'. (basically NotNull if update: for the constraint)
+     */
+    public void setCreatedBy(final String createdBy) {
+        __modifiedProperties.addPropertyName("createdBy");
+        _createdBy = createdBy;
+    }
+
+    /**
+     * [get] CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} <br />
+     * @return The value of the column 'CREATED_TIME'. (basically NotNull if selected: for the constraint)
+     */
+    public java.sql.Timestamp getCreatedTime() {
+        return _createdTime;
+    }
+
+    /**
+     * [set] CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} <br />
+     * @param createdTime The value of the column 'CREATED_TIME'. (basically NotNull if update: for the constraint)
+     */
+    public void setCreatedTime(final java.sql.Timestamp createdTime) {
+        __modifiedProperties.addPropertyName("createdTime");
+        _createdTime = createdTime;
+    }
+
+    /**
+     * [get] UPDATED_BY: {VARCHAR(255)} <br />
+     * @return The value of the column 'UPDATED_BY'. (NullAllowed even if selected: for no constraint)
+     */
+    public String getUpdatedBy() {
+        return _updatedBy;
+    }
+
+    /**
+     * [set] UPDATED_BY: {VARCHAR(255)} <br />
+     * @param updatedBy The value of the column 'UPDATED_BY'. (NullAllowed: null update allowed for no constraint)
+     */
+    public void setUpdatedBy(final String updatedBy) {
+        __modifiedProperties.addPropertyName("updatedBy");
+        _updatedBy = updatedBy;
+    }
+
+    /**
+     * [get] UPDATED_TIME: {TIMESTAMP(23, 10)} <br />
+     * @return The value of the column 'UPDATED_TIME'. (NullAllowed even if selected: for no constraint)
+     */
+    public java.sql.Timestamp getUpdatedTime() {
+        return _updatedTime;
+    }
+
+    /**
+     * [set] UPDATED_TIME: {TIMESTAMP(23, 10)} <br />
+     * @param updatedTime The value of the column 'UPDATED_TIME'. (NullAllowed: null update allowed for no constraint)
+     */
+    public void setUpdatedTime(final java.sql.Timestamp updatedTime) {
+        __modifiedProperties.addPropertyName("updatedTime");
+        _updatedTime = updatedTime;
+    }
+
+    /**
+     * [get] DELETED_BY: {VARCHAR(255)} <br />
+     * @return The value of the column 'DELETED_BY'. (NullAllowed even if selected: for no constraint)
+     */
+    public String getDeletedBy() {
+        return _deletedBy;
+    }
+
+    /**
+     * [set] DELETED_BY: {VARCHAR(255)} <br />
+     * @param deletedBy The value of the column 'DELETED_BY'. (NullAllowed: null update allowed for no constraint)
+     */
+    public void setDeletedBy(final String deletedBy) {
+        __modifiedProperties.addPropertyName("deletedBy");
+        _deletedBy = deletedBy;
+    }
+
+    /**
+     * [get] DELETED_TIME: {TIMESTAMP(23, 10)} <br />
+     * @return The value of the column 'DELETED_TIME'. (NullAllowed even if selected: for no constraint)
+     */
+    public java.sql.Timestamp getDeletedTime() {
+        return _deletedTime;
+    }
+
+    /**
+     * [set] DELETED_TIME: {TIMESTAMP(23, 10)} <br />
+     * @param deletedTime The value of the column 'DELETED_TIME'. (NullAllowed: null update allowed for no constraint)
+     */
+    public void setDeletedTime(final java.sql.Timestamp deletedTime) {
+        __modifiedProperties.addPropertyName("deletedTime");
+        _deletedTime = deletedTime;
+    }
+
+    /**
+     * [get] VERSION_NO: {NotNull, INTEGER(10)} <br />
+     * @return The value of the column 'VERSION_NO'. (basically NotNull if selected: for the constraint)
+     */
+    public Integer getVersionNo() {
+        return _versionNo;
+    }
+
+    /**
+     * [set] VERSION_NO: {NotNull, INTEGER(10)} <br />
+     * @param versionNo The value of the column 'VERSION_NO'. (basically NotNull if update: for the constraint)
+     */
+    public void setVersionNo(final Integer versionNo) {
+        __modifiedProperties.addPropertyName("versionNo");
+        _versionNo = versionNo;
+    }
+}

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/BrowserTypeDbm.java

@@ -258,7 +258,7 @@ public class BrowserTypeDbm extends AbstractDBMeta {
             "BIGINT",
             19,
             0,
-            "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_3728D771_5011_423B_9471_A328218330D3",
+            "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_3392AAC5_099C_4649_A986_4AF80596489F",
             false,
             null,
             null,

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/ClickLogDbm.java

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

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/CrawlingSessionDbm.java

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

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/CrawlingSessionInfoDbm.java

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

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataConfigToBrowserTypeMappingDbm.java

@@ -154,7 +154,7 @@ public class DataConfigToBrowserTypeMappingDbm extends AbstractDBMeta {
             "BIGINT",
             19,
             0,
-            "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_FBD9049C_74D1_419F_AF2F_BD1263E701AB",
+            "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_40D8F041_EECB_4CC1_8B5F_F87D92B71A58",
             false, null, null, null, null, null);
 
     protected final ColumnInfo _columnDataConfigId = cci("DATA_CONFIG_ID",

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataConfigToLabelTypeMappingDbm.java

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

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataConfigToRoleTypeMappingDbm.java

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

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/DataCrawlingConfigDbm.java

@@ -310,7 +310,7 @@ public class DataCrawlingConfigDbm extends AbstractDBMeta {
             "BIGINT",
             19,
             0,
-            "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_C6E511E5_1101_4B23_B1D3_A7F37196976E",
+            "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_69485FF1_9248_4CA0_B20B_21AAF4A55C3B",
             false,
             null,
             null,

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/FailureUrlDbm.java

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

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/FavoriteLogDbm.java

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

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileAuthenticationDbm.java

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

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileConfigToBrowserTypeMappingDbm.java

@@ -154,7 +154,7 @@ public class FileConfigToBrowserTypeMappingDbm extends AbstractDBMeta {
             "BIGINT",
             19,
             0,
-            "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_8A5523D6_FE81_49EB_9D46_6E77E08C9C3A",
+            "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_4A2AE538_DD96_4228_A294_A736985F4E59",
             false, null, null, null, null, null);
 
     protected final ColumnInfo _columnFileConfigId = cci("FILE_CONFIG_ID",

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileConfigToLabelTypeMappingDbm.java

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

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileConfigToRoleTypeMappingDbm.java

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

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/FileCrawlingConfigDbm.java

@@ -401,7 +401,7 @@ public class FileCrawlingConfigDbm extends AbstractDBMeta {
             "BIGINT",
             19,
             0,
-            "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_BE942DC5_22D5_4C59_9BD6_5A2FFADE870C",
+            "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_09028F6B_6A9E_45FE_8673_AD297EA85046",
             false,
             null,
             null,

+ 430 - 0
src/main/java/jp/sf/fess/db/bsentity/dbmeta/JobLogDbm.java

@@ -0,0 +1,430 @@
+/*
+ * Copyright 2009-2013 the Fess 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.JobLog;
+
+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 JOB_LOG. (Singleton)
+ * @author DBFlute(AutoGenerator)
+ */
+public class JobLogDbm extends AbstractDBMeta {
+
+    // ===================================================================================
+    //                                                                           Singleton
+    //                                                                           =========
+    private static final JobLogDbm _instance = new JobLogDbm();
+
+    private JobLogDbm() {
+    }
+
+    public static JobLogDbm getInstance() {
+        return _instance;
+    }
+
+    // ===================================================================================
+    //                                                                       Current DBDef
+    //                                                                       =============
+    @Override
+    public DBDef getCurrentDBDef() {
+        return DBCurrent.getInstance().currentDBDef();
+    }
+
+    // ===================================================================================
+    //                                                                    Property Gateway
+    //                                                                    ================
+    protected final Map<String, PropertyGateway> _epgMap = newHashMap();
+    {
+        setupEpg(_epgMap, new EpgId(), "id");
+        setupEpg(_epgMap, new EpgJobName(), "jobName");
+        setupEpg(_epgMap, new EpgJobStatus(), "jobStatus");
+        setupEpg(_epgMap, new EpgTarget(), "target");
+        setupEpg(_epgMap, new EpgScriptType(), "scriptType");
+        setupEpg(_epgMap, new EpgScriptData(), "scriptData");
+        setupEpg(_epgMap, new EpgScriptResult(), "scriptResult");
+        setupEpg(_epgMap, new EpgStartTime(), "startTime");
+        setupEpg(_epgMap, new EpgEndTime(), "endTime");
+    }
+
+    @Override
+    public PropertyGateway findPropertyGateway(final String propertyName) {
+        return doFindEpg(_epgMap, propertyName);
+    }
+
+    public static class EpgId implements PropertyGateway {
+        @Override
+        public Object read(final Entity e) {
+            return ((JobLog) e).getId();
+        }
+
+        @Override
+        public void write(final Entity e, final Object v) {
+            ((JobLog) e).setId(ctl(v));
+        }
+    }
+
+    public static class EpgJobName implements PropertyGateway {
+        @Override
+        public Object read(final Entity e) {
+            return ((JobLog) e).getJobName();
+        }
+
+        @Override
+        public void write(final Entity e, final Object v) {
+            ((JobLog) e).setJobName((String) v);
+        }
+    }
+
+    public static class EpgJobStatus implements PropertyGateway {
+        @Override
+        public Object read(final Entity e) {
+            return ((JobLog) e).getJobStatus();
+        }
+
+        @Override
+        public void write(final Entity e, final Object v) {
+            ((JobLog) e).setJobStatus((String) v);
+        }
+    }
+
+    public static class EpgTarget implements PropertyGateway {
+        @Override
+        public Object read(final Entity e) {
+            return ((JobLog) e).getTarget();
+        }
+
+        @Override
+        public void write(final Entity e, final Object v) {
+            ((JobLog) e).setTarget((String) v);
+        }
+    }
+
+    public static class EpgScriptType implements PropertyGateway {
+        @Override
+        public Object read(final Entity e) {
+            return ((JobLog) e).getScriptType();
+        }
+
+        @Override
+        public void write(final Entity e, final Object v) {
+            ((JobLog) e).setScriptType((String) v);
+        }
+    }
+
+    public static class EpgScriptData implements PropertyGateway {
+        @Override
+        public Object read(final Entity e) {
+            return ((JobLog) e).getScriptData();
+        }
+
+        @Override
+        public void write(final Entity e, final Object v) {
+            ((JobLog) e).setScriptData((String) v);
+        }
+    }
+
+    public static class EpgScriptResult implements PropertyGateway {
+        @Override
+        public Object read(final Entity e) {
+            return ((JobLog) e).getScriptResult();
+        }
+
+        @Override
+        public void write(final Entity e, final Object v) {
+            ((JobLog) e).setScriptResult((String) v);
+        }
+    }
+
+    public static class EpgStartTime implements PropertyGateway {
+        @Override
+        public Object read(final Entity e) {
+            return ((JobLog) e).getStartTime();
+        }
+
+        @Override
+        public void write(final Entity e, final Object v) {
+            ((JobLog) e).setStartTime((java.sql.Timestamp) v);
+        }
+    }
+
+    public static class EpgEndTime implements PropertyGateway {
+        @Override
+        public Object read(final Entity e) {
+            return ((JobLog) e).getEndTime();
+        }
+
+        @Override
+        public void write(final Entity e, final Object v) {
+            ((JobLog) e).setEndTime((java.sql.Timestamp) v);
+        }
+    }
+
+    // ===================================================================================
+    //                                                                          Table Info
+    //                                                                          ==========
+    protected final String _tableDbName = "JOB_LOG";
+
+    protected final String _tablePropertyName = "jobLog";
+
+    protected final TableSqlName _tableSqlName = new TableSqlName("JOB_LOG",
+            _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,
+            true,
+            "id",
+            Long.class,
+            true,
+            true,
+            "BIGINT",
+            19,
+            0,
+            "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_AE8C1452_543B_41AD_8DB1_D6C703814D9E",
+            false, null, null, null, null, null);
+
+    protected final ColumnInfo _columnJobName = cci("JOB_NAME", "JOB_NAME",
+            null, null, true, "jobName", String.class, false, false, "VARCHAR",
+            100, 0, null, false, null, null, null, null, null);
+
+    protected final ColumnInfo _columnJobStatus = cci("JOB_STATUS",
+            "JOB_STATUS", null, null, true, "jobStatus", String.class, false,
+            false, "VARCHAR", 10, 0, null, false, null, null, null, null, null);
+
+    protected final ColumnInfo _columnTarget = cci("TARGET", "TARGET", null,
+            null, true, "target", String.class, false, false, "VARCHAR", 100,
+            0, null, false, null, null, null, null, null);
+
+    protected final ColumnInfo _columnScriptType = cci("SCRIPT_TYPE",
+            "SCRIPT_TYPE", null, null, true, "scriptType", String.class, false,
+            false, "VARCHAR", 100, 0, null, false, null, null, null, null, null);
+
+    protected final ColumnInfo _columnScriptData = cci("SCRIPT_DATA",
+            "SCRIPT_DATA", null, null, false, "scriptData", String.class,
+            false, false, "VARCHAR", 4000, 0, null, false, null, null, null,
+            null, null);
+
+    protected final ColumnInfo _columnScriptResult = cci("SCRIPT_RESULT",
+            "SCRIPT_RESULT", null, null, false, "scriptResult", String.class,
+            false, false, "VARCHAR", 4000, 0, null, false, null, null, null,
+            null, null);
+
+    protected final ColumnInfo _columnStartTime = cci("START_TIME",
+            "START_TIME", null, null, true, "startTime",
+            java.sql.Timestamp.class, false, false, "TIMESTAMP", 23, 10, null,
+            false, null, null, null, null, null);
+
+    protected final ColumnInfo _columnEndTime = cci("END_TIME", "END_TIME",
+            null, null, true, "endTime", java.sql.Timestamp.class, false,
+            false, "TIMESTAMP", 23, 10, null, false, null, null, null, null,
+            null);
+
+    public ColumnInfo columnId() {
+        return _columnId;
+    }
+
+    public ColumnInfo columnJobName() {
+        return _columnJobName;
+    }
+
+    public ColumnInfo columnJobStatus() {
+        return _columnJobStatus;
+    }
+
+    public ColumnInfo columnTarget() {
+        return _columnTarget;
+    }
+
+    public ColumnInfo columnScriptType() {
+        return _columnScriptType;
+    }
+
+    public ColumnInfo columnScriptData() {
+        return _columnScriptData;
+    }
+
+    public ColumnInfo columnScriptResult() {
+        return _columnScriptResult;
+    }
+
+    public ColumnInfo columnStartTime() {
+        return _columnStartTime;
+    }
+
+    public ColumnInfo columnEndTime() {
+        return _columnEndTime;
+    }
+
+    @Override
+    protected List<ColumnInfo> ccil() {
+        final List<ColumnInfo> ls = newArrayList();
+        ls.add(columnId());
+        ls.add(columnJobName());
+        ls.add(columnJobStatus());
+        ls.add(columnTarget());
+        ls.add(columnScriptType());
+        ls.add(columnScriptData());
+        ls.add(columnScriptResult());
+        ls.add(columnStartTime());
+        ls.add(columnEndTime());
+        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
+    //                                                                       =============
+    // -----------------------------------------------------
+    //                                      Foreign Property
+    //                                      ----------------
+
+    // -----------------------------------------------------
+    //                                     Referrer Property
+    //                                     -----------------
+
+    // ===================================================================================
+    //                                                                        Various Info
+    //                                                                        ============
+    @Override
+    public boolean hasIdentity() {
+        return true;
+    }
+
+    // ===================================================================================
+    //                                                                           Type Name
+    //                                                                           =========
+    @Override
+    public String getEntityTypeName() {
+        return "jp.sf.fess.db.exentity.JobLog";
+    }
+
+    @Override
+    public String getConditionBeanTypeName() {
+        return "jp.sf.fess.db.cbean.JobLogCB";
+    }
+
+    @Override
+    public String getBehaviorTypeName() {
+        return "jp.sf.fess.db.exbhv.JobLogBhv";
+    }
+
+    // ===================================================================================
+    //                                                                         Object Type
+    //                                                                         ===========
+    @Override
+    public Class<JobLog> getEntityType() {
+        return JobLog.class;
+    }
+
+    // ===================================================================================
+    //                                                                     Object Instance
+    //                                                                     ===============
+    @Override
+    public Entity newEntity() {
+        return newMyEntity();
+    }
+
+    public JobLog newMyEntity() {
+        return new JobLog();
+    }
+
+    // ===================================================================================
+    //                                                                   Map Communication
+    //                                                                   =================
+    @Override
+    public void acceptPrimaryKeyMap(final Entity e,
+            final Map<String, ? extends Object> m) {
+        doAcceptPrimaryKeyMap((JobLog) e, m);
+    }
+
+    @Override
+    public void acceptAllColumnMap(final Entity e,
+            final Map<String, ? extends Object> m) {
+        doAcceptAllColumnMap((JobLog) e, m);
+    }
+
+    @Override
+    public Map<String, Object> extractPrimaryKeyMap(final Entity e) {
+        return doExtractPrimaryKeyMap(e);
+    }
+
+    @Override
+    public Map<String, Object> extractAllColumnMap(final Entity e) {
+        return doExtractAllColumnMap(e);
+    }
+}

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/LabelTypeDbm.java

@@ -284,7 +284,7 @@ public class LabelTypeDbm extends AbstractDBMeta {
             "BIGINT",
             19,
             0,
-            "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_8B12BD6C_F878_4248_B1D5_C0E0662CFA9E",
+            "NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_ABD3A922_F562_4CF2_88C4_697DDDA4D94F",
             false,
             null,
             null,

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/LabelTypeToRoleTypeMappingDbm.java

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

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/OverlappingHostDbm.java

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

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/PathMappingDbm.java

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

+ 1 - 1
src/main/java/jp/sf/fess/db/bsentity/dbmeta/RequestHeaderDbm.java

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

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików