Shinsuke Sugaya 11 سال پیش
والد
کامیت
2c4cbab53b
100فایلهای تغییر یافته به همراه14517 افزوده شده و 9972 حذف شده
  1. 1 0
      .gitignore
  2. 0 14
      .project
  3. 1 1
      dbflute_h2/_project.bat
  4. 1 1
      dbflute_h2/_project.sh
  5. 3 3
      dbflute_h2/dfprop/basicInfoMap.dfprop
  6. 2 2
      dbflute_h2/dfprop/documentDefinitionMap.dfprop
  7. 9 6
      dbflute_h2/dfprop/includeQueryMap.dfprop
  8. 1 0
      dbflute_h2/dfprop/typeMappingMap.dfprop
  9. 1 1
      dbflute_h2/doc.sh
  10. 1 1
      dbflute_h2/generate.sh
  11. 1 1
      dbflute_h2/jdbc.sh
  12. 1 1
      dbflute_h2/manage.sh
  13. 1 1
      dbflute_h2/outside-sql-test.sh
  14. 1 1
      dbflute_h2/replace-schema.sh
  15. 1 1
      dbflute_h2/sql2entity.sh
  16. 2 2
      dbflute_mysql/_project.bat
  17. 2 2
      dbflute_mysql/_project.sh
  18. 3 3
      dbflute_mysql/dfprop/basicInfoMap.dfprop
  19. 2 2
      dbflute_mysql/dfprop/documentDefinitionMap.dfprop
  20. 9 6
      dbflute_mysql/dfprop/includeQueryMap.dfprop
  21. 1 0
      dbflute_mysql/dfprop/typeMappingMap.dfprop
  22. 1 1
      dbflute_mysql/doc.sh
  23. 1 1
      dbflute_mysql/generate.sh
  24. 1 1
      dbflute_mysql/jdbc.sh
  25. 1 1
      dbflute_mysql/manage.sh
  26. 1 1
      dbflute_mysql/outside-sql-test.sh
  27. 1 1
      dbflute_mysql/replace-schema.sh
  28. 1 1
      dbflute_mysql/sql2entity.sh
  29. 2 2
      dbflute_oracle/_project.bat
  30. 2 2
      dbflute_oracle/_project.sh
  31. 3 3
      dbflute_oracle/dfprop/basicInfoMap.dfprop
  32. 2 2
      dbflute_oracle/dfprop/documentDefinitionMap.dfprop
  33. 9 6
      dbflute_oracle/dfprop/includeQueryMap.dfprop
  34. 1 0
      dbflute_oracle/dfprop/typeMappingMap.dfprop
  35. 1 1
      dbflute_oracle/doc.sh
  36. 1 1
      dbflute_oracle/generate.sh
  37. 1 1
      dbflute_oracle/jdbc.sh
  38. 1 1
      dbflute_oracle/manage.sh
  39. 1 1
      dbflute_oracle/outside-sql-test.sh
  40. 1 1
      dbflute_oracle/replace-schema.sh
  41. 1 1
      dbflute_oracle/sql2entity.sh
  42. 3 3
      pom.xml
  43. 19 0
      src/main/config/h2/fess.ddl
  44. 19 0
      src/main/config/mysql/fess.ddl
  45. 20 0
      src/main/config/oracle/fess.ddl
  46. 151 0
      src/main/config/tablemeta.properties
  47. BIN
      src/main/h2/webapp/WEB-INF/db/fess.mv.db
  48. 155 0
      src/main/java/jp/sf/fess/action/admin/KeyMatchAction.java
  49. 2 2
      src/main/java/jp/sf/fess/api/json/JsonApiManager.java
  50. 2 2
      src/main/java/jp/sf/fess/api/xml/XmlApiManager.java
  51. 343 0
      src/main/java/jp/sf/fess/crud/action/admin/BsKeyMatchAction.java
  52. 105 0
      src/main/java/jp/sf/fess/crud/form/admin/BsKeyMatchForm.java
  53. 143 0
      src/main/java/jp/sf/fess/crud/pager/BsKeyMatchPager.java
  54. 114 0
      src/main/java/jp/sf/fess/crud/service/BsKeyMatchService.java
  55. 6 6
      src/main/java/jp/sf/fess/db/allcommon/CDef.java
  56. 21 3
      src/main/java/jp/sf/fess/db/allcommon/DBFluteConfig.java
  57. 21 22
      src/main/java/jp/sf/fess/db/allcommon/DBMetaInstanceHandler.java
  58. 31 20
      src/main/java/jp/sf/fess/db/allcommon/ImplementedBehaviorSelector.java
  59. 83 10
      src/main/java/jp/sf/fess/db/allcommon/ImplementedInvokerAssistant.java
  60. 8 1
      src/main/java/jp/sf/fess/db/allcommon/ImplementedSqlClauseCreator.java
  61. 385 345
      src/main/java/jp/sf/fess/db/bsbhv/BsClickLogBhv.java
  62. 353 343
      src/main/java/jp/sf/fess/db/bsbhv/BsCrawlingSessionBhv.java
  63. 387 368
      src/main/java/jp/sf/fess/db/bsbhv/BsCrawlingSessionInfoBhv.java
  64. 334 352
      src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToLabelTypeMappingBhv.java
  65. 333 352
      src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToRoleTypeMappingBhv.java
  66. 360 332
      src/main/java/jp/sf/fess/db/bsbhv/BsDataCrawlingConfigBhv.java
  67. 389 336
      src/main/java/jp/sf/fess/db/bsbhv/BsFailureUrlBhv.java
  68. 367 307
      src/main/java/jp/sf/fess/db/bsbhv/BsFavoriteLogBhv.java
  69. 330 359
      src/main/java/jp/sf/fess/db/bsbhv/BsFileAuthenticationBhv.java
  70. 340 358
      src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToLabelTypeMappingBhv.java
  71. 333 352
      src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToRoleTypeMappingBhv.java
  72. 427 415
      src/main/java/jp/sf/fess/db/bsbhv/BsFileCrawlingConfigBhv.java
  73. 382 327
      src/main/java/jp/sf/fess/db/bsbhv/BsJobLogBhv.java
  74. 1662 0
      src/main/java/jp/sf/fess/db/bsbhv/BsKeyMatchBhv.java
  75. 491 494
      src/main/java/jp/sf/fess/db/bsbhv/BsLabelTypeBhv.java
  76. 332 351
      src/main/java/jp/sf/fess/db/bsbhv/BsLabelTypeToRoleTypeMappingBhv.java
  77. 332 341
      src/main/java/jp/sf/fess/db/bsbhv/BsOverlappingHostBhv.java
  78. 332 332
      src/main/java/jp/sf/fess/db/bsbhv/BsPathMappingBhv.java
  79. 333 354
      src/main/java/jp/sf/fess/db/bsbhv/BsRequestHeaderBhv.java
  80. 491 492
      src/main/java/jp/sf/fess/db/bsbhv/BsRoleTypeBhv.java
  81. 332 333
      src/main/java/jp/sf/fess/db/bsbhv/BsScheduledJobBhv.java
  82. 391 362
      src/main/java/jp/sf/fess/db/bsbhv/BsSearchFieldLogBhv.java
  83. 355 325
      src/main/java/jp/sf/fess/db/bsbhv/BsSearchLogBhv.java
  84. 369 326
      src/main/java/jp/sf/fess/db/bsbhv/BsUserInfoBhv.java
  85. 328 357
      src/main/java/jp/sf/fess/db/bsbhv/BsWebAuthenticationBhv.java
  86. 333 352
      src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToLabelTypeMappingBhv.java
  87. 338 358
      src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToRoleTypeMappingBhv.java
  88. 493 502
      src/main/java/jp/sf/fess/db/bsbhv/BsWebCrawlingConfigBhv.java
  89. 115 0
      src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfClickLog.java
  90. 134 0
      src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfCrawlingSession.java
  91. 116 0
      src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfCrawlingSessionInfo.java
  92. 130 0
      src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfDataConfigToLabelTypeMapping.java
  93. 130 0
      src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfDataConfigToRoleTypeMapping.java
  94. 160 0
      src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfDataCrawlingConfig.java
  95. 101 0
      src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfFailureUrl.java
  96. 115 0
      src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfFavoriteLog.java
  97. 116 0
      src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfFileAuthentication.java
  98. 130 0
      src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfFileConfigToLabelTypeMapping.java
  99. 130 0
      src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfFileConfigToRoleTypeMapping.java
  100. 185 0
      src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfFileCrawlingConfig.java

+ 1 - 0
.gitignore

@@ -12,6 +12,7 @@
 /src/main/webapp/WEB-INF/conf/*.properties
 /src/main/webapp/WEB-INF/db/*.lock.db
 /src/main/webapp/WEB-INF/logs/fess*
+.project
 .classpath
 *.iml
 .idea

+ 0 - 14
.project

@@ -1,14 +0,0 @@
-<projectDescription>
-  <name>fess</name>
-  <comment>Fess is Full tExt Search System.</comment>
-  <projects/>
-  <buildSpec>
-    <buildCommand>
-      <name>org.eclipse.jdt.core.javabuilder</name>
-    </buildCommand>
-  </buildSpec>
-  <natures>
-    <nature>org.eclipse.jdt.core.javanature</nature>
-    <nature>com.sysdeo.eclipse.tomcat.tomcatnature</nature>
-  </natures>
-</projectDescription>

+ 1 - 1
dbflute_h2/_project.bat

@@ -2,7 +2,7 @@
 
 set ANT_OPTS=-Xmx512m
 
-set DBFLUTE_HOME=..\mydbflute\dbflute-1.0.4K
+set DBFLUTE_HOME=..\mydbflute\dbflute-1.0.5J
 
 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.4K
+export DBFLUTE_HOME=../mydbflute/dbflute-1.0.5J
 
 export MY_PROJECT_NAME=h2
 

+ 3 - 3
dbflute_h2/dfprop/basicInfoMap.dfprop

@@ -31,7 +31,7 @@ map:{
     #  the SQL for your DBFlute project.
     #  Your possible choices are:
     #
-    #    mysql, postgresql, oracle, db2, mssql,
+    #    mysql, postgresql, oracle, db2, sqlserver,
     #    h2, derby, (sqlite, msaccess)
     #
     ; database = h2
@@ -42,7 +42,7 @@ map:{
     #  The target language.
     #  Your possible choices are:
     #
-    #       java, csharp
+    #       java, csharp, scala
     #
     ; targetLanguage = java
     # - - - - - - - - - -/
@@ -53,7 +53,7 @@ map:{
     #  If your target language is 'csharp', you can specify 'seasar' only.
     #  Your possible choices are:
     #
-    #       seasar, spring, guice, lucy, cdi
+    #       seasar, spring, guice, cdi
     #
     ; targetContainer = seasar
     # - - - - - - - - - -/

+ 2 - 2
dbflute_h2/dfprop/documentDefinitionMap.dfprop

@@ -84,10 +84,10 @@ map:{
     # - - - - - - - - - -/
 
     # /- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-    # o isEntityJavaDocDbCommentValid (NotRequired - Default false)
+    # o isEntityJavaDocDbCommentValid (NotRequired - Default true)
     #  Does it allow DB comment to be on java-doc?
     #
-    #; isEntityJavaDocDbCommentValid = false
+    #; isEntityJavaDocDbCommentValid = true
     # - - - - - - - - - -/
 
     # /- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

+ 9 - 6
dbflute_h2/dfprop/includeQueryMap.dfprop

@@ -7,24 +7,27 @@
 #         ; [condition-key] = map:{ [table] = list:{ [column] ; [column] } }
 # }
 #
-# property-type: String, Number, Date, (or defaultExcludeColumnList)
+# property-type: String, Number, Date, OrderBy, ...
 # condition-key: NotEqual, GreaterThan, LessThan, GreaterEqual, LessEqual
 #              , InScope, NotInScope, PrefixSearch, LikeSearch, NotLikeSearch
-#              , EmptyString, FromTo, DateFromTo, RangeOf
-#              , (and prefix '!' means excluding)
-# table: table name or $$ALL$$
+#              , EmptyString, FromTo, DateFromTo, RangeOf, ...
+#              , (and prefix '!' means excluding, '%' means reviving)
+# table: table name (hint) or $$ALL$$
 # column: column name (hint) or $$CommonColumn$$ or $$VersionNo$$
 #
 # Example:
 # map:{
 #     # This means that String includes GreaterThan at MEMBER.MEMBER_ACCOUNT only
-#     # and LessThan at PRODUCT.PRODUCT_NAME and PRODUCT.PRODUCT_HANDLE_CODE.
+#     # and LessThan at PRODUCT.PRODUCT_NAME and PRODUCT.PRODUCT_HANDLE_CODE,
+#     # and InScope for LONGVARCHAR(e.g. text type) is excluded.
 #     ; String = map:{
 #         ; GreaterThan = map:{ MEMBER = list:{ MEMBER_ACCOUNT } }
 #         ; LessThan = map:{ PRODUCT = list:{ PRODUCT_NAME ; PRODUCT_HANDLE_CODE } }
+#         ; !InScope = map:{ $$ALL$$ = list:{ type:LONGVARCHAR } }
 #     }
-#     # This means that Number includes all condition-keys. (same as no setting)
+#     # This means that Number excludes all version-no's NotEqual.
 #     ; Number = map:{
+#         ; !NotEqual = map:{ $$ALL$$ = list:{ $$VersionNo$$ } }
 #     }
 #     # This means that Date does not includes NotEqual at all tables.  
 #     ; Date = map:{

+ 1 - 0
dbflute_h2/dfprop/typeMappingMap.dfprop

@@ -51,6 +51,7 @@ map:{
 # | BINARY        | byte[]               | byte[]        |
 # | VARBINARY     | byte[]               | byte[]        |
 # | LONGVARBINARY | byte[]               | byte[]        |
+# | BLOB          | byte[]               | byte[]        |
 # | ARRAY         | *Unsupported         | *Unsupported  |
 # | UUID          | java.util.UUID       | *Unsupported  |
 # --------------------------------------------------------

+ 1 - 1
dbflute_h2/doc.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the Document task"

+ 1 - 1
dbflute_h2/generate.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the Generate task"

+ 1 - 1
dbflute_h2/jdbc.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the JDBC task"

+ 1 - 1
dbflute_h2/manage.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 FIRST_ARG=$1
 SECOND_ARG=$2

+ 1 - 1
dbflute_h2/outside-sql-test.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the OutsiteSqlTest task"

+ 1 - 1
dbflute_h2/replace-schema.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the ReplaceSchema task"

+ 1 - 1
dbflute_h2/sql2entity.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the Sql2Entity task"

+ 2 - 2
dbflute_mysql/_project.bat

@@ -2,9 +2,9 @@
 
 set ANT_OPTS=-Xmx512m
 
-set DBFLUTE_HOME=..\mydbflute\dbflute-1.0.4K
+set DBFLUTE_HOME=..\mydbflute\dbflute-1.0.5J
 
-set MY_PROJECT_NAME=fess
+set MY_PROJECT_NAME=mysql
 
 set MY_PROPERTIES_PATH=build.properties
 

+ 2 - 2
dbflute_mysql/_project.sh

@@ -2,8 +2,8 @@
 
 export ANT_OPTS=-Xmx512m
 
-export DBFLUTE_HOME=../mydbflute/dbflute-1.0.4K
+export DBFLUTE_HOME=../mydbflute/dbflute-1.0.5J
 
-export MY_PROJECT_NAME=fess
+export MY_PROJECT_NAME=mysql
 
 export MY_PROPERTIES_PATH=build.properties

+ 3 - 3
dbflute_mysql/dfprop/basicInfoMap.dfprop

@@ -31,7 +31,7 @@ map:{
     #  the SQL for your DBFlute project.
     #  Your possible choices are:
     #
-    #    mysql, postgresql, oracle, db2, mssql,
+    #    mysql, postgresql, oracle, db2, sqlserver,
     #    h2, derby, (sqlite, msaccess)
     #
     ; database = mysql
@@ -42,7 +42,7 @@ map:{
     #  The target language.
     #  Your possible choices are:
     #
-    #       java, csharp
+    #       java, csharp, scala
     #
     ; targetLanguage = java
     # - - - - - - - - - -/
@@ -53,7 +53,7 @@ map:{
     #  If your target language is 'csharp', you can specify 'seasar' only.
     #  Your possible choices are:
     #
-    #       seasar, spring, guice, lucy, cdi
+    #       seasar, spring, guice, cdi
     #
     ; targetContainer = seasar
     # - - - - - - - - - -/

+ 2 - 2
dbflute_mysql/dfprop/documentDefinitionMap.dfprop

@@ -84,10 +84,10 @@ map:{
     # - - - - - - - - - -/
 
     # /- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-    # o isEntityJavaDocDbCommentValid (NotRequired - Default false)
+    # o isEntityJavaDocDbCommentValid (NotRequired - Default true)
     #  Does it allow DB comment to be on java-doc?
     #
-    #; isEntityJavaDocDbCommentValid = false
+    #; isEntityJavaDocDbCommentValid = true
     # - - - - - - - - - -/
 
     # /- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

+ 9 - 6
dbflute_mysql/dfprop/includeQueryMap.dfprop

@@ -7,24 +7,27 @@
 #         ; [condition-key] = map:{ [table] = list:{ [column] ; [column] } }
 # }
 #
-# property-type: String, Number, Date, (or defaultExcludeColumnList)
+# property-type: String, Number, Date, OrderBy, ...
 # condition-key: NotEqual, GreaterThan, LessThan, GreaterEqual, LessEqual
 #              , InScope, NotInScope, PrefixSearch, LikeSearch, NotLikeSearch
-#              , EmptyString, FromTo, DateFromTo, RangeOf
-#              , (and prefix '!' means excluding)
-# table: table name or $$ALL$$
+#              , EmptyString, FromTo, DateFromTo, RangeOf, ...
+#              , (and prefix '!' means excluding, '%' means reviving)
+# table: table name (hint) or $$ALL$$
 # column: column name (hint) or $$CommonColumn$$ or $$VersionNo$$
 #
 # Example:
 # map:{
 #     # This means that String includes GreaterThan at MEMBER.MEMBER_ACCOUNT only
-#     # and LessThan at PRODUCT.PRODUCT_NAME and PRODUCT.PRODUCT_HANDLE_CODE.
+#     # and LessThan at PRODUCT.PRODUCT_NAME and PRODUCT.PRODUCT_HANDLE_CODE,
+#     # and InScope for LONGVARCHAR(e.g. text type) is excluded.
 #     ; String = map:{
 #         ; GreaterThan = map:{ MEMBER = list:{ MEMBER_ACCOUNT } }
 #         ; LessThan = map:{ PRODUCT = list:{ PRODUCT_NAME ; PRODUCT_HANDLE_CODE } }
+#         ; !InScope = map:{ $$ALL$$ = list:{ type:LONGVARCHAR } }
 #     }
-#     # This means that Number includes all condition-keys. (same as no setting)
+#     # This means that Number excludes all version-no's NotEqual.
 #     ; Number = map:{
+#         ; !NotEqual = map:{ $$ALL$$ = list:{ $$VersionNo$$ } }
 #     }
 #     # This means that Date does not includes NotEqual at all tables.  
 #     ; Date = map:{

+ 1 - 0
dbflute_mysql/dfprop/typeMappingMap.dfprop

@@ -51,6 +51,7 @@ map:{
 # | BINARY        | byte[]               | byte[]        |
 # | VARBINARY     | byte[]               | byte[]        |
 # | LONGVARBINARY | byte[]               | byte[]        |
+# | BLOB          | byte[]               | byte[]        |
 # | ARRAY         | *Unsupported         | *Unsupported  |
 # | UUID          | java.util.UUID       | *Unsupported  |
 # --------------------------------------------------------

+ 1 - 1
dbflute_mysql/doc.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the Document task"

+ 1 - 1
dbflute_mysql/generate.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the Generate task"

+ 1 - 1
dbflute_mysql/jdbc.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the JDBC task"

+ 1 - 1
dbflute_mysql/manage.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 FIRST_ARG=$1
 SECOND_ARG=$2

+ 1 - 1
dbflute_mysql/outside-sql-test.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the OutsiteSqlTest task"

+ 1 - 1
dbflute_mysql/replace-schema.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the ReplaceSchema task"

+ 1 - 1
dbflute_mysql/sql2entity.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the Sql2Entity task"

+ 2 - 2
dbflute_oracle/_project.bat

@@ -2,9 +2,9 @@
 
 set ANT_OPTS=-Xmx512m
 
-set DBFLUTE_HOME=..\mydbflute\dbflute-1.0.4K
+set DBFLUTE_HOME=..\mydbflute\dbflute-1.0.5J
 
-set MY_PROJECT_NAME=fess
+set MY_PROJECT_NAME=oracle
 
 set MY_PROPERTIES_PATH=build.properties
 

+ 2 - 2
dbflute_oracle/_project.sh

@@ -2,8 +2,8 @@
 
 export ANT_OPTS=-Xmx512m
 
-export DBFLUTE_HOME=../mydbflute/dbflute-1.0.4K
+export DBFLUTE_HOME=../mydbflute/dbflute-1.0.5J
 
-export MY_PROJECT_NAME=fess
+export MY_PROJECT_NAME=oracle
 
 export MY_PROPERTIES_PATH=build.properties

+ 3 - 3
dbflute_oracle/dfprop/basicInfoMap.dfprop

@@ -31,7 +31,7 @@ map:{
     #  the SQL for your DBFlute project.
     #  Your possible choices are:
     #
-    #    mysql, postgresql, oracle, db2, mssql,
+    #    mysql, postgresql, oracle, db2, sqlserver,
     #    h2, derby, (sqlite, msaccess)
     #
     ; database = oracle
@@ -42,7 +42,7 @@ map:{
     #  The target language.
     #  Your possible choices are:
     #
-    #       java, csharp
+    #       java, csharp, scala
     #
     ; targetLanguage = java
     # - - - - - - - - - -/
@@ -53,7 +53,7 @@ map:{
     #  If your target language is 'csharp', you can specify 'seasar' only.
     #  Your possible choices are:
     #
-    #       seasar, spring, guice, lucy, cdi
+    #       seasar, spring, guice, cdi
     #
     ; targetContainer = seasar
     # - - - - - - - - - -/

+ 2 - 2
dbflute_oracle/dfprop/documentDefinitionMap.dfprop

@@ -84,10 +84,10 @@ map:{
     # - - - - - - - - - -/
 
     # /- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-    # o isEntityJavaDocDbCommentValid (NotRequired - Default false)
+    # o isEntityJavaDocDbCommentValid (NotRequired - Default true)
     #  Does it allow DB comment to be on java-doc?
     #
-    #; isEntityJavaDocDbCommentValid = false
+    #; isEntityJavaDocDbCommentValid = true
     # - - - - - - - - - -/
 
     # /- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

+ 9 - 6
dbflute_oracle/dfprop/includeQueryMap.dfprop

@@ -7,24 +7,27 @@
 #         ; [condition-key] = map:{ [table] = list:{ [column] ; [column] } }
 # }
 #
-# property-type: String, Number, Date, (or defaultExcludeColumnList)
+# property-type: String, Number, Date, OrderBy, ...
 # condition-key: NotEqual, GreaterThan, LessThan, GreaterEqual, LessEqual
 #              , InScope, NotInScope, PrefixSearch, LikeSearch, NotLikeSearch
-#              , EmptyString, FromTo, DateFromTo, RangeOf
-#              , (and prefix '!' means excluding)
-# table: table name or $$ALL$$
+#              , EmptyString, FromTo, DateFromTo, RangeOf, ...
+#              , (and prefix '!' means excluding, '%' means reviving)
+# table: table name (hint) or $$ALL$$
 # column: column name (hint) or $$CommonColumn$$ or $$VersionNo$$
 #
 # Example:
 # map:{
 #     # This means that String includes GreaterThan at MEMBER.MEMBER_ACCOUNT only
-#     # and LessThan at PRODUCT.PRODUCT_NAME and PRODUCT.PRODUCT_HANDLE_CODE.
+#     # and LessThan at PRODUCT.PRODUCT_NAME and PRODUCT.PRODUCT_HANDLE_CODE,
+#     # and InScope for LONGVARCHAR(e.g. text type) is excluded.
 #     ; String = map:{
 #         ; GreaterThan = map:{ MEMBER = list:{ MEMBER_ACCOUNT } }
 #         ; LessThan = map:{ PRODUCT = list:{ PRODUCT_NAME ; PRODUCT_HANDLE_CODE } }
+#         ; !InScope = map:{ $$ALL$$ = list:{ type:LONGVARCHAR } }
 #     }
-#     # This means that Number includes all condition-keys. (same as no setting)
+#     # This means that Number excludes all version-no's NotEqual.
 #     ; Number = map:{
+#         ; !NotEqual = map:{ $$ALL$$ = list:{ $$VersionNo$$ } }
 #     }
 #     # This means that Date does not includes NotEqual at all tables.  
 #     ; Date = map:{

+ 1 - 0
dbflute_oracle/dfprop/typeMappingMap.dfprop

@@ -51,6 +51,7 @@ map:{
 # | BINARY        | byte[]               | byte[]        |
 # | VARBINARY     | byte[]               | byte[]        |
 # | LONGVARBINARY | byte[]               | byte[]        |
+# | BLOB          | byte[]               | byte[]        |
 # | ARRAY         | *Unsupported         | *Unsupported  |
 # | UUID          | java.util.UUID       | *Unsupported  |
 # --------------------------------------------------------

+ 1 - 1
dbflute_oracle/doc.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the Document task"

+ 1 - 1
dbflute_oracle/generate.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the Generate task"

+ 1 - 1
dbflute_oracle/jdbc.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the JDBC task"

+ 1 - 1
dbflute_oracle/manage.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 FIRST_ARG=$1
 SECOND_ARG=$2

+ 1 - 1
dbflute_oracle/outside-sql-test.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the OutsiteSqlTest task"

+ 1 - 1
dbflute_oracle/replace-schema.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the ReplaceSchema task"

+ 1 - 1
dbflute_oracle/sql2entity.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 cd `dirname $0`
-. _project.sh
+. ./_project.sh
 
 echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
 echo "...Calling the Sql2Entity task"

+ 3 - 3
pom.xml

@@ -69,7 +69,7 @@
         <database>h2</database>
         <databaseGroupId>com.h2database</databaseGroupId>
         <databaseArtifactId>h2</databaseArtifactId>
-        <databaseVersion>1.4.179</databaseVersion>
+        <databaseVersion>1.4.181</databaseVersion>
         <databaseDriver>org.h2.Driver</databaseDriver>
         <databaseUrl>jdbc:h2:file:${basedir}/src/main/webapp/WEB-INF/db/fess</databaseUrl>
         <databaseTestUrl>jdbc:h2:file:${basedir}/target/test-classes/db/fess</databaseTestUrl>
@@ -83,7 +83,7 @@
         <database>mysql</database>
         <databaseGroupId>mysql</databaseGroupId>
         <databaseArtifactId>mysql-connector-java</databaseArtifactId>
-        <databaseVersion>5.1.31</databaseVersion>
+        <databaseVersion>5.1.32</databaseVersion>
         <databaseDriver>com.mysql.jdbc.Driver</databaseDriver>
         <databaseUrl>jdbc:mysql://localhost:3306/fess_db?noDatetimeStringSync=true&amp;zeroDateTimeBehavior=convertToNull&amp;useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true</databaseUrl>
         <databaseTestUrl>jdbc:mysql://localhost:3306/fess_testdb?noDatetimeStringSync=true&amp;zeroDateTimeBehavior=convertToNull&amp;useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true</databaseTestUrl>
@@ -107,7 +107,7 @@
     </profile>
   </profiles>
   <properties>
-    <dbflute.version>1.0.4K</dbflute.version>
+    <dbflute.version>1.0.5J</dbflute.version>
     <s2robot.version>0.8.0-SNAPSHOT</s2robot.version>
     <solr.version>4.9.0</solr.version>
     <slf4j.version>1.7.7</slf4j.version>

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

@@ -18,6 +18,7 @@ DROP TABLE IF EXISTS FILE_CONFIG_TO_LABEL_TYPE_MAPPING;
 DROP TABLE IF EXISTS LABEL_TYPE;
 DROP TABLE IF EXISTS CRAWLING_SESSION_INFO;
 DROP TABLE IF EXISTS WEB_AUTHENTICATION;
+DROP TABLE IF EXISTS KEY_MATCH;
 DROP TABLE IF EXISTS REQUEST_HEADER;
 DROP TABLE IF EXISTS OVERLAPPING_HOST;
 DROP TABLE IF EXISTS CRAWLING_SESSION;
@@ -189,6 +190,24 @@ CREATE TABLE REQUEST_HEADER(
   FOREIGN KEY (WEB_CRAWLING_CONFIG_ID) REFERENCES WEB_CRAWLING_CONFIG (ID)
 );
 
+/**********************************/
+/* Table Name: Key Match */
+/**********************************/
+CREATE TABLE KEY_MATCH(
+  ID IDENTITY NOT NULL PRIMARY KEY,
+  TERM VARCHAR(200) NOT NULL,
+  QUERY VARCHAR(4000) NOT NULL,
+  MAX_SIZE INTEGER NOT NULL,
+  BOOST FLOAT 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: Web Authentication */
 /**********************************/

+ 19 - 0
src/main/config/mysql/fess.ddl

@@ -18,6 +18,7 @@ DROP TABLE IF EXISTS FILE_CONFIG_TO_LABEL_TYPE_MAPPING;
 DROP TABLE IF EXISTS LABEL_TYPE;
 DROP TABLE IF EXISTS CRAWLING_SESSION_INFO;
 DROP TABLE IF EXISTS WEB_AUTHENTICATION;
+DROP TABLE IF EXISTS KEY_MATCH;
 DROP TABLE IF EXISTS REQUEST_HEADER;
 DROP TABLE IF EXISTS OVERLAPPING_HOST;
 DROP TABLE IF EXISTS CRAWLING_SESSION;
@@ -189,6 +190,24 @@ CREATE TABLE REQUEST_HEADER(
   FOREIGN KEY (WEB_CRAWLING_CONFIG_ID) REFERENCES WEB_CRAWLING_CONFIG (ID)
 );
 
+/**********************************/
+/* Table Name: Key Match */
+/**********************************/
+CREATE TABLE KEY_MATCH(
+  ID BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+  TERM VARCHAR(100) NOT NULL,
+  QUERY TEXT NOT NULL,
+  MAX_SIZE INTEGER NOT NULL,
+  BOOST FLOAT 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: Web Authentication */
 /**********************************/

+ 20 - 0
src/main/config/oracle/fess.ddl

@@ -6,6 +6,7 @@ DROP SEQUENCE PATH_MAPPING_SEQ;
 DROP SEQUENCE CRAWLING_SESSION_SEQ;
 DROP SEQUENCE OVERLAPPING_HOST_SEQ;
 DROP SEQUENCE REQUEST_HEADER_SEQ;
+DROP SEQUENCE KEY_MATCH_SEQ;
 DROP SEQUENCE WEB_AUTHENTICATION_SEQ;
 DROP SEQUENCE CRAWLING_SESSION_INFO_SEQ;
 DROP SEQUENCE LABEL_TYPE_SEQ;
@@ -45,6 +46,7 @@ DROP TABLE "FILE_CONFIG_TO_LABEL_TYPE";
 DROP TABLE "LABEL_TYPE";
 DROP TABLE "CRAWLING_SESSION_INFO";
 DROP TABLE "WEB_AUTHENTICATION";
+DROP TABLE "KEY_MATCH";
 DROP TABLE "REQUEST_HEADER";
 DROP TABLE "OVERLAPPING_HOST";
 DROP TABLE "CRAWLING_SESSION";
@@ -205,6 +207,23 @@ CREATE TABLE "REQUEST_HEADER"(
   FOREIGN KEY (WEB_CRAWLING_CONFIG_ID) REFERENCES WEB_CRAWLING_CONFIG (ID)
 );
 
+CREATE TABLE "KEY_MATCH"(
+  "ID" NUMBER(18,0) NOT NULL,
+  "TERM" VARCHAR2(100) NOT NULL,
+  "QUERY" VARCHAR2(4000) NOT NULL,
+  "MAX_SIZE" NUMBER(9,0) NOT NULL,
+  "BOOST" FLOAT 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 "KEY_MATCH_PK" PRIMARY KEY ("ID") ENABLE
+);
+
 CREATE TABLE "WEB_AUTHENTICATION"(
   "ID" NUMBER(18,0) NOT NULL,
   "HOSTNAME" VARCHAR2(100),
@@ -494,6 +513,7 @@ 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;
 CREATE SEQUENCE REQUEST_HEADER_SEQ START WITH 1 INCREMENT BY 50;
+CREATE SEQUENCE KEY_MATCH_SEQ START WITH 1 INCREMENT BY 50;
 CREATE SEQUENCE WEB_AUTHENTICATION_SEQ START WITH 1 INCREMENT BY 50;
 CREATE SEQUENCE CRAWLING_SESSION_INFO_SEQ START WITH 1 INCREMENT BY 50;
 CREATE SEQUENCE LABEL_TYPE_SEQ START WITH 1 INCREMENT BY 50;

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

@@ -995,6 +995,157 @@ jobLog.endTime.doubleTypeParam=
 jobLog.endTime.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
 jobLog.endTime.defaultValue=
 
+keyMatch.ignored=false
+keyMatch.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; 
+keyMatch.converterToSearchParams=
+keyMatch.converterToPager=
+keyMatch.converterToActionForm=
+keyMatch.converterToEntity=
+keyMatch.id.requiredParam=
+keyMatch.id.additionalAnnotation=
+keyMatch.id.annotation=
+keyMatch.id.enableJavaType=true
+keyMatch.id.longTypeParam=
+keyMatch.id.integerTypeParam=
+keyMatch.id.shortTypeParam=
+keyMatch.id.byteTypeParam=
+keyMatch.id.floatTypeParam=
+keyMatch.id.doubleTypeParam=
+keyMatch.id.dateTypeParam=
+keyMatch.id.defaultValue=
+keyMatch.term.requiredParam=
+keyMatch.term.additionalAnnotation=@Maxbytelength(maxbytelength = 100)
+keyMatch.term.annotation=
+keyMatch.term.enableJavaType=true
+keyMatch.term.longTypeParam=
+keyMatch.term.integerTypeParam=
+keyMatch.term.shortTypeParam=
+keyMatch.term.byteTypeParam=
+keyMatch.term.floatTypeParam=
+keyMatch.term.doubleTypeParam=
+keyMatch.term.dateTypeParam=
+keyMatch.term.defaultValue=
+keyMatch.query.requiredParam=
+keyMatch.query.additionalAnnotation=@Maxbytelength(maxbytelength = 4000)
+keyMatch.query.annotation=
+keyMatch.query.enableJavaType=true
+keyMatch.query.longTypeParam=
+keyMatch.query.integerTypeParam=
+keyMatch.query.shortTypeParam=
+keyMatch.query.byteTypeParam=
+keyMatch.query.floatTypeParam=
+keyMatch.query.doubleTypeParam=
+keyMatch.query.dateTypeParam=
+keyMatch.query.defaultValue=
+keyMatch.maxSize.requiredParam=
+keyMatch.maxSize.additionalAnnotation=@IntRange(min = 0, max = 2147483647)
+keyMatch.maxSize.annotation=
+keyMatch.maxSize.enableJavaType=true
+keyMatch.maxSize.longTypeParam=
+keyMatch.maxSize.integerTypeParam=
+keyMatch.maxSize.shortTypeParam=
+keyMatch.maxSize.byteTypeParam=
+keyMatch.maxSize.floatTypeParam=
+keyMatch.maxSize.doubleTypeParam=
+keyMatch.maxSize.dateTypeParam=
+keyMatch.maxSize.defaultValue=
+keyMatch.boost.requiredParam=
+keyMatch.boost.additionalAnnotation=
+keyMatch.boost.annotation=
+keyMatch.boost.enableJavaType=true
+keyMatch.boost.longTypeParam=
+keyMatch.boost.integerTypeParam=
+keyMatch.boost.shortTypeParam=
+keyMatch.boost.byteTypeParam=
+keyMatch.boost.floatTypeParam=
+keyMatch.boost.doubleTypeParam=
+keyMatch.boost.dateTypeParam=
+keyMatch.boost.defaultValue=
+keyMatch.createdBy.requiredParam=(target = "confirmfromupdate,update,delete")
+keyMatch.createdBy.additionalAnnotation=@Maxbytelength(maxbytelength = 255)
+keyMatch.createdBy.annotation=
+keyMatch.createdBy.enableJavaType=true
+keyMatch.createdBy.longTypeParam=
+keyMatch.createdBy.integerTypeParam=
+keyMatch.createdBy.shortTypeParam=
+keyMatch.createdBy.byteTypeParam=
+keyMatch.createdBy.floatTypeParam=
+keyMatch.createdBy.doubleTypeParam=
+keyMatch.createdBy.dateTypeParam=
+keyMatch.createdBy.defaultValue=
+keyMatch.createdTime.requiredParam=(target = "confirmfromupdate,update,delete")
+keyMatch.createdTime.additionalAnnotation=
+keyMatch.createdTime.annotation=
+keyMatch.createdTime.enableJavaType=true
+keyMatch.createdTime.longTypeParam=
+keyMatch.createdTime.integerTypeParam=
+keyMatch.createdTime.shortTypeParam=
+keyMatch.createdTime.byteTypeParam=
+keyMatch.createdTime.floatTypeParam=
+keyMatch.createdTime.doubleTypeParam=
+keyMatch.createdTime.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
+keyMatch.createdTime.defaultValue=
+keyMatch.updatedBy.requiredParam=
+keyMatch.updatedBy.additionalAnnotation=@Maxbytelength(maxbytelength = 255)
+keyMatch.updatedBy.annotation=
+keyMatch.updatedBy.enableJavaType=true
+keyMatch.updatedBy.longTypeParam=
+keyMatch.updatedBy.integerTypeParam=
+keyMatch.updatedBy.shortTypeParam=
+keyMatch.updatedBy.byteTypeParam=
+keyMatch.updatedBy.floatTypeParam=
+keyMatch.updatedBy.doubleTypeParam=
+keyMatch.updatedBy.dateTypeParam=
+keyMatch.updatedBy.defaultValue=
+keyMatch.updatedTime.requiredParam=
+keyMatch.updatedTime.additionalAnnotation=
+keyMatch.updatedTime.annotation=
+keyMatch.updatedTime.enableJavaType=true
+keyMatch.updatedTime.longTypeParam=
+keyMatch.updatedTime.integerTypeParam=
+keyMatch.updatedTime.shortTypeParam=
+keyMatch.updatedTime.byteTypeParam=
+keyMatch.updatedTime.floatTypeParam=
+keyMatch.updatedTime.doubleTypeParam=
+keyMatch.updatedTime.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
+keyMatch.updatedTime.defaultValue=
+keyMatch.deletedBy.requiredParam=
+keyMatch.deletedBy.additionalAnnotation=@Maxbytelength(maxbytelength = 255)
+keyMatch.deletedBy.annotation=
+keyMatch.deletedBy.enableJavaType=true
+keyMatch.deletedBy.longTypeParam=
+keyMatch.deletedBy.integerTypeParam=
+keyMatch.deletedBy.shortTypeParam=
+keyMatch.deletedBy.byteTypeParam=
+keyMatch.deletedBy.floatTypeParam=
+keyMatch.deletedBy.doubleTypeParam=
+keyMatch.deletedBy.dateTypeParam=
+keyMatch.deletedBy.defaultValue=
+keyMatch.deletedTime.requiredParam=
+keyMatch.deletedTime.additionalAnnotation=
+keyMatch.deletedTime.annotation=
+keyMatch.deletedTime.enableJavaType=true
+keyMatch.deletedTime.longTypeParam=
+keyMatch.deletedTime.integerTypeParam=
+keyMatch.deletedTime.shortTypeParam=
+keyMatch.deletedTime.byteTypeParam=
+keyMatch.deletedTime.floatTypeParam=
+keyMatch.deletedTime.doubleTypeParam=
+keyMatch.deletedTime.dateTypeParam=(datePattern = Constants.DEFAULT_DATETIME_FORMAT)
+keyMatch.deletedTime.defaultValue=
+keyMatch.versionNo.requiredParam=(target = "confirmfromupdate,update,delete")
+keyMatch.versionNo.additionalAnnotation=
+keyMatch.versionNo.annotation=
+keyMatch.versionNo.enableJavaType=true
+keyMatch.versionNo.longTypeParam=
+keyMatch.versionNo.integerTypeParam=
+keyMatch.versionNo.shortTypeParam=
+keyMatch.versionNo.byteTypeParam=
+keyMatch.versionNo.floatTypeParam=
+keyMatch.versionNo.doubleTypeParam=
+keyMatch.versionNo.dateTypeParam=
+keyMatch.versionNo.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=

BIN
src/main/h2/webapp/WEB-INF/db/fess.mv.db


+ 155 - 0
src/main/java/jp/sf/fess/action/admin/KeyMatchAction.java

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

+ 2 - 2
src/main/java/jp/sf/fess/api/json/JsonApiManager.java

@@ -113,8 +113,8 @@ public class JsonApiManager extends BaseApiManager implements WebApiManager {
         }
     }
 
-    protected void processPingRequest(HttpServletRequest request,
-            HttpServletResponse response, FilterChain chain) {
+    protected void processPingRequest(final HttpServletRequest request,
+            final HttpServletResponse response, final FilterChain chain) {
         final SearchService searchService = ComponentUtil.getSearchService();
         int status;
         final StringBuilder buf = new StringBuilder(1000);

+ 2 - 2
src/main/java/jp/sf/fess/api/xml/XmlApiManager.java

@@ -102,8 +102,8 @@ public class XmlApiManager extends BaseApiManager implements WebApiManager {
 
     }
 
-    protected void processPingRequest(HttpServletRequest request,
-            HttpServletResponse response, FilterChain chain) {
+    protected void processPingRequest(final HttpServletRequest request,
+            final HttpServletResponse response, final FilterChain chain) {
         final SearchService searchService = ComponentUtil.getSearchService();
         int status;
         final StringBuilder buf = new StringBuilder(1000);

+ 343 - 0
src/main/java/jp/sf/fess/crud/action/admin/BsKeyMatchAction.java

@@ -0,0 +1,343 @@
+/*
+ * Copyright 2009-2014 the CodeLibs Project and the Others.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+
+package jp.sf.fess.crud.action.admin;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Resource;
+
+import jp.sf.fess.crud.CommonConstants;
+import jp.sf.fess.crud.CrudMessageException;
+import jp.sf.fess.crud.util.SAStrutsUtil;
+import jp.sf.fess.db.exentity.KeyMatch;
+import jp.sf.fess.form.admin.KeyMatchForm;
+import jp.sf.fess.pager.KeyMatchPager;
+import jp.sf.fess.service.KeyMatchService;
+
+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 BsKeyMatchAction implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final Log log = LogFactory.getLog(BsKeyMatchAction.class);
+
+    // for list
+
+    public List<KeyMatch> keyMatchItems;
+
+    // for edit/confirm/delete
+
+    @ActionForm
+    @Resource
+    protected KeyMatchForm keyMatchForm;
+
+    @Resource
+    protected KeyMatchService keyMatchService;
+
+    @Resource
+    protected KeyMatchPager keyMatchPager;
+
+    protected String displayList(final boolean redirect) {
+        // page navi
+        keyMatchItems = keyMatchService.getKeyMatchList(keyMatchPager);
+
+        // restore from pager
+        Beans.copy(keyMatchPager, keyMatchForm.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(keyMatchForm.pageNumber)) {
+            try {
+                keyMatchPager.setCurrentPageNumber(Integer
+                        .parseInt(keyMatchForm.pageNumber));
+            } catch (final NumberFormatException e) {
+                if (log.isDebugEnabled()) {
+                    log.debug("Invalid value: " + keyMatchForm.pageNumber, e);
+                }
+            }
+        }
+
+        return displayList(false);
+    }
+
+    @Execute(validator = false, input = "error.jsp")
+    public String search() {
+        Beans.copy(keyMatchForm.searchParams, keyMatchPager)
+                .excludes(CommonConstants.PAGER_CONVERSION_RULE)
+
+                .execute();
+
+        return displayList(false);
+    }
+
+    @Execute(validator = false, input = "error.jsp")
+    public String reset() {
+        keyMatchPager.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 (keyMatchForm.crudMode != CommonConstants.CONFIRM_MODE) {
+            throw new ActionMessagesException("errors.crud_invalid_mode",
+                    new Object[] { CommonConstants.CONFIRM_MODE,
+                            keyMatchForm.crudMode });
+        }
+
+        loadKeyMatch();
+
+        return "confirm.jsp";
+    }
+
+    @Token(save = true, validate = false)
+    @Execute(validator = false, input = "error.jsp")
+    public String createpage() {
+        // page navi
+        keyMatchForm.initialize();
+        keyMatchForm.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 (keyMatchForm.crudMode != CommonConstants.EDIT_MODE) {
+            throw new ActionMessagesException("errors.crud_invalid_mode",
+                    new Object[] { CommonConstants.EDIT_MODE,
+                            keyMatchForm.crudMode });
+        }
+
+        loadKeyMatch();
+
+        return "edit.jsp";
+    }
+
+    @Token(save = true, validate = false)
+    @Execute(validator = false, input = "error.jsp")
+    public String editfromconfirm() {
+        keyMatchForm.crudMode = CommonConstants.EDIT_MODE;
+
+        loadKeyMatch();
+
+        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 (keyMatchForm.crudMode != CommonConstants.DELETE_MODE) {
+            throw new ActionMessagesException("errors.crud_invalid_mode",
+                    new Object[] { CommonConstants.DELETE_MODE,
+                            keyMatchForm.crudMode });
+        }
+
+        loadKeyMatch();
+
+        return "confirm.jsp";
+    }
+
+    @Token(save = true, validate = false)
+    @Execute(validator = false, input = "error.jsp")
+    public String deletefromconfirm() {
+        keyMatchForm.crudMode = CommonConstants.DELETE_MODE;
+
+        loadKeyMatch();
+
+        return "confirm.jsp";
+    }
+
+    @Token(save = false, validate = true)
+    @Execute(validator = true, input = "edit.jsp")
+    public String create() {
+        try {
+            final KeyMatch keyMatch = createKeyMatch();
+            keyMatchService.store(keyMatch);
+            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 KeyMatch keyMatch = createKeyMatch();
+            keyMatchService.store(keyMatch);
+            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 (keyMatchForm.crudMode != CommonConstants.DELETE_MODE) {
+            throw new ActionMessagesException("errors.crud_invalid_mode",
+                    new Object[] { CommonConstants.DELETE_MODE,
+                            keyMatchForm.crudMode });
+        }
+
+        try {
+            final KeyMatch keyMatch = keyMatchService
+                    .getKeyMatch(createKeyMap());
+            if (keyMatch == null) {
+                // throw an exception
+                throw new ActionMessagesException(
+                        "errors.crud_could_not_find_crud_table",
+
+                        new Object[] { keyMatchForm.id });
+
+            }
+
+            keyMatchService.delete(keyMatch);
+            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 loadKeyMatch() {
+
+        final KeyMatch keyMatch = keyMatchService.getKeyMatch(createKeyMap());
+        if (keyMatch == null) {
+            // throw an exception
+            throw new ActionMessagesException(
+                    "errors.crud_could_not_find_crud_table",
+
+                    new Object[] { keyMatchForm.id });
+
+        }
+
+        Beans.copy(keyMatch, keyMatchForm).excludes("searchParams", "mode")
+
+        .execute();
+    }
+
+    protected KeyMatch createKeyMatch() {
+        KeyMatch keyMatch;
+        if (keyMatchForm.crudMode == CommonConstants.EDIT_MODE) {
+            keyMatch = keyMatchService.getKeyMatch(createKeyMap());
+            if (keyMatch == null) {
+                // throw an exception
+                throw new ActionMessagesException(
+                        "errors.crud_could_not_find_crud_table",
+
+                        new Object[] { keyMatchForm.id });
+
+            }
+        } else {
+            keyMatch = new KeyMatch();
+        }
+        Beans.copy(keyMatchForm, keyMatch).excludes("searchParams", "mode")
+
+        .execute();
+
+        return keyMatch;
+    }
+
+    protected Map<String, String> createKeyMap() {
+        final Map<String, String> keys = new HashMap<String, String>();
+
+        keys.put("id", keyMatchForm.id);
+
+        return keys;
+    }
+}

+ 105 - 0
src/main/java/jp/sf/fess/crud/form/admin/BsKeyMatchForm.java

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

+ 143 - 0
src/main/java/jp/sf/fess/crud/pager/BsKeyMatchPager.java

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

+ 114 - 0
src/main/java/jp/sf/fess/crud/service/BsKeyMatchService.java

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

+ 6 - 6
src/main/java/jp/sf/fess/db/allcommon/CDef.java

@@ -60,11 +60,11 @@ public interface CDef extends Classification {
             }
         }
 
-        private final String _code;
+        private String _code;
 
-        private final String _alias;
+        private String _alias;
 
-        private final String[] _sisters;
+        private String[] _sisters;
 
         private ProcessType(final String code, final String alias,
                 final String[] sisters) {
@@ -178,11 +178,11 @@ public interface CDef extends Classification {
             }
         }
 
-        private final String _code;
+        private String _code;
 
-        private final String _alias;
+        private String _alias;
 
-        private final String[] _sisters;
+        private String[] _sisters;
 
         private AccessType(final String code, final String alias,
                 final String[] sisters) {

+ 21 - 3
src/main/java/jp/sf/fess/db/allcommon/DBFluteConfig.java

@@ -77,6 +77,8 @@ public class DBFluteConfig {
 
     protected boolean _innerJoinAutoDetect = true;
 
+    protected boolean _thatsBadTimingDetect = false;
+
     protected boolean _emptyStringQueryAllowed;
 
     protected boolean _emptyStringParameterAllowed;
@@ -194,8 +196,8 @@ public class DBFluteConfig {
     }
 
     // ===================================================================================
-    //                                                                          Inner Join
-    //                                                                          ==========
+    //                                                              Inner Join Auto Detect
+    //                                                              ======================
     public boolean isInnerJoinAutoDetect() {
         return _innerJoinAutoDetect;
     }
@@ -208,6 +210,22 @@ public class DBFluteConfig {
         _innerJoinAutoDetect = innerJoinAutoDetect;
     }
 
+    // ===================================================================================
+    //                                                            That's-Bad-Timing Detect
+    //                                                            ========================
+    public boolean isThatsBadTimingDetect() {
+        return _thatsBadTimingDetect;
+    }
+
+    public void setThatsBadTimingDetect(final boolean thatsBadTimingDetect) {
+        assertNotLocked();
+        if (_log.isInfoEnabled()) {
+            _log.info("...Setting thatsBadTimingDetect: "
+                    + thatsBadTimingDetect);
+        }
+        _thatsBadTimingDetect = thatsBadTimingDetect;
+    }
+
     // ===================================================================================
     //                                                                       Invalid Query
     //                                                                       =============
@@ -728,7 +746,7 @@ public class DBFluteConfig {
     // -----------------------------------------------------
     //                                                Spring
     //                                                ------
-    protected static class SpringTransactionalDataSourceHandler implements
+    public static class SpringTransactionalDataSourceHandler implements
             DataSourceHandler {
 
         @Override

+ 21 - 22
src/main/java/jp/sf/fess/db/allcommon/DBMetaInstanceHandler.java

@@ -20,7 +20,6 @@ import java.lang.reflect.Method;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Set;
 
 import org.seasar.dbflute.Entity;
 import org.seasar.dbflute.dbmeta.DBMeta;
@@ -38,13 +37,13 @@ public class DBMetaInstanceHandler implements DBMetaProvider {
     // ===================================================================================
     //                                                                        Resource Map
     //                                                                        ============
-    /** The map of DB meta instance by key: table DB-name. */
+    /** The map of DB meta instance by key 'table DB-name'. (NotNull, LazyLoaded) */
     protected static final Map<String, DBMeta> _tableDbNameInstanceMap = newHashMap();
 
-    /** The map of DB meta instance by key: entity type. */
+    /** The map of DB meta instance by key 'entity type'. (NotNull, LazyLoaded) */
     protected static final Map<Class<?>, DBMeta> _entityTypeInstanceMap = newHashMap();
 
-    /** The map of table DB name and DB meta class name. */
+    /** The map of table DB name and DB meta class name. (NotNull) */
     protected static final Map<String, String> _tableDbNameClassNameMap;
     static {
         final Map<String, String> tmpMap = newHashMap();
@@ -71,6 +70,7 @@ public class DBMetaInstanceHandler implements DBMetaProvider {
         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("KEY_MATCH", "jp.sf.fess.db.bsentity.dbmeta.KeyMatchDbm");
         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");
@@ -98,19 +98,18 @@ public class DBMetaInstanceHandler implements DBMetaProvider {
         _tableDbNameClassNameMap = Collections.unmodifiableMap(tmpMap);
     }
 
-    /** The flexible map of table DB name. This is for conversion at finding. */
+    /** The flexible map of table DB name for conversion in finding process. (NotNull) */
     protected static final Map<String, String> _tableDbNameFlexibleMap = StringKeyMap
             .createAsFlexible();
     static {
-        final Set<String> tableDbNameSet = _tableDbNameClassNameMap.keySet();
-        for (final String tableDbName : tableDbNameSet) {
+        for (final String tableDbName : _tableDbNameClassNameMap.keySet()) {
             _tableDbNameFlexibleMap.put(tableDbName, tableDbName);
         }
     }
 
     /**
      * Get the unmodifiable map of DB meta.
-     * @return The unmodifiable map that contains all instances of DB meta. (NotNull & NotEmpty)
+     * @return The unmodifiable map that contains all instances of DB meta. (NotNull, NotEmpty)
      */
     public static Map<String, DBMeta> getUnmodifiableDBMetaMap() {
         initializeDBMetaMap();
@@ -131,8 +130,7 @@ public class DBMetaInstanceHandler implements DBMetaProvider {
                 findDBMeta(tableDbName); // initialize
             }
             if (!isInitialized()) {
-                String msg = "Failed to initialize tableDbNameInstanceMap:";
-                msg = msg + " tableDbNameInstanceMap="
+                final String msg = "Failed to initialize tableDbNameInstanceMap: "
                         + _tableDbNameInstanceMap;
                 throw new IllegalStateException(msg);
             }
@@ -209,7 +207,7 @@ public class DBMetaInstanceHandler implements DBMetaProvider {
     }
 
     // ===================================================================================
-    //                                                                       By Table Name
+    //                                                                       by Table Name
     //                                                                       =============
     /**
      * @param tableFlexibleName The flexible name of table. (NotNull)
@@ -277,7 +275,7 @@ public class DBMetaInstanceHandler implements DBMetaProvider {
     }
 
     // ===================================================================================
-    //                                                                      By Entity Type
+    //                                                                      by Entity Type
     //                                                                      ==============
     /**
      * @param entityType The entity type of table, which should implement the entity interface. (NotNull)
@@ -307,21 +305,22 @@ public class DBMetaInstanceHandler implements DBMetaProvider {
             if (dbmetaName == null) {
                 return null;
             }
-            _tableDbNameInstanceMap.put(tableDbName, getDBMeta(dbmetaName));
+            _tableDbNameInstanceMap.put(tableDbName,
+                    toDBMetaInstance(dbmetaName));
             return _tableDbNameInstanceMap.get(tableDbName);
         }
     }
 
-    protected static DBMeta getDBMeta(final String className) {
+    protected static DBMeta toDBMetaInstance(final String dbmetaName) {
         try {
-            final Class<?> clazz = Class.forName(className);
-            final Method methoz = clazz
-                    .getMethod("getInstance", (Class[]) null);
-            final Object result = methoz.invoke(null, (Object[]) null);
+            final Class<?> dbmetaType = Class.forName(dbmetaName);
+            final Method method = dbmetaType.getMethod("getInstance",
+                    (Class[]) null);
+            final Object result = method.invoke(null, (Object[]) null);
             return (DBMeta) result;
         } catch (final Exception e) {
-            throw new RuntimeException("Failed to get the instance: "
-                    + className, e);
+            final String msg = "Failed to get the instance: " + dbmetaName;
+            throw new IllegalStateException(msg, e);
         }
     }
 
@@ -353,8 +352,8 @@ public class DBMetaInstanceHandler implements DBMetaProvider {
         try {
             return (Entity) entityType.newInstance();
         } catch (final Exception e) {
-            throw new RuntimeException("Failed to new the instance: "
-                    + entityType, e);
+            final String msg = "Failed to new the instance: " + entityType;
+            throw new IllegalStateException(msg, e);
         }
     }
 

+ 31 - 20
src/main/java/jp/sf/fess/db/allcommon/ImplementedBehaviorSelector.java

@@ -17,14 +17,15 @@
 package jp.sf.fess.db.allcommon;
 
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.seasar.dbflute.BehaviorSelector;
 import org.seasar.dbflute.bhv.BehaviorReadable;
 import org.seasar.dbflute.dbmeta.DBMeta;
+import org.seasar.dbflute.exception.IllegalBehaviorStateException;
 import org.seasar.dbflute.util.DfTraceViewUtil;
 import org.seasar.dbflute.util.DfTypeUtil;
 import org.seasar.framework.container.ComponentNotFoundRuntimeException;
@@ -46,8 +47,8 @@ public class ImplementedBehaviorSelector implements BehaviorSelector {
     // ===================================================================================
     //                                                                           Attribute
     //                                                                           =========
-    /** The cache of behavior. */
-    protected final Map<Class<? extends BehaviorReadable>, BehaviorReadable> _behaviorCache = newHashMap();
+    /** The concurrent cache of behavior. */
+    protected final Map<Class<? extends BehaviorReadable>, BehaviorReadable> _behaviorCache = newConcurrentHashMap();
 
     /** The container of Seasar. */
     protected S2Container _container;
@@ -56,7 +57,7 @@ public class ImplementedBehaviorSelector implements BehaviorSelector {
     //                                                                          Initialize
     //                                                                          ==========
     /**
-     * Initialize condition-bean meta data. <br />
+     * Initialize condition-bean meta data.
      */
     @Override
     public void initializeConditionBeanMetaData() {
@@ -66,16 +67,23 @@ public class ImplementedBehaviorSelector implements BehaviorSelector {
         long before = 0;
         if (_log.isInfoEnabled()) {
             before = System.currentTimeMillis();
-            _log.info("/= = = = = = = = = = = = = = = = = initializeConditionBeanMetaData()");
+            _log.info("...Initializing condition-bean meta data");
         }
+        int count = 0;
         for (final DBMeta dbmeta : dbmetas) {
-            final BehaviorReadable bhv = byName(dbmeta.getTableDbName());
-            bhv.warmUpCommand();
+            try {
+                final BehaviorReadable bhv = byName(dbmeta.getTableDbName());
+                bhv.warmUpCommand();
+                ++count;
+            } catch (final IllegalBehaviorStateException ignored) { // means the behavior is suppressed
+                if (_log.isDebugEnabled()) {
+                    _log.debug("No behavior for " + dbmeta.getTableDbName());
+                }
+            }
         }
         if (_log.isInfoEnabled()) {
             final long after = System.currentTimeMillis();
-            _log.info("Initialized Count: " + dbmetas.size());
-            _log.info("= = = = = = = = = =/ ["
+            _log.info("CB initialized: " + count + " ["
                     + DfTraceViewUtil.convertToPerformanceView(after - before)
                     + "]");
         }
@@ -85,10 +93,10 @@ public class ImplementedBehaviorSelector implements BehaviorSelector {
     //                                                                            Selector
     //                                                                            ========
     /**
-     * Select behavior.
+     * Select behavior instance by the type.
      * @param <BEHAVIOR> The type of behavior.
      * @param behaviorType Behavior type. (NotNull)
-     * @return Behavior. (NotNull)
+     * @return The selected instance of the behavior. (NotNull)
      */
     @Override
     @SuppressWarnings("unchecked")
@@ -112,9 +120,11 @@ public class ImplementedBehaviorSelector implements BehaviorSelector {
     }
 
     /**
-     * Select behavior-readable by name.
-     * @param tableFlexibleName Table flexible-name. (NotNull)
-     * @return Behavior-readable. (NotNull)
+     * Select behavior (as readable type) by name.
+     * @param tableFlexibleName The flexible-name of table. (NotNull)
+     * @return The instance of found behavior. (NotNull)
+     * @throws org.seasar.dbflute.exception.DBMetaNotFoundException When the table is not found.
+     * @throws org.seasar.dbflute.exception.IllegalBehaviorStateException When the behavior class is suppressed.
      */
     @Override
     public BehaviorReadable byName(final String tableFlexibleName) {
@@ -127,8 +137,9 @@ public class ImplementedBehaviorSelector implements BehaviorSelector {
 
     /**
      * Get behavior-type by DB meta.
-     * @param dbmeta DB meta. (NotNull)
-     * @return Behavior-type. (NotNull)
+     * @param dbmeta The instance of DB meta for the behavior. (NotNull)
+     * @return The type of behavior (as readable type). (NotNull)
+     * @throws org.seasar.dbflute.exception.IllegalBehaviorStateException When the behavior class is suppressed.
      */
     @SuppressWarnings("unchecked")
     protected Class<BehaviorReadable> getBehaviorType(final DBMeta dbmeta) {
@@ -143,8 +154,8 @@ public class ImplementedBehaviorSelector implements BehaviorSelector {
             behaviorType = (Class<BehaviorReadable>) Class
                     .forName(behaviorTypeName);
         } catch (final ClassNotFoundException e) {
-            throw new RuntimeException("The class does not exist: "
-                    + behaviorTypeName, e);
+            throw new IllegalBehaviorStateException(
+                    "The class does not exist: " + behaviorTypeName, e);
         }
         return behaviorType;
     }
@@ -184,8 +195,8 @@ public class ImplementedBehaviorSelector implements BehaviorSelector {
         return DfTypeUtil.toClassTitle(obj);
     }
 
-    protected <KEY, VALUE> HashMap<KEY, VALUE> newHashMap() {
-        return new HashMap<KEY, VALUE>();
+    protected <KEY, VALUE> ConcurrentHashMap<KEY, VALUE> newConcurrentHashMap() {
+        return new ConcurrentHashMap<KEY, VALUE>();
     }
 
     // ===================================================================================

+ 83 - 10
src/main/java/jp/sf/fess/db/allcommon/ImplementedInvokerAssistant.java

@@ -34,6 +34,7 @@ import org.seasar.dbflute.jdbc.HandlingDataSourceWrapper;
 import org.seasar.dbflute.jdbc.SQLExceptionDigger;
 import org.seasar.dbflute.jdbc.StatementConfig;
 import org.seasar.dbflute.jdbc.StatementFactory;
+import org.seasar.dbflute.optional.RelationOptionalFactory;
 import org.seasar.dbflute.outsidesql.factory.DefaultOutsideSqlExecutorFactory;
 import org.seasar.dbflute.outsidesql.factory.OutsideSqlExecutorFactory;
 import org.seasar.dbflute.resource.ResourceParameter;
@@ -91,6 +92,8 @@ public class ImplementedInvokerAssistant implements InvokerAssistant {
 
     protected volatile SequenceCacheHandler _sequenceCacheHandler;
 
+    protected volatile RelationOptionalFactory _relationOptionalFactory;
+
     // -----------------------------------------------------
     //                                       Disposable Flag
     //                                       ---------------
@@ -165,7 +168,11 @@ public class ImplementedInvokerAssistant implements InvokerAssistant {
         if (creator != null) {
             return creator;
         }
-        return new ImplementedSqlClauseCreator(); // as default
+        return newImplementedSqlClauseCreator(); // as default
+    }
+
+    protected ImplementedSqlClauseCreator newImplementedSqlClauseCreator() {
+        return new ImplementedSqlClauseCreator();
     }
 
     // -----------------------------------------------------
@@ -186,7 +193,7 @@ public class ImplementedInvokerAssistant implements InvokerAssistant {
     }
 
     protected StatementFactory createStatementFactory() {
-        final TnStatementFactoryImpl factory = new TnStatementFactoryImpl();
+        final TnStatementFactoryImpl factory = newStatementFactoryImpl();
         factory.setDefaultStatementConfig(assistDefaultStatementConfig());
         factory.setInternalDebug(DBFluteConfig.getInstance().isInternalDebug());
         factory.setCursorSelectFetchSize(DBFluteConfig.getInstance()
@@ -194,6 +201,10 @@ public class ImplementedInvokerAssistant implements InvokerAssistant {
         return factory;
     }
 
+    protected TnStatementFactoryImpl newStatementFactoryImpl() {
+        return new TnStatementFactoryImpl();
+    }
+
     // -----------------------------------------------------
     //                                Bean Meta Data Factory
     //                                ----------------------
@@ -212,12 +223,46 @@ public class ImplementedInvokerAssistant implements InvokerAssistant {
     }
 
     protected TnBeanMetaDataFactory createBeanMetaDataFactory() {
-        final TnBeanMetaDataFactoryExtension factory = new TnBeanMetaDataFactoryExtension();
+        final RelationOptionalFactory relationOptionalFactory = assistRelationOptionalFactory();
+        final TnBeanMetaDataFactoryExtension factory = newBeanMetaDataFactoryExtension(relationOptionalFactory);
         factory.setDataSource(_dataSource);
         factory.setInternalDebug(DBFluteConfig.getInstance().isInternalDebug());
         return factory;
     }
 
+    protected TnBeanMetaDataFactoryExtension newBeanMetaDataFactoryExtension(
+            final RelationOptionalFactory relationOptionalFactory) {
+        return new TnBeanMetaDataFactoryExtension(relationOptionalFactory);
+    }
+
+    // -----------------------------------------------------
+    //                             Relation Optional Factory
+    //                             -------------------------
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public RelationOptionalFactory assistRelationOptionalFactory() {
+        if (_relationOptionalFactory != null) {
+            return _relationOptionalFactory;
+        }
+        synchronized (this) {
+            if (_relationOptionalFactory != null) {
+                return _relationOptionalFactory;
+            }
+            _relationOptionalFactory = createRelationOptionalFactory();
+        }
+        return _relationOptionalFactory;
+    }
+
+    protected RelationOptionalFactory createRelationOptionalFactory() {
+        return newRelationOptionalFactory();
+    }
+
+    protected RelationOptionalFactory newRelationOptionalFactory() {
+        return new RelationOptionalFactory();
+    }
+
     // -----------------------------------------------------
     //                                  SQL Analyzer Factory
     //                                  --------------------
@@ -239,6 +284,10 @@ public class ImplementedInvokerAssistant implements InvokerAssistant {
     }
 
     protected SqlAnalyzerFactory createSqlAnalyzerFactory() {
+        return newDefaultSqlAnalyzerFactory();
+    }
+
+    protected DefaultSqlAnalyzerFactory newDefaultSqlAnalyzerFactory() {
         return new DefaultSqlAnalyzerFactory();
     }
 
@@ -268,6 +317,10 @@ public class ImplementedInvokerAssistant implements InvokerAssistant {
         if (factory != null) {
             return factory;
         }
+        return newDefaultOutsideSqlExecutorFactory(); // as default
+    }
+
+    protected DefaultOutsideSqlExecutorFactory newDefaultOutsideSqlExecutorFactory() {
         return new DefaultOutsideSqlExecutorFactory();
     }
 
@@ -279,6 +332,10 @@ public class ImplementedInvokerAssistant implements InvokerAssistant {
      */
     @Override
     public SQLExceptionDigger assistSQLExceptionDigger() {
+        return createSQLExceptionDigger();
+    }
+
+    protected SQLExceptionDigger createSQLExceptionDigger() {
         return DBFluteConfig.getInstance().getSQLExceptionDigger();
     }
 
@@ -303,6 +360,10 @@ public class ImplementedInvokerAssistant implements InvokerAssistant {
     }
 
     protected SQLExceptionHandlerFactory createSQLExceptionHandlerFactory() {
+        return newDefaultSQLExceptionHandlerFactory();
+    }
+
+    protected DefaultSQLExceptionHandlerFactory newDefaultSQLExceptionHandlerFactory() {
         return new DefaultSQLExceptionHandlerFactory();
     }
 
@@ -327,7 +388,7 @@ public class ImplementedInvokerAssistant implements InvokerAssistant {
     }
 
     protected SequenceCacheHandler createSequenceCacheHandler() {
-        final SequenceCacheHandler handler = new SequenceCacheHandler();
+        final SequenceCacheHandler handler = newSequenceCacheHandler();
         final SequenceCacheKeyGenerator generator = DBFluteConfig.getInstance()
                 .getSequenceCacheKeyGenerator();
         if (generator != null) {
@@ -337,6 +398,10 @@ public class ImplementedInvokerAssistant implements InvokerAssistant {
         return handler;
     }
 
+    protected SequenceCacheHandler newSequenceCacheHandler() {
+        return new SequenceCacheHandler();
+    }
+
     // -----------------------------------------------------
     //                                     SQL File Encoding
     //                                     -----------------
@@ -374,16 +439,24 @@ public class ImplementedInvokerAssistant implements InvokerAssistant {
     //                                    ------------------
     @Override
     public ResourceParameter assistResourceParameter() {
-        final ResourceParameter resourceParameter = new ResourceParameter();
-        resourceParameter.setOutsideSqlPackage(DBFluteConfig.getInstance()
+        return createResourceParameter();
+    }
+
+    protected ResourceParameter createResourceParameter() {
+        final ResourceParameter parameter = newResourceParameter();
+        parameter.setOutsideSqlPackage(DBFluteConfig.getInstance()
                 .getOutsideSqlPackage());
-        resourceParameter.setLogDateFormat(DBFluteConfig.getInstance()
+        parameter.setLogDateFormat(DBFluteConfig.getInstance()
                 .getLogDateFormat());
-        resourceParameter.setLogTimestampFormat(DBFluteConfig.getInstance()
+        parameter.setLogTimestampFormat(DBFluteConfig.getInstance()
                 .getLogTimestampFormat());
-        resourceParameter.setInternalDebug(DBFluteConfig.getInstance()
+        parameter.setInternalDebug(DBFluteConfig.getInstance()
                 .isInternalDebug());
-        return resourceParameter;
+        return parameter;
+    }
+
+    protected ResourceParameter newResourceParameter() {
+        return new ResourceParameter();
     }
 
     // -----------------------------------------------------

+ 8 - 1
src/main/java/jp/sf/fess/db/allcommon/ImplementedSqlClauseCreator.java

@@ -92,7 +92,7 @@ public class ImplementedSqlClauseCreator implements SqlClauseCreator {
             sqlClause = createSqlClauseSqlite(tableDbName);
         } else if (isCurrentDBDef(DBDef.MSAccess)) {
             sqlClause = createSqlClauseMsAccess(tableDbName);
-        } else if (isCurrentDBDef(DBDef.FireBird)) {
+        } else if (isCurrentDBDef(DBDef.Firebird)) {
             sqlClause = createSqlClauseFirebird(tableDbName);
         } else if (isCurrentDBDef(DBDef.Sybase)) {
             sqlClause = createSqlClauseSybase(tableDbName);
@@ -177,6 +177,9 @@ public class ImplementedSqlClauseCreator implements SqlClauseCreator {
         if (isInnerJoinAutoDetect()) {
             sqlClause.allowInnerJoinAutoDetect();
         }
+        if (isThatsBadTimingDetect()) {
+            sqlClause.allowThatsBadTimingDetect();
+        }
         if (isEmptyStringQueryAllowed()) {
             sqlClause.allowEmptyStringQuery();
         }
@@ -199,6 +202,10 @@ public class ImplementedSqlClauseCreator implements SqlClauseCreator {
         return DBFluteConfig.getInstance().isInnerJoinAutoDetect();
     }
 
+    protected boolean isThatsBadTimingDetect() {
+        return DBFluteConfig.getInstance().isThatsBadTimingDetect();
+    }
+
     protected boolean isEmptyStringQueryAllowed() {
         return DBFluteConfig.getInstance().isEmptyStringQueryAllowed();
     }

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 385 - 345
src/main/java/jp/sf/fess/db/bsbhv/BsClickLogBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 353 - 343
src/main/java/jp/sf/fess/db/bsbhv/BsCrawlingSessionBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 387 - 368
src/main/java/jp/sf/fess/db/bsbhv/BsCrawlingSessionInfoBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 334 - 352
src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToLabelTypeMappingBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 333 - 352
src/main/java/jp/sf/fess/db/bsbhv/BsDataConfigToRoleTypeMappingBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 360 - 332
src/main/java/jp/sf/fess/db/bsbhv/BsDataCrawlingConfigBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 389 - 336
src/main/java/jp/sf/fess/db/bsbhv/BsFailureUrlBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 367 - 307
src/main/java/jp/sf/fess/db/bsbhv/BsFavoriteLogBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 330 - 359
src/main/java/jp/sf/fess/db/bsbhv/BsFileAuthenticationBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 340 - 358
src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToLabelTypeMappingBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 333 - 352
src/main/java/jp/sf/fess/db/bsbhv/BsFileConfigToRoleTypeMappingBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 427 - 415
src/main/java/jp/sf/fess/db/bsbhv/BsFileCrawlingConfigBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 382 - 327
src/main/java/jp/sf/fess/db/bsbhv/BsJobLogBhv.java


+ 1662 - 0
src/main/java/jp/sf/fess/db/bsbhv/BsKeyMatchBhv.java

@@ -0,0 +1,1662 @@
+/*
+ * Copyright 2009-2014 the CodeLibs Project and the Others.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+
+package jp.sf.fess.db.bsbhv;
+
+import java.util.List;
+
+import jp.sf.fess.db.bsbhv.loader.LoaderOfKeyMatch;
+import jp.sf.fess.db.bsentity.dbmeta.KeyMatchDbm;
+import jp.sf.fess.db.cbean.KeyMatchCB;
+import jp.sf.fess.db.exbhv.KeyMatchBhv;
+import jp.sf.fess.db.exentity.KeyMatch;
+
+import org.seasar.dbflute.Entity;
+import org.seasar.dbflute.bhv.AbstractBehaviorWritable;
+import org.seasar.dbflute.bhv.DeleteOption;
+import org.seasar.dbflute.bhv.InsertOption;
+import org.seasar.dbflute.bhv.QueryInsertSetupper;
+import org.seasar.dbflute.bhv.ReferrerLoaderHandler;
+import org.seasar.dbflute.bhv.UpdateOption;
+import org.seasar.dbflute.cbean.ConditionBean;
+import org.seasar.dbflute.cbean.EntityRowHandler;
+import org.seasar.dbflute.cbean.ListResultBean;
+import org.seasar.dbflute.cbean.PagingResultBean;
+import org.seasar.dbflute.cbean.SpecifyQuery;
+import org.seasar.dbflute.cbean.chelper.HpSLSExecutor;
+import org.seasar.dbflute.cbean.chelper.HpSLSFunction;
+import org.seasar.dbflute.dbmeta.DBMeta;
+import org.seasar.dbflute.exception.BatchEntityAlreadyUpdatedException;
+import org.seasar.dbflute.exception.DangerousResultSizeException;
+import org.seasar.dbflute.exception.EntityAlreadyDeletedException;
+import org.seasar.dbflute.exception.EntityAlreadyExistsException;
+import org.seasar.dbflute.exception.EntityAlreadyUpdatedException;
+import org.seasar.dbflute.exception.EntityDuplicatedException;
+import org.seasar.dbflute.exception.NonQueryDeleteNotAllowedException;
+import org.seasar.dbflute.exception.NonQueryUpdateNotAllowedException;
+import org.seasar.dbflute.exception.SelectEntityConditionNotFoundException;
+import org.seasar.dbflute.optional.OptionalEntity;
+import org.seasar.dbflute.outsidesql.executor.OutsideSqlBasicExecutor;
+
+/**
+ * The behavior of KEY_MATCH as TABLE. <br />
+ * <pre>
+ * [primary key]
+ *     ID
+ *
+ * [column]
+ *     ID, TERM, QUERY, MAX_SIZE, BOOST, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETED_BY, DELETED_TIME, VERSION_NO
+ *
+ * [sequence]
+ *
+ *
+ * [identity]
+ *     ID
+ *
+ * [version-no]
+ *     VERSION_NO
+ *
+ * [foreign table]
+ *
+ *
+ * [referrer table]
+ *
+ *
+ * [foreign property]
+ *
+ *
+ * [referrer property]
+ *
+ * </pre>
+ * @author DBFlute(AutoGenerator)
+ */
+public abstract class BsKeyMatchBhv extends AbstractBehaviorWritable {
+
+    // ===================================================================================
+    //                                                                          Definition
+    //                                                                          ==========
+    /*df:beginQueryPath*/
+    /*df:endQueryPath*/
+
+    // ===================================================================================
+    //                                                                          Table name
+    //                                                                          ==========
+    /** @return The name on database of table. (NotNull) */
+    @Override
+    public String getTableDbName() {
+        return "KEY_MATCH";
+    }
+
+    // ===================================================================================
+    //                                                                              DBMeta
+    //                                                                              ======
+    /** {@inheritDoc} */
+    @Override
+    public DBMeta getDBMeta() {
+        return KeyMatchDbm.getInstance();
+    }
+
+    /** @return The instance of DBMeta as my table type. (NotNull) */
+    public KeyMatchDbm getMyDBMeta() {
+        return KeyMatchDbm.getInstance();
+    }
+
+    // ===================================================================================
+    //                                                                        New Instance
+    //                                                                        ============
+    /** {@inheritDoc} */
+    @Override
+    public KeyMatch newEntity() {
+        return new KeyMatch();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public KeyMatchCB newConditionBean() {
+        return new KeyMatchCB();
+    }
+
+    /** @return The instance of new entity as my table type. (NotNull) */
+    public KeyMatch newMyEntity() {
+        return new KeyMatch();
+    }
+
+    /** @return The instance of new condition-bean as my table type. (NotNull) */
+    public KeyMatchCB newMyConditionBean() {
+        return new KeyMatchCB();
+    }
+
+    // ===================================================================================
+    //                                                                        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>
+     * KeyMatchCB cb = new KeyMatchCB();
+     * cb.query().setFoo...(value);
+     * int count = keyMatchBhv.<span style="color: #DD4747">selectCount</span>(cb);
+     * </pre>
+     * @param cb The condition-bean of KeyMatch. (NotNull)
+     * @return The count for the condition. (NotMinus)
+     */
+    public int selectCount(final KeyMatchCB cb) {
+        return facadeSelectCount(cb);
+    }
+
+    protected int facadeSelectCount(final KeyMatchCB cb) {
+        return doSelectCountUniquely(cb);
+    }
+
+    protected int doSelectCountUniquely(final KeyMatchCB cb) { // called by selectCount(cb)
+        assertCBStateValid(cb);
+        return delegateSelectCountUniquely(cb);
+    }
+
+    protected int doSelectCountPlainly(final KeyMatchCB cb) { // called by selectPage(cb)
+        assertCBStateValid(cb);
+        return delegateSelectCountPlainly(cb);
+    }
+
+    @Override
+    protected int doReadCount(final ConditionBean cb) {
+        return facadeSelectCount(downcast(cb));
+    }
+
+    // ===================================================================================
+    //                                                                       Entity Select
+    //                                                                       =============
+    /**
+     * Select the entity by the condition-bean. #beforejava8 <br />
+     * <span style="color: #AD4747; font-size: 120%">The return might be null if no data, so you should have null check.</span> <br />
+     * <span style="color: #AD4747; font-size: 120%">If the data always exists as your business rule, use selectEntityWithDeletedCheck().</span>
+     * <pre>
+     * KeyMatchCB cb = new KeyMatchCB();
+     * cb.query().setFoo...(value);
+     * KeyMatch keyMatch = keyMatchBhv.<span style="color: #DD4747">selectEntity</span>(cb);
+     * if (keyMatch != null) { <span style="color: #3F7E5E">// null check</span>
+     *     ... = keyMatch.get...();
+     * } else {
+     *     ...
+     * }
+     * </pre>
+     * @param cb The condition-bean of KeyMatch. (NotNull)
+     * @return The entity selected by the condition. (NullAllowed: if no data, it returns null)
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     * @exception SelectEntityConditionNotFoundException When the condition for selecting an entity is not found.
+     */
+    public KeyMatch selectEntity(final KeyMatchCB cb) {
+        return facadeSelectEntity(cb);
+    }
+
+    protected KeyMatch facadeSelectEntity(final KeyMatchCB cb) {
+        return doSelectEntity(cb, typeOfSelectedEntity());
+    }
+
+    protected <ENTITY extends KeyMatch> ENTITY doSelectEntity(
+            final KeyMatchCB cb, final Class<ENTITY> tp) {
+        return helpSelectEntityInternally(cb, tp);
+    }
+
+    protected <ENTITY extends KeyMatch> OptionalEntity<ENTITY> doSelectOptionalEntity(
+            final KeyMatchCB cb, final Class<ENTITY> tp) {
+        return createOptionalEntity(doSelectEntity(cb, tp), cb);
+    }
+
+    @Override
+    protected Entity doReadEntity(final ConditionBean cb) {
+        return facadeSelectEntity(downcast(cb));
+    }
+
+    /**
+     * Select the entity by the condition-bean with deleted check. <br />
+     * <span style="color: #AD4747; font-size: 120%">If the data always exists as your business rule, this method is good.</span>
+     * <pre>
+     * KeyMatchCB cb = new KeyMatchCB();
+     * cb.query().setFoo...(value);
+     * KeyMatch keyMatch = keyMatchBhv.<span style="color: #DD4747">selectEntityWithDeletedCheck</span>(cb);
+     * ... = keyMatch.get...(); <span style="color: #3F7E5E">// the entity always be not null</span>
+     * </pre>
+     * @param cb The condition-bean of KeyMatch. (NotNull)
+     * @return The entity selected by the condition. (NotNull: if no data, throws exception)
+     * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     * @exception SelectEntityConditionNotFoundException When the condition for selecting an entity is not found.
+     */
+    public KeyMatch selectEntityWithDeletedCheck(final KeyMatchCB cb) {
+        return facadeSelectEntityWithDeletedCheck(cb);
+    }
+
+    protected KeyMatch facadeSelectEntityWithDeletedCheck(final KeyMatchCB cb) {
+        return doSelectEntityWithDeletedCheck(cb, typeOfSelectedEntity());
+    }
+
+    protected <ENTITY extends KeyMatch> ENTITY doSelectEntityWithDeletedCheck(
+            final KeyMatchCB cb, final Class<ENTITY> tp) {
+        assertCBStateValid(cb);
+        assertObjectNotNull("entityType", tp);
+        return helpSelectEntityWithDeletedCheckInternally(cb, tp);
+    }
+
+    @Override
+    protected Entity doReadEntityWithDeletedCheck(final ConditionBean cb) {
+        return facadeSelectEntityWithDeletedCheck(downcast(cb));
+    }
+
+    /**
+     * Select the entity by the primary-key value.
+     * @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
+     * @return The entity selected by the PK. (NullAllowed: if no data, it returns null)
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     * @exception SelectEntityConditionNotFoundException When the condition for selecting an entity is not found.
+     */
+    public KeyMatch selectByPKValue(final Long id) {
+        return facadeSelectByPKValue(id);
+    }
+
+    protected KeyMatch facadeSelectByPKValue(final Long id) {
+        return doSelectByPK(id, typeOfSelectedEntity());
+    }
+
+    protected <ENTITY extends KeyMatch> ENTITY doSelectByPK(final Long id,
+            final Class<ENTITY> tp) {
+        return doSelectEntity(xprepareCBAsPK(id), tp);
+    }
+
+    protected <ENTITY extends KeyMatch> OptionalEntity<ENTITY> doSelectOptionalByPK(
+            final Long id, final Class<ENTITY> tp) {
+        return createOptionalEntity(doSelectByPK(id, tp), id);
+    }
+
+    /**
+     * Select the entity by the primary-key value with deleted check.
+     * @param id : PK, ID, NotNull, BIGINT(19). (NotNull)
+     * @return The entity selected by the PK. (NotNull: if no data, throws exception)
+     * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     * @exception SelectEntityConditionNotFoundException When the condition for selecting an entity is not found.
+     */
+    public KeyMatch selectByPKValueWithDeletedCheck(final Long id) {
+        return doSelectByPKWithDeletedCheck(id, typeOfSelectedEntity());
+    }
+
+    protected <ENTITY extends KeyMatch> ENTITY doSelectByPKWithDeletedCheck(
+            final Long id, final Class<ENTITY> tp) {
+        return doSelectEntityWithDeletedCheck(xprepareCBAsPK(id), tp);
+    }
+
+    protected KeyMatchCB xprepareCBAsPK(final Long id) {
+        assertObjectNotNull("id", id);
+        return newConditionBean().acceptPK(id);
+    }
+
+    // ===================================================================================
+    //                                                                         List Select
+    //                                                                         ===========
+    /**
+     * Select the list as result bean.
+     * <pre>
+     * KeyMatchCB cb = new KeyMatchCB();
+     * cb.query().setFoo...(value);
+     * cb.query().addOrderBy_Bar...();
+     * ListResultBean&lt;KeyMatch&gt; keyMatchList = keyMatchBhv.<span style="color: #DD4747">selectList</span>(cb);
+     * for (KeyMatch keyMatch : keyMatchList) {
+     *     ... = keyMatch.get...();
+     * }
+     * </pre>
+     * @param cb The condition-bean of KeyMatch. (NotNull)
+     * @return The result bean of selected list. (NotNull: if no data, returns empty list)
+     * @exception DangerousResultSizeException When the result size is over the specified safety size.
+     */
+    public ListResultBean<KeyMatch> selectList(final KeyMatchCB cb) {
+        return facadeSelectList(cb);
+    }
+
+    protected ListResultBean<KeyMatch> facadeSelectList(final KeyMatchCB cb) {
+        return doSelectList(cb, typeOfSelectedEntity());
+    }
+
+    protected <ENTITY extends KeyMatch> ListResultBean<ENTITY> doSelectList(
+            final KeyMatchCB cb, final Class<ENTITY> tp) {
+        return helpSelectListInternally(cb, tp);
+    }
+
+    @Override
+    protected ListResultBean<? extends Entity> doReadList(final ConditionBean cb) {
+        return facadeSelectList(downcast(cb));
+    }
+
+    // ===================================================================================
+    //                                                                         Page Select
+    //                                                                         ===========
+    /**
+     * Select the page as result bean. <br />
+     * (both count-select and paging-select are executed)
+     * <pre>
+     * KeyMatchCB cb = new KeyMatchCB();
+     * cb.query().setFoo...(value);
+     * cb.query().addOrderBy_Bar...();
+     * cb.<span style="color: #DD4747">paging</span>(20, 3); <span style="color: #3F7E5E">// 20 records per a page and current page number is 3</span>
+     * PagingResultBean&lt;KeyMatch&gt; page = keyMatchBhv.<span style="color: #DD4747">selectPage</span>(cb);
+     * int allRecordCount = page.getAllRecordCount();
+     * int allPageCount = page.getAllPageCount();
+     * boolean isExistPrePage = page.isExistPrePage();
+     * boolean isExistNextPage = page.isExistNextPage();
+     * ...
+     * for (KeyMatch keyMatch : page) {
+     *     ... = keyMatch.get...();
+     * }
+     * </pre>
+     * @param cb The condition-bean of KeyMatch. (NotNull)
+     * @return The result bean of selected page. (NotNull: if no data, returns bean as empty list)
+     * @exception DangerousResultSizeException When the result size is over the specified safety size.
+     */
+    public PagingResultBean<KeyMatch> selectPage(final KeyMatchCB cb) {
+        return facadeSelectPage(cb);
+    }
+
+    protected PagingResultBean<KeyMatch> facadeSelectPage(final KeyMatchCB cb) {
+        return doSelectPage(cb, typeOfSelectedEntity());
+    }
+
+    protected <ENTITY extends KeyMatch> PagingResultBean<ENTITY> doSelectPage(
+            final KeyMatchCB cb, final Class<ENTITY> tp) {
+        return helpSelectPageInternally(cb, tp);
+    }
+
+    @Override
+    protected PagingResultBean<? extends Entity> doReadPage(
+            final ConditionBean cb) {
+        return facadeSelectPage(downcast(cb));
+    }
+
+    // ===================================================================================
+    //                                                                       Cursor Select
+    //                                                                       =============
+    /**
+     * Select the cursor by the condition-bean.
+     * <pre>
+     * KeyMatchCB cb = new KeyMatchCB();
+     * cb.query().setFoo...(value);
+     * keyMatchBhv.<span style="color: #DD4747">selectCursor</span>(cb, new EntityRowHandler&lt;KeyMatch&gt;() {
+     *     public void handle(KeyMatch entity) {
+     *         ... = entity.getFoo...();
+     *     }
+     * });
+     * </pre>
+     * @param cb The condition-bean of KeyMatch. (NotNull)
+     * @param entityRowHandler The handler of entity row of KeyMatch. (NotNull)
+     */
+    public void selectCursor(final KeyMatchCB cb,
+            final EntityRowHandler<KeyMatch> entityRowHandler) {
+        facadeSelectCursor(cb, entityRowHandler);
+    }
+
+    protected void facadeSelectCursor(final KeyMatchCB cb,
+            final EntityRowHandler<KeyMatch> entityRowHandler) {
+        doSelectCursor(cb, entityRowHandler, typeOfSelectedEntity());
+    }
+
+    protected <ENTITY extends KeyMatch> void doSelectCursor(
+            final KeyMatchCB cb, final EntityRowHandler<ENTITY> handler,
+            final Class<ENTITY> tp) {
+        assertCBStateValid(cb);
+        assertObjectNotNull("entityRowHandler", handler);
+        assertObjectNotNull("entityType", tp);
+        assertSpecifyDerivedReferrerEntityProperty(cb, tp);
+        helpSelectCursorInternally(cb, handler, tp);
+    }
+
+    // ===================================================================================
+    //                                                                       Scalar Select
+    //                                                                       =============
+    /**
+     * 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>
+     * keyMatchBhv.<span style="color: #DD4747">scalarSelect</span>(Date.class).max(new ScalarQuery() {
+     *     public void query(KeyMatchCB cb) {
+     *         cb.specify().<span style="color: #DD4747">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 function object to specify function for scalar value. (NotNull)
+     */
+    public <RESULT> HpSLSFunction<KeyMatchCB, RESULT> scalarSelect(
+            final Class<RESULT> resultType) {
+        return facadeScalarSelect(resultType);
+    }
+
+    protected <RESULT> HpSLSFunction<KeyMatchCB, RESULT> facadeScalarSelect(
+            final Class<RESULT> resultType) {
+        return doScalarSelect(resultType, newConditionBean());
+    }
+
+    protected <RESULT, CB extends KeyMatchCB> HpSLSFunction<CB, RESULT> doScalarSelect(
+            final Class<RESULT> tp, final CB cb) {
+        assertObjectNotNull("resultType", tp);
+        assertCBStateValid(cb);
+        cb.xsetupForScalarSelect();
+        cb.getSqlClause().disableSelectIndex(); // for when you use union
+        final HpSLSExecutor<CB, RESULT> executor = createHpSLSExecutor(); // variable to resolve generic
+        return createSLSFunction(cb, tp, executor);
+    }
+
+    @Override
+    protected <RESULT> HpSLSFunction<? extends ConditionBean, RESULT> doReadScalar(
+            final Class<RESULT> tp) {
+        return facadeScalarSelect(tp);
+    }
+
+    // ===================================================================================
+    //                                                                            Sequence
+    //                                                                            ========
+    @Override
+    protected Number doReadNextVal() {
+        final String msg = "This table is NOT related to sequence: "
+                + getTableDbName();
+        throw new UnsupportedOperationException(msg);
+    }
+
+    // ===================================================================================
+    //                                                                       Load Referrer
+    //                                                                       =============
+    /**
+     * Load referrer by the the referrer loader. <br />
+     * <pre>
+     * MemberCB cb = new MemberCB();
+     * cb.query().set...
+     * List&lt;Member&gt; memberList = memberBhv.selectList(cb);
+     * memberBhv.<span style="color: #DD4747">load</span>(memberList, loader -&gt; {
+     *     loader.<span style="color: #DD4747">loadPurchaseList</span>(purchaseCB -&gt; {
+     *         purchaseCB.query().set...
+     *         purchaseCB.query().addOrderBy_PurchasePrice_Desc();
+     *     }); <span style="color: #3F7E5E">// you can also load nested referrer from here</span>
+     *     <span style="color: #3F7E5E">//}).withNestedList(purchaseLoader -&gt {</span>
+     *     <span style="color: #3F7E5E">//    purchaseLoader.loadPurchasePaymentList(...);</span>
+     *     <span style="color: #3F7E5E">//});</span>
+     *
+     *     <span style="color: #3F7E5E">// you can also pull out foreign table and load its referrer</span>
+     *     <span style="color: #3F7E5E">// (setupSelect of the foreign table should be called)</span>
+     *     <span style="color: #3F7E5E">//loader.pulloutMemberStatus().loadMemberLoginList(...)</span>
+     * }
+     * for (Member member : memberList) {
+     *     List&lt;Purchase&gt; purchaseList = member.<span style="color: #DD4747">getPurchaseList()</span>;
+     *     for (Purchase purchase : purchaseList) {
+     *         ...
+     *     }
+     * }
+     * </pre>
+     * About internal policy, the value of primary key (and others too) is treated as case-insensitive. <br />
+     * The condition-bean, which the set-upper provides, has order by FK before callback.
+     * @param keyMatchList The entity list of keyMatch. (NotNull)
+     * @param handler The callback to handle the referrer loader for actually loading referrer. (NotNull)
+     */
+    public void load(final List<KeyMatch> keyMatchList,
+            final ReferrerLoaderHandler<LoaderOfKeyMatch> handler) {
+        xassLRArg(keyMatchList, handler);
+        handler.handle(new LoaderOfKeyMatch().ready(keyMatchList,
+                _behaviorSelector));
+    }
+
+    /**
+     * Load referrer of ${referrer.referrerJavaBeansRulePropertyName} by the referrer loader. <br />
+     * <pre>
+     * MemberCB cb = new MemberCB();
+     * cb.query().set...
+     * Member member = memberBhv.selectEntityWithDeletedCheck(cb);
+     * memberBhv.<span style="color: #DD4747">load</span>(member, loader -&gt; {
+     *     loader.<span style="color: #DD4747">loadPurchaseList</span>(purchaseCB -&gt; {
+     *         purchaseCB.query().set...
+     *         purchaseCB.query().addOrderBy_PurchasePrice_Desc();
+     *     }); <span style="color: #3F7E5E">// you can also load nested referrer from here</span>
+     *     <span style="color: #3F7E5E">//}).withNestedList(purchaseLoader -&gt {</span>
+     *     <span style="color: #3F7E5E">//    purchaseLoader.loadPurchasePaymentList(...);</span>
+     *     <span style="color: #3F7E5E">//});</span>
+     *
+     *     <span style="color: #3F7E5E">// you can also pull out foreign table and load its referrer</span>
+     *     <span style="color: #3F7E5E">// (setupSelect of the foreign table should be called)</span>
+     *     <span style="color: #3F7E5E">//loader.pulloutMemberStatus().loadMemberLoginList(...)</span>
+     * }
+     * for (Member member : memberList) {
+     *     List&lt;Purchase&gt; purchaseList = member.<span style="color: #DD4747">getPurchaseList()</span>;
+     *     for (Purchase purchase : purchaseList) {
+     *         ...
+     *     }
+     * }
+     * </pre>
+     * About internal policy, the value of primary key (and others too) is treated as case-insensitive. <br />
+     * The condition-bean, which the set-upper provides, has order by FK before callback.
+     * @param keyMatch The entity of keyMatch. (NotNull)
+     * @param handler The callback to handle the referrer loader for actually loading referrer. (NotNull)
+     */
+    public void load(final KeyMatch keyMatch,
+            final ReferrerLoaderHandler<LoaderOfKeyMatch> handler) {
+        xassLRArg(keyMatch, handler);
+        handler.handle(new LoaderOfKeyMatch().ready(xnewLRAryLs(keyMatch),
+                _behaviorSelector));
+    }
+
+    // ===================================================================================
+    //                                                                   Pull out Relation
+    //                                                                   =================
+    // ===================================================================================
+    //                                                                      Extract Column
+    //                                                                      ==============
+    /**
+     * Extract the value list of (single) primary key id.
+     * @param keyMatchList The list of keyMatch. (NotNull, EmptyAllowed)
+     * @return The list of the column value. (NotNull, EmptyAllowed, NotNullElement)
+     */
+    public List<Long> extractIdList(final List<KeyMatch> keyMatchList) {
+        return helpExtractListInternally(keyMatchList, "id");
+    }
+
+    // ===================================================================================
+    //                                                                       Entity Update
+    //                                                                       =============
+    /**
+     * Insert the entity modified-only. (DefaultConstraintsEnabled)
+     * <pre>
+     * KeyMatch keyMatch = new KeyMatch();
+     * <span style="color: #3F7E5E">// if auto-increment, you don't need to set the PK value</span>
+     * keyMatch.setFoo...(value);
+     * keyMatch.setBar...(value);
+     * <span style="color: #3F7E5E">// you don't need to set values of common columns</span>
+     * <span style="color: #3F7E5E">//keyMatch.setRegisterUser(value);</span>
+     * <span style="color: #3F7E5E">//keyMatch.set...;</span>
+     * keyMatchBhv.<span style="color: #DD4747">insert</span>(keyMatch);
+     * ... = keyMatch.getPK...(); <span style="color: #3F7E5E">// if auto-increment, you can get the value after</span>
+     * </pre>
+     * <p>While, when the entity is created by select, all columns are registered.</p>
+     * @param keyMatch The entity of insert. (NotNull, PrimaryKeyNullAllowed: when auto-increment)
+     * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void insert(final KeyMatch keyMatch) {
+        doInsert(keyMatch, null);
+    }
+
+    protected void doInsert(final KeyMatch et, final InsertOption<KeyMatchCB> op) {
+        assertObjectNotNull("keyMatch", et);
+        prepareInsertOption(op);
+        delegateInsert(et, op);
+    }
+
+    protected void prepareInsertOption(final InsertOption<KeyMatchCB> op) {
+        if (op == null) {
+            return;
+        }
+        assertInsertOptionStatus(op);
+        if (op.hasSpecifiedInsertColumn()) {
+            op.resolveInsertColumnSpecification(createCBForSpecifiedUpdate());
+        }
+    }
+
+    @Override
+    protected void doCreate(final Entity et,
+            final InsertOption<? extends ConditionBean> op) {
+        doInsert(downcast(et), downcast(op));
+    }
+
+    /**
+     * Update the entity modified-only. (ZeroUpdateException, ExclusiveControl)
+     * <pre>
+     * KeyMatch keyMatch = new KeyMatch();
+     * keyMatch.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * keyMatch.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">//keyMatch.setRegisterUser(value);</span>
+     * <span style="color: #3F7E5E">//keyMatch.set...;</span>
+     * <span style="color: #3F7E5E">// if exclusive control, the value of concurrency column is required</span>
+     * keyMatch.<span style="color: #DD4747">setVersionNo</span>(value);
+     * try {
+     *     keyMatchBhv.<span style="color: #DD4747">update</span>(keyMatch);
+     * } catch (EntityAlreadyUpdatedException e) { <span style="color: #3F7E5E">// if concurrent update</span>
+     *     ...
+     * }
+     * </pre>
+     * @param keyMatch The entity of update. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull)
+     * @exception EntityAlreadyUpdatedException When the entity has already been updated.
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void update(final KeyMatch keyMatch) {
+        doUpdate(keyMatch, null);
+    }
+
+    protected void doUpdate(final KeyMatch et, final UpdateOption<KeyMatchCB> op) {
+        assertObjectNotNull("keyMatch", et);
+        prepareUpdateOption(op);
+        helpUpdateInternally(et, op);
+    }
+
+    protected void prepareUpdateOption(final UpdateOption<KeyMatchCB> op) {
+        if (op == null) {
+            return;
+        }
+        assertUpdateOptionStatus(op);
+        if (op.hasSelfSpecification()) {
+            op.resolveSelfSpecification(createCBForVaryingUpdate());
+        }
+        if (op.hasSpecifiedUpdateColumn()) {
+            op.resolveUpdateColumnSpecification(createCBForSpecifiedUpdate());
+        }
+    }
+
+    protected KeyMatchCB createCBForVaryingUpdate() {
+        final KeyMatchCB cb = newConditionBean();
+        cb.xsetupForVaryingUpdate();
+        return cb;
+    }
+
+    protected KeyMatchCB createCBForSpecifiedUpdate() {
+        final KeyMatchCB cb = newConditionBean();
+        cb.xsetupForSpecifiedUpdate();
+        return cb;
+    }
+
+    @Override
+    protected void doModify(final Entity et,
+            final UpdateOption<? extends ConditionBean> op) {
+        doUpdate(downcast(et), downcast(op));
+    }
+
+    /**
+     * Update the entity non-strictly modified-only. (ZeroUpdateException, NonExclusiveControl)
+     * <pre>
+     * KeyMatch keyMatch = new KeyMatch();
+     * keyMatch.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * keyMatch.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">//keyMatch.setRegisterUser(value);</span>
+     * <span style="color: #3F7E5E">//keyMatch.set...;</span>
+     * <span style="color: #3F7E5E">// you don't need to set a value of concurrency column</span>
+     * <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span>
+     * <span style="color: #3F7E5E">//keyMatch.setVersionNo(value);</span>
+     * keyMatchBhv.<span style="color: #DD4747">updateNonstrict</span>(keyMatch);
+     * </pre>
+     * @param keyMatch The entity of update. (NotNull, PrimaryKeyNotNull)
+     * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void updateNonstrict(final KeyMatch keyMatch) {
+        doUpdateNonstrict(keyMatch, null);
+    }
+
+    protected void doUpdateNonstrict(final KeyMatch et,
+            final UpdateOption<KeyMatchCB> op) {
+        assertObjectNotNull("keyMatch", et);
+        prepareUpdateOption(op);
+        helpUpdateNonstrictInternally(et, op);
+    }
+
+    @Override
+    protected void doModifyNonstrict(final Entity et,
+            final UpdateOption<? extends ConditionBean> op) {
+        doUpdateNonstrict(downcast(et), downcast(op));
+    }
+
+    /**
+     * Insert or update the entity modified-only. (DefaultConstraintsEnabled, ExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br />
+     * <p><span style="color: #DD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
+     * @param keyMatch The entity of insert or update. (NotNull, ...depends on insert or update)
+     * @exception EntityAlreadyUpdatedException When the entity has already been updated.
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void insertOrUpdate(final KeyMatch keyMatch) {
+        doInsertOrUpdate(keyMatch, null, null);
+    }
+
+    protected void doInsertOrUpdate(final KeyMatch et,
+            final InsertOption<KeyMatchCB> iop,
+            final UpdateOption<KeyMatchCB> uop) {
+        assertObjectNotNull("keyMatch", et);
+        helpInsertOrUpdateInternally(et, iop, uop);
+    }
+
+    @Override
+    protected void doCreateOrModify(final Entity et,
+            final InsertOption<? extends ConditionBean> iop,
+            final UpdateOption<? extends ConditionBean> uop) {
+        doInsertOrUpdate(downcast(et), downcast(iop), downcast(uop));
+    }
+
+    /**
+     * Insert or update the entity non-strictly modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br />
+     * if (the entity has no PK) { insert() } else { update(), but no data, insert() }
+     * <p><span style="color: #DD4747; font-size: 120%">Attention, you cannot update by unique keys instead of PK.</span></p>
+     * @param keyMatch The entity of insert or update. (NotNull, ...depends on insert or update)
+     * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void insertOrUpdateNonstrict(final KeyMatch keyMatch) {
+        doInsertOrUpdateNonstrict(keyMatch, null, null);
+    }
+
+    protected void doInsertOrUpdateNonstrict(final KeyMatch et,
+            final InsertOption<KeyMatchCB> iop,
+            final UpdateOption<KeyMatchCB> uop) {
+        assertObjectNotNull("keyMatch", et);
+        helpInsertOrUpdateNonstrictInternally(et, iop, uop);
+    }
+
+    @Override
+    protected void doCreateOrModifyNonstrict(final Entity et,
+            final InsertOption<? extends ConditionBean> iop,
+            final UpdateOption<? extends ConditionBean> uop) {
+        doInsertOrUpdateNonstrict(downcast(et), downcast(iop), downcast(uop));
+    }
+
+    /**
+     * Delete the entity. (ZeroUpdateException, ExclusiveControl)
+     * <pre>
+     * KeyMatch keyMatch = new KeyMatch();
+     * keyMatch.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * <span style="color: #3F7E5E">// if exclusive control, the value of concurrency column is required</span>
+     * keyMatch.<span style="color: #DD4747">setVersionNo</span>(value);
+     * try {
+     *     keyMatchBhv.<span style="color: #DD4747">delete</span>(keyMatch);
+     * } catch (EntityAlreadyUpdatedException e) { <span style="color: #3F7E5E">// if concurrent update</span>
+     *     ...
+     * }
+     * </pre>
+     * @param keyMatch The entity of delete. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull)
+     * @exception EntityAlreadyUpdatedException When the entity has already been updated.
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     */
+    public void delete(final KeyMatch keyMatch) {
+        doDelete(keyMatch, null);
+    }
+
+    protected void doDelete(final KeyMatch et, final DeleteOption<KeyMatchCB> op) {
+        assertObjectNotNull("keyMatch", et);
+        prepareDeleteOption(op);
+        helpDeleteInternally(et, op);
+    }
+
+    protected void prepareDeleteOption(final DeleteOption<KeyMatchCB> op) {
+        if (op != null) {
+            assertDeleteOptionStatus(op);
+        }
+    }
+
+    @Override
+    protected void doRemove(final Entity et,
+            final DeleteOption<? extends ConditionBean> op) {
+        doDelete(downcast(et), downcast(op));
+    }
+
+    /**
+     * Delete the entity non-strictly. {ZeroUpdateException, NonExclusiveControl}
+     * <pre>
+     * KeyMatch keyMatch = new KeyMatch();
+     * keyMatch.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * <span style="color: #3F7E5E">// you don't need to set a value of concurrency column</span>
+     * <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span>
+     * <span style="color: #3F7E5E">//keyMatch.setVersionNo(value);</span>
+     * keyMatchBhv.<span style="color: #DD4747">deleteNonstrict</span>(keyMatch);
+     * </pre>
+     * @param keyMatch The entity of delete. (NotNull, PrimaryKeyNotNull)
+     * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     */
+    public void deleteNonstrict(final KeyMatch keyMatch) {
+        doDeleteNonstrict(keyMatch, null);
+    }
+
+    protected void doDeleteNonstrict(final KeyMatch et,
+            final DeleteOption<KeyMatchCB> op) {
+        assertObjectNotNull("keyMatch", et);
+        prepareDeleteOption(op);
+        helpDeleteNonstrictInternally(et, op);
+    }
+
+    /**
+     * Delete the entity non-strictly ignoring deleted. {ZeroUpdateException, NonExclusiveControl}
+     * <pre>
+     * KeyMatch keyMatch = new KeyMatch();
+     * keyMatch.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * <span style="color: #3F7E5E">// you don't need to set a value of concurrency column</span>
+     * <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span>
+     * <span style="color: #3F7E5E">//keyMatch.setVersionNo(value);</span>
+     * keyMatchBhv.<span style="color: #DD4747">deleteNonstrictIgnoreDeleted</span>(keyMatch);
+     * <span style="color: #3F7E5E">// if the target entity doesn't exist, no exception</span>
+     * </pre>
+     * @param keyMatch The entity of delete. (NotNull, PrimaryKeyNotNull)
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     */
+    public void deleteNonstrictIgnoreDeleted(final KeyMatch keyMatch) {
+        doDeleteNonstrictIgnoreDeleted(keyMatch, null);
+    }
+
+    protected void doDeleteNonstrictIgnoreDeleted(final KeyMatch et,
+            final DeleteOption<KeyMatchCB> op) {
+        assertObjectNotNull("keyMatch", et);
+        prepareDeleteOption(op);
+        helpDeleteNonstrictIgnoreDeletedInternally(et, op);
+    }
+
+    @Override
+    protected void doRemoveNonstrict(final Entity et,
+            final DeleteOption<? extends ConditionBean> op) {
+        doDeleteNonstrict(downcast(et), downcast(op));
+    }
+
+    // ===================================================================================
+    //                                                                        Batch Update
+    //                                                                        ============
+    /**
+     * Batch-insert the entity list modified-only of same-set columns. (DefaultConstraintsEnabled) <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
+     * <p><span style="color: #DD4747; font-size: 120%">The columns of least common multiple are registered like this:</span></p>
+     * <pre>
+     * for (... : ...) {
+     *     KeyMatch keyMatch = new KeyMatch();
+     *     keyMatch.setFooName("foo");
+     *     if (...) {
+     *         keyMatch.setFooPrice(123);
+     *     }
+     *     <span style="color: #3F7E5E">// FOO_NAME and FOO_PRICE (and record meta columns) are registered</span>
+     *     <span style="color: #3F7E5E">// FOO_PRICE not-called in any entities are registered as null without default value</span>
+     *     <span style="color: #3F7E5E">// columns not-called in all entities are registered as null or default value</span>
+     *     keyMatchList.add(keyMatch);
+     * }
+     * keyMatchBhv.<span style="color: #DD4747">batchInsert</span>(keyMatchList);
+     * </pre>
+     * <p>While, when the entities are created by select, all columns are registered.</p>
+     * <p>And if the table has an identity, entities after the process don't have incremented values.
+     * (When you use the (normal) insert(), you can get the incremented value from your entity)</p>
+     * @param keyMatchList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
+     * @return The array of inserted count. (NotNull, EmptyAllowed)
+     */
+    public int[] batchInsert(final List<KeyMatch> keyMatchList) {
+        return doBatchInsert(keyMatchList, null);
+    }
+
+    protected int[] doBatchInsert(final List<KeyMatch> ls,
+            final InsertOption<KeyMatchCB> op) {
+        assertObjectNotNull("keyMatchList", ls);
+        InsertOption<KeyMatchCB> rlop;
+        if (op != null) {
+            rlop = op;
+        } else {
+            rlop = createPlainInsertOption();
+        }
+        prepareBatchInsertOption(ls, rlop); // required
+        return delegateBatchInsert(ls, rlop);
+    }
+
+    protected void prepareBatchInsertOption(final List<KeyMatch> ls,
+            final InsertOption<KeyMatchCB> op) {
+        op.xallowInsertColumnModifiedPropertiesFragmented();
+        op.xacceptInsertColumnModifiedPropertiesIfNeeds(ls);
+        prepareInsertOption(op);
+    }
+
+    @Override
+    protected int[] doLumpCreate(final List<Entity> ls,
+            final InsertOption<? extends ConditionBean> op) {
+        return doBatchInsert(downcast(ls), downcast(op));
+    }
+
+    /**
+     * Batch-update the entity list modified-only of same-set columns. (ExclusiveControl) <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
+     * <span style="color: #DD4747; font-size: 120%">You should specify same-set columns to all entities like this:</span>
+     * <pre>
+     * for (... : ...) {
+     *     KeyMatch keyMatch = new KeyMatch();
+     *     keyMatch.setFooName("foo");
+     *     if (...) {
+     *         keyMatch.setFooPrice(123);
+     *     } else {
+     *         keyMatch.setFooPrice(null); <span style="color: #3F7E5E">// updated as null</span>
+     *         <span style="color: #3F7E5E">//keyMatch.setFooDate(...); // *not allowed, fragmented</span>
+     *     }
+     *     <span style="color: #3F7E5E">// FOO_NAME and FOO_PRICE (and record meta columns) are updated</span>
+     *     <span style="color: #3F7E5E">// (others are not updated: their values are kept)</span>
+     *     keyMatchList.add(keyMatch);
+     * }
+     * keyMatchBhv.<span style="color: #DD4747">batchUpdate</span>(keyMatchList);
+     * </pre>
+     * @param keyMatchList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull, ConcurrencyColumnNotNull)
+     * @return The array of updated count. (NotNull, EmptyAllowed)
+     * @exception BatchEntityAlreadyUpdatedException When the entity has already been updated. This exception extends EntityAlreadyUpdatedException.
+     */
+    public int[] batchUpdate(final List<KeyMatch> keyMatchList) {
+        return doBatchUpdate(keyMatchList, null);
+    }
+
+    protected int[] doBatchUpdate(final List<KeyMatch> ls,
+            final UpdateOption<KeyMatchCB> op) {
+        assertObjectNotNull("keyMatchList", ls);
+        UpdateOption<KeyMatchCB> rlop;
+        if (op != null) {
+            rlop = op;
+        } else {
+            rlop = createPlainUpdateOption();
+        }
+        prepareBatchUpdateOption(ls, rlop); // required
+        return delegateBatchUpdate(ls, rlop);
+    }
+
+    protected void prepareBatchUpdateOption(final List<KeyMatch> ls,
+            final UpdateOption<KeyMatchCB> op) {
+        op.xacceptUpdateColumnModifiedPropertiesIfNeeds(ls);
+        prepareUpdateOption(op);
+    }
+
+    @Override
+    protected int[] doLumpModify(final List<Entity> ls,
+            final UpdateOption<? extends ConditionBean> op) {
+        return doBatchUpdate(downcast(ls), downcast(op));
+    }
+
+    /**
+     * Batch-update the entity list specified-only. (ExclusiveControl) <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span>
+     * keyMatchBhv.<span style="color: #DD4747">batchUpdate</span>(keyMatchList, new SpecifyQuery<KeyMatchCB>() {
+     *     public void specify(KeyMatchCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #DD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #DD4747">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>
+     * keyMatchBhv.<span style="color: #DD4747">batchUpdate</span>(keyMatchList, new SpecifyQuery<KeyMatchCB>() {
+     *     public void specify(KeyMatchCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #DD4747">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 keyMatchList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull, ConcurrencyColumnNotNull)
+     * @param updateColumnSpec The specification of update columns. (NotNull)
+     * @return The array of updated count. (NotNull, EmptyAllowed)
+     * @exception BatchEntityAlreadyUpdatedException When the entity has already been updated. This exception extends EntityAlreadyUpdatedException.
+     */
+    public int[] batchUpdate(final List<KeyMatch> keyMatchList,
+            final SpecifyQuery<KeyMatchCB> updateColumnSpec) {
+        return doBatchUpdate(keyMatchList,
+                createSpecifiedUpdateOption(updateColumnSpec));
+    }
+
+    /**
+     * Batch-update the entity list non-strictly modified-only of same-set columns. (NonExclusiveControl) <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement. <br />
+     * <span style="color: #DD4747; font-size: 140%">You should specify same-set columns to all entities like this:</span>
+     * <pre>
+     * for (... : ...) {
+     *     KeyMatch keyMatch = new KeyMatch();
+     *     keyMatch.setFooName("foo");
+     *     if (...) {
+     *         keyMatch.setFooPrice(123);
+     *     } else {
+     *         keyMatch.setFooPrice(null); <span style="color: #3F7E5E">// updated as null</span>
+     *         <span style="color: #3F7E5E">//keyMatch.setFooDate(...); // *not allowed, fragmented</span>
+     *     }
+     *     <span style="color: #3F7E5E">// FOO_NAME and FOO_PRICE (and record meta columns) are updated</span>
+     *     <span style="color: #3F7E5E">// (others are not updated: their values are kept)</span>
+     *     keyMatchList.add(keyMatch);
+     * }
+     * keyMatchBhv.<span style="color: #DD4747">batchUpdate</span>(keyMatchList);
+     * </pre>
+     * @param keyMatchList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
+     * @return The array of updated count. (NotNull, EmptyAllowed)
+     * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     */
+    public int[] batchUpdateNonstrict(final List<KeyMatch> keyMatchList) {
+        return doBatchUpdateNonstrict(keyMatchList, null);
+    }
+
+    protected int[] doBatchUpdateNonstrict(final List<KeyMatch> ls,
+            final UpdateOption<KeyMatchCB> op) {
+        assertObjectNotNull("keyMatchList", ls);
+        UpdateOption<KeyMatchCB> rlop;
+        if (op != null) {
+            rlop = op;
+        } else {
+            rlop = createPlainUpdateOption();
+        }
+        prepareBatchUpdateOption(ls, rlop);
+        return delegateBatchUpdateNonstrict(ls, rlop);
+    }
+
+    /**
+     * Batch-update the entity list non-strictly specified-only. (NonExclusiveControl) <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * <pre>
+     * <span style="color: #3F7E5E">// e.g. update two columns only</span>
+     * keyMatchBhv.<span style="color: #DD4747">batchUpdateNonstrict</span>(keyMatchList, new SpecifyQuery<KeyMatchCB>() {
+     *     public void specify(KeyMatchCB cb) { <span style="color: #3F7E5E">// the two only updated</span>
+     *         cb.specify().<span style="color: #DD4747">columnFooStatusCode()</span>; <span style="color: #3F7E5E">// should be modified in any entities</span>
+     *         cb.specify().<span style="color: #DD4747">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>
+     * keyMatchBhv.<span style="color: #DD4747">batchUpdateNonstrict</span>(keyMatchList, new SpecifyQuery<KeyMatchCB>() {
+     *     public void specify(KeyMatchCB cb) { <span style="color: #3F7E5E">// all columns are updated</span>
+     *         cb.specify().<span style="color: #DD4747">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 keyMatchList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
+     * @param updateColumnSpec The specification of update columns. (NotNull)
+     * @return The array of updated count. (NotNull, EmptyAllowed)
+     * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     */
+    public int[] batchUpdateNonstrict(final List<KeyMatch> keyMatchList,
+            final SpecifyQuery<KeyMatchCB> updateColumnSpec) {
+        return doBatchUpdateNonstrict(keyMatchList,
+                createSpecifiedUpdateOption(updateColumnSpec));
+    }
+
+    @Override
+    protected int[] doLumpModifyNonstrict(final List<Entity> ls,
+            final UpdateOption<? extends ConditionBean> op) {
+        return doBatchUpdateNonstrict(downcast(ls), downcast(op));
+    }
+
+    /**
+     * Batch-delete the entity list. (ExclusiveControl) <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * @param keyMatchList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
+     * @return The array of deleted count. (NotNull, EmptyAllowed)
+     * @exception BatchEntityAlreadyUpdatedException When the entity has already been updated. This exception extends EntityAlreadyUpdatedException.
+     */
+    public int[] batchDelete(final List<KeyMatch> keyMatchList) {
+        return doBatchDelete(keyMatchList, null);
+    }
+
+    protected int[] doBatchDelete(final List<KeyMatch> ls,
+            final DeleteOption<KeyMatchCB> op) {
+        assertObjectNotNull("keyMatchList", ls);
+        prepareDeleteOption(op);
+        return delegateBatchDelete(ls, op);
+    }
+
+    @Override
+    protected int[] doLumpRemove(final List<Entity> ls,
+            final DeleteOption<? extends ConditionBean> op) {
+        return doBatchDelete(downcast(ls), downcast(op));
+    }
+
+    /**
+     * Batch-delete the entity list non-strictly. {NonExclusiveControl} <br />
+     * This method uses executeBatch() of java.sql.PreparedStatement.
+     * @param keyMatchList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
+     * @return The array of deleted count. (NotNull, EmptyAllowed)
+     * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     */
+    public int[] batchDeleteNonstrict(final List<KeyMatch> keyMatchList) {
+        return doBatchDeleteNonstrict(keyMatchList, null);
+    }
+
+    protected int[] doBatchDeleteNonstrict(final List<KeyMatch> ls,
+            final DeleteOption<KeyMatchCB> op) {
+        assertObjectNotNull("keyMatchList", ls);
+        prepareDeleteOption(op);
+        return delegateBatchDeleteNonstrict(ls, op);
+    }
+
+    @Override
+    protected int[] doLumpRemoveNonstrict(final List<Entity> ls,
+            final DeleteOption<? extends ConditionBean> op) {
+        return doBatchDeleteNonstrict(downcast(ls), downcast(op));
+    }
+
+    // ===================================================================================
+    //                                                                        Query Update
+    //                                                                        ============
+    /**
+     * Insert the several entities by query (modified-only for fixed value).
+     * <pre>
+     * keyMatchBhv.<span style="color: #DD4747">queryInsert</span>(new QueryInsertSetupper&lt;KeyMatch, KeyMatchCB&gt;() {
+     *     public ConditionBean setup(keyMatch entity, KeyMatchCB intoCB) {
+     *         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 concurrency 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<KeyMatch, KeyMatchCB> setupper) {
+        return doQueryInsert(setupper, null);
+    }
+
+    protected int doQueryInsert(
+            final QueryInsertSetupper<KeyMatch, KeyMatchCB> sp,
+            final InsertOption<KeyMatchCB> op) {
+        assertObjectNotNull("setupper", sp);
+        prepareInsertOption(op);
+        final KeyMatch et = newEntity();
+        final KeyMatchCB cb = createCBForQueryInsert();
+        return delegateQueryInsert(et, cb, sp.setup(et, cb), op);
+    }
+
+    protected KeyMatchCB createCBForQueryInsert() {
+        final KeyMatchCB cb = newConditionBean();
+        cb.xsetupForQueryInsert();
+        return cb;
+    }
+
+    @Override
+    protected int doRangeCreate(
+            final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> setupper,
+            final InsertOption<? extends ConditionBean> op) {
+        return doQueryInsert(downcast(setupper), downcast(op));
+    }
+
+    /**
+     * Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
+     * <pre>
+     * KeyMatch keyMatch = new KeyMatch();
+     * <span style="color: #3F7E5E">// you don't need to set PK value</span>
+     * <span style="color: #3F7E5E">//keyMatch.setPK...(value);</span>
+     * keyMatch.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">//keyMatch.setRegisterUser(value);</span>
+     * <span style="color: #3F7E5E">//keyMatch.set...;</span>
+     * <span style="color: #3F7E5E">// you don't need to set a value of concurrency column</span>
+     * <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span>
+     * <span style="color: #3F7E5E">//keyMatch.setVersionNo(value);</span>
+     * KeyMatchCB cb = new KeyMatchCB();
+     * cb.query().setFoo...(value);
+     * keyMatchBhv.<span style="color: #DD4747">queryUpdate</span>(keyMatch, cb);
+     * </pre>
+     * @param keyMatch The entity that contains update values. (NotNull, PrimaryKeyNullAllowed)
+     * @param cb The condition-bean of KeyMatch. (NotNull)
+     * @return The updated count.
+     * @exception NonQueryUpdateNotAllowedException When the query has no condition.
+     */
+    public int queryUpdate(final KeyMatch keyMatch, final KeyMatchCB cb) {
+        return doQueryUpdate(keyMatch, cb, null);
+    }
+
+    protected int doQueryUpdate(final KeyMatch et, final KeyMatchCB cb,
+            final UpdateOption<KeyMatchCB> op) {
+        assertObjectNotNull("keyMatch", et);
+        assertCBStateValid(cb);
+        prepareUpdateOption(op);
+        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryUpdate(et,
+                cb, op) : 0;
+    }
+
+    @Override
+    protected int doRangeModify(final Entity et, final ConditionBean cb,
+            final UpdateOption<? extends ConditionBean> op) {
+        return doQueryUpdate(downcast(et), downcast(cb), downcast(op));
+    }
+
+    /**
+     * Delete the several entities by query. (NonExclusiveControl)
+     * <pre>
+     * KeyMatchCB cb = new KeyMatchCB();
+     * cb.query().setFoo...(value);
+     * keyMatchBhv.<span style="color: #DD4747">queryDelete</span>(keyMatch, cb);
+     * </pre>
+     * @param cb The condition-bean of KeyMatch. (NotNull)
+     * @return The deleted count.
+     * @exception NonQueryDeleteNotAllowedException When the query has no condition.
+     */
+    public int queryDelete(final KeyMatchCB cb) {
+        return doQueryDelete(cb, null);
+    }
+
+    protected int doQueryDelete(final KeyMatchCB cb,
+            final DeleteOption<KeyMatchCB> op) {
+        assertCBStateValid(cb);
+        prepareDeleteOption(op);
+        return checkCountBeforeQueryUpdateIfNeeds(cb) ? delegateQueryDelete(cb,
+                op) : 0;
+    }
+
+    @Override
+    protected int doRangeRemove(final ConditionBean cb,
+            final DeleteOption<? extends ConditionBean> op) {
+        return doQueryDelete(downcast(cb), downcast(op));
+    }
+
+    // ===================================================================================
+    //                                                                      Varying Update
+    //                                                                      ==============
+    // -----------------------------------------------------
+    //                                         Entity Update
+    //                                         -------------
+    /**
+     * Insert the entity with varying requests. <br />
+     * For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br />
+     * Other specifications are same as insert(entity).
+     * <pre>
+     * KeyMatch keyMatch = new KeyMatch();
+     * <span style="color: #3F7E5E">// if auto-increment, you don't need to set the PK value</span>
+     * keyMatch.setFoo...(value);
+     * keyMatch.setBar...(value);
+     * InsertOption<KeyMatchCB> option = new InsertOption<KeyMatchCB>();
+     * <span style="color: #3F7E5E">// you can insert by your values for common columns</span>
+     * option.disableCommonColumnAutoSetup();
+     * keyMatchBhv.<span style="color: #DD4747">varyingInsert</span>(keyMatch, option);
+     * ... = keyMatch.getPK...(); <span style="color: #3F7E5E">// if auto-increment, you can get the value after</span>
+     * </pre>
+     * @param keyMatch The entity of insert. (NotNull, PrimaryKeyNullAllowed: when auto-increment)
+     * @param option The option of insert for varying requests. (NotNull)
+     * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void varyingInsert(final KeyMatch keyMatch,
+            final InsertOption<KeyMatchCB> option) {
+        assertInsertOptionNotNull(option);
+        doInsert(keyMatch, 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>
+     * KeyMatch keyMatch = new KeyMatch();
+     * keyMatch.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * keyMatch.setOther...(value); <span style="color: #3F7E5E">// you should set only modified columns</span>
+     * <span style="color: #3F7E5E">// if exclusive control, the value of concurrency column is required</span>
+     * keyMatch.<span style="color: #DD4747">setVersionNo</span>(value);
+     * try {
+     *     <span style="color: #3F7E5E">// you can update by self calculation values</span>
+     *     UpdateOption&lt;KeyMatchCB&gt; option = new UpdateOption&lt;KeyMatchCB&gt;();
+     *     option.self(new SpecifyQuery&lt;KeyMatchCB&gt;() {
+     *         public void specify(KeyMatchCB cb) {
+     *             cb.specify().<span style="color: #DD4747">columnXxxCount()</span>;
+     *         }
+     *     }).plus(1); <span style="color: #3F7E5E">// XXX_COUNT = XXX_COUNT + 1</span>
+     *     keyMatchBhv.<span style="color: #DD4747">varyingUpdate</span>(keyMatch, option);
+     * } catch (EntityAlreadyUpdatedException e) { <span style="color: #3F7E5E">// if concurrent update</span>
+     *     ...
+     * }
+     * </pre>
+     * @param keyMatch The entity of update. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull)
+     * @param option The option of update for varying requests. (NotNull)
+     * @exception EntityAlreadyUpdatedException When the entity has already been updated.
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void varyingUpdate(final KeyMatch keyMatch,
+            final UpdateOption<KeyMatchCB> option) {
+        assertUpdateOptionNotNull(option);
+        doUpdate(keyMatch, 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>
+     * KeyMatch keyMatch = new KeyMatch();
+     * keyMatch.setPK...(value); <span style="color: #3F7E5E">// required</span>
+     * keyMatch.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 concurrency column</span>
+     * <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span>
+     * <span style="color: #3F7E5E">//keyMatch.setVersionNo(value);</span>
+     * UpdateOption&lt;KeyMatchCB&gt; option = new UpdateOption&lt;KeyMatchCB&gt;();
+     * option.self(new SpecifyQuery&lt;KeyMatchCB&gt;() {
+     *     public void specify(KeyMatchCB cb) {
+     *         cb.specify().<span style="color: #DD4747">columnFooCount()</span>;
+     *     }
+     * }).plus(1); <span style="color: #3F7E5E">// FOO_COUNT = FOO_COUNT + 1</span>
+     * keyMatchBhv.<span style="color: #DD4747">varyingUpdateNonstrict</span>(keyMatch, option);
+     * </pre>
+     * @param keyMatch The entity of update. (NotNull, PrimaryKeyNotNull)
+     * @param option The option of update for varying requests. (NotNull)
+     * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void varyingUpdateNonstrict(final KeyMatch keyMatch,
+            final UpdateOption<KeyMatchCB> option) {
+        assertUpdateOptionNotNull(option);
+        doUpdateNonstrict(keyMatch, option);
+    }
+
+    /**
+     * Insert or update the entity with varying requests. (ExclusiveControl: when update) <br />
+     * Other specifications are same as insertOrUpdate(entity).
+     * @param keyMatch The entity of insert or update. (NotNull)
+     * @param insertOption The option of insert for varying requests. (NotNull)
+     * @param updateOption The option of update for varying requests. (NotNull)
+     * @exception EntityAlreadyUpdatedException When the entity has already been updated.
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void varyingInsertOrUpdate(final KeyMatch keyMatch,
+            final InsertOption<KeyMatchCB> insertOption,
+            final UpdateOption<KeyMatchCB> updateOption) {
+        assertInsertOptionNotNull(insertOption);
+        assertUpdateOptionNotNull(updateOption);
+        doInsertOrUpdate(keyMatch, insertOption, updateOption);
+    }
+
+    /**
+     * Insert or update the entity with varying requests non-strictly. (NonExclusiveControl: when update) <br />
+     * Other specifications are same as insertOrUpdateNonstrict(entity).
+     * @param keyMatch The entity of insert or update. (NotNull)
+     * @param insertOption The option of insert for varying requests. (NotNull)
+     * @param updateOption The option of update for varying requests. (NotNull)
+     * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     * @exception EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
+     */
+    public void varyingInsertOrUpdateNonstrict(final KeyMatch keyMatch,
+            final InsertOption<KeyMatchCB> insertOption,
+            final UpdateOption<KeyMatchCB> updateOption) {
+        assertInsertOptionNotNull(insertOption);
+        assertUpdateOptionNotNull(updateOption);
+        doInsertOrUpdateNonstrict(keyMatch, 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 keyMatch The entity of delete. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull)
+     * @param option The option of update for varying requests. (NotNull)
+     * @exception EntityAlreadyUpdatedException When the entity has already been updated.
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     */
+    public void varyingDelete(final KeyMatch keyMatch,
+            final DeleteOption<KeyMatchCB> option) {
+        assertDeleteOptionNotNull(option);
+        doDelete(keyMatch, 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 keyMatch The entity of delete. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull)
+     * @param option The option of update for varying requests. (NotNull)
+     * @exception EntityAlreadyDeletedException When the entity has already been deleted. (not found)
+     * @exception EntityDuplicatedException When the entity has been duplicated.
+     */
+    public void varyingDeleteNonstrict(final KeyMatch keyMatch,
+            final DeleteOption<KeyMatchCB> option) {
+        assertDeleteOptionNotNull(option);
+        doDeleteNonstrict(keyMatch, 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 keyMatchList 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<KeyMatch> keyMatchList,
+            final InsertOption<KeyMatchCB> option) {
+        assertInsertOptionNotNull(option);
+        return doBatchInsert(keyMatchList, 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 keyMatchList 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<KeyMatch> keyMatchList,
+            final UpdateOption<KeyMatchCB> option) {
+        assertUpdateOptionNotNull(option);
+        return doBatchUpdate(keyMatchList, 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 keyMatchList 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<KeyMatch> keyMatchList,
+            final UpdateOption<KeyMatchCB> option) {
+        assertUpdateOptionNotNull(option);
+        return doBatchUpdateNonstrict(keyMatchList, option);
+    }
+
+    /**
+     * Batch-delete the list with varying requests. <br />
+     * For example, limitBatchDeleteLogging(). <br />
+     * Other specifications are same as batchDelete(entityList).
+     * @param keyMatchList 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<KeyMatch> keyMatchList,
+            final DeleteOption<KeyMatchCB> option) {
+        assertDeleteOptionNotNull(option);
+        return doBatchDelete(keyMatchList, option);
+    }
+
+    /**
+     * Batch-delete the list with varying requests non-strictly. <br />
+     * For example, limitBatchDeleteLogging(). <br />
+     * Other specifications are same as batchDeleteNonstrict(entityList).
+     * @param keyMatchList 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<KeyMatch> keyMatchList,
+            final DeleteOption<KeyMatchCB> option) {
+        assertDeleteOptionNotNull(option);
+        return doBatchDeleteNonstrict(keyMatchList, 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<KeyMatch, KeyMatchCB> setupper,
+            final InsertOption<KeyMatchCB> 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>
+     * KeyMatch keyMatch = new KeyMatch();
+     * <span style="color: #3F7E5E">// you don't need to set PK value</span>
+     * <span style="color: #3F7E5E">//keyMatch.setPK...(value);</span>
+     * keyMatch.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 concurrency column</span>
+     * <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span>
+     * <span style="color: #3F7E5E">//keyMatch.setVersionNo(value);</span>
+     * KeyMatchCB cb = new KeyMatchCB();
+     * cb.query().setFoo...(value);
+     * UpdateOption&lt;KeyMatchCB&gt; option = new UpdateOption&lt;KeyMatchCB&gt;();
+     * option.self(new SpecifyQuery&lt;KeyMatchCB&gt;() {
+     *     public void specify(KeyMatchCB cb) {
+     *         cb.specify().<span style="color: #DD4747">columnFooCount()</span>;
+     *     }
+     * }).plus(1); <span style="color: #3F7E5E">// FOO_COUNT = FOO_COUNT + 1</span>
+     * keyMatchBhv.<span style="color: #DD4747">varyingQueryUpdate</span>(keyMatch, cb, option);
+     * </pre>
+     * @param keyMatch The entity that contains update values. (NotNull) {PrimaryKeyNotRequired}
+     * @param cb The condition-bean of KeyMatch. (NotNull)
+     * @param option The option of update for varying requests. (NotNull)
+     * @return The updated count.
+     * @exception NonQueryUpdateNotAllowedException When the query has no condition (if not allowed).
+     */
+    public int varyingQueryUpdate(final KeyMatch keyMatch, final KeyMatchCB cb,
+            final UpdateOption<KeyMatchCB> option) {
+        assertUpdateOptionNotNull(option);
+        return doQueryUpdate(keyMatch, 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 KeyMatch. (NotNull)
+     * @param option The option of delete for varying requests. (NotNull)
+     * @return The deleted count.
+     * @exception NonQueryDeleteNotAllowedException When the query has no condition (if not allowed).
+     */
+    public int varyingQueryDelete(final KeyMatchCB cb,
+            final DeleteOption<KeyMatchCB> 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<KeyMatchBhv> outsideSql() {
+        return doOutsideSql();
+    }
+
+    // ===================================================================================
+    //                                                                Optimistic Lock Info
+    //                                                                ====================
+    @Override
+    protected boolean hasVersionNoValue(final Entity et) {
+        return downcast(et).getVersionNo() != null;
+    }
+
+    // ===================================================================================
+    //                                                                       Assist Helper
+    //                                                                       =============
+    protected Class<KeyMatch> typeOfSelectedEntity() {
+        return KeyMatch.class;
+    }
+
+    protected KeyMatch downcast(final Entity et) {
+        return helpEntityDowncastInternally(et, KeyMatch.class);
+    }
+
+    protected KeyMatchCB downcast(final ConditionBean cb) {
+        return helpConditionBeanDowncastInternally(cb, KeyMatchCB.class);
+    }
+
+    @SuppressWarnings("unchecked")
+    protected List<KeyMatch> downcast(final List<? extends Entity> ls) {
+        return (List<KeyMatch>) ls;
+    }
+
+    @SuppressWarnings("unchecked")
+    protected InsertOption<KeyMatchCB> downcast(
+            final InsertOption<? extends ConditionBean> op) {
+        return (InsertOption<KeyMatchCB>) op;
+    }
+
+    @SuppressWarnings("unchecked")
+    protected UpdateOption<KeyMatchCB> downcast(
+            final UpdateOption<? extends ConditionBean> op) {
+        return (UpdateOption<KeyMatchCB>) op;
+    }
+
+    @SuppressWarnings("unchecked")
+    protected DeleteOption<KeyMatchCB> downcast(
+            final DeleteOption<? extends ConditionBean> op) {
+        return (DeleteOption<KeyMatchCB>) op;
+    }
+
+    @SuppressWarnings("unchecked")
+    protected QueryInsertSetupper<KeyMatch, KeyMatchCB> downcast(
+            final QueryInsertSetupper<? extends Entity, ? extends ConditionBean> sp) {
+        return (QueryInsertSetupper<KeyMatch, KeyMatchCB>) sp;
+    }
+}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 491 - 494
src/main/java/jp/sf/fess/db/bsbhv/BsLabelTypeBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 332 - 351
src/main/java/jp/sf/fess/db/bsbhv/BsLabelTypeToRoleTypeMappingBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 332 - 341
src/main/java/jp/sf/fess/db/bsbhv/BsOverlappingHostBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 332 - 332
src/main/java/jp/sf/fess/db/bsbhv/BsPathMappingBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 333 - 354
src/main/java/jp/sf/fess/db/bsbhv/BsRequestHeaderBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 491 - 492
src/main/java/jp/sf/fess/db/bsbhv/BsRoleTypeBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 332 - 333
src/main/java/jp/sf/fess/db/bsbhv/BsScheduledJobBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 391 - 362
src/main/java/jp/sf/fess/db/bsbhv/BsSearchFieldLogBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 355 - 325
src/main/java/jp/sf/fess/db/bsbhv/BsSearchLogBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 369 - 326
src/main/java/jp/sf/fess/db/bsbhv/BsUserInfoBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 328 - 357
src/main/java/jp/sf/fess/db/bsbhv/BsWebAuthenticationBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 333 - 352
src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToLabelTypeMappingBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 338 - 358
src/main/java/jp/sf/fess/db/bsbhv/BsWebConfigToRoleTypeMappingBhv.java


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 493 - 502
src/main/java/jp/sf/fess/db/bsbhv/BsWebCrawlingConfigBhv.java


+ 115 - 0
src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfClickLog.java

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

+ 134 - 0
src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfCrawlingSession.java

@@ -0,0 +1,134 @@
+/*
+ * Copyright 2009-2014 the CodeLibs Project and the Others.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+
+package jp.sf.fess.db.bsbhv.loader;
+
+import java.util.List;
+
+import jp.sf.fess.db.cbean.CrawlingSessionInfoCB;
+import jp.sf.fess.db.exbhv.CrawlingSessionBhv;
+import jp.sf.fess.db.exentity.CrawlingSession;
+import jp.sf.fess.db.exentity.CrawlingSessionInfo;
+
+import org.seasar.dbflute.BehaviorSelector;
+import org.seasar.dbflute.bhv.ConditionBeanSetupper;
+import org.seasar.dbflute.bhv.NestedReferrerLoaderGateway;
+import org.seasar.dbflute.bhv.ReferrerListHandler;
+import org.seasar.dbflute.bhv.ReferrerLoaderHandler;
+
+/**
+ * The referrer loader of CRAWLING_SESSION as TABLE. <br />
+ * <pre>
+ * [primary key]
+ *     ID
+ *
+ * [column]
+ *     ID, SESSION_ID, NAME, EXPIRED_TIME, CREATED_TIME
+ *
+ * [sequence]
+ *
+ *
+ * [identity]
+ *     ID
+ *
+ * [version-no]
+ *
+ *
+ * [foreign table]
+ *
+ *
+ * [referrer table]
+ *     CRAWLING_SESSION_INFO
+ *
+ * [foreign property]
+ *
+ *
+ * [referrer property]
+ *     crawlingSessionInfoList
+ * </pre>
+ * @author DBFlute(AutoGenerator)
+ */
+public class LoaderOfCrawlingSession {
+
+    // ===================================================================================
+    //                                                                           Attribute
+    //                                                                           =========
+    protected List<CrawlingSession> _selectedList;
+
+    protected BehaviorSelector _selector;
+
+    protected CrawlingSessionBhv _myBhv; // lazy-loaded
+
+    // ===================================================================================
+    //                                                                   Ready for Loading
+    //                                                                   =================
+    public LoaderOfCrawlingSession ready(
+            final List<CrawlingSession> selectedList,
+            final BehaviorSelector selector) {
+        _selectedList = selectedList;
+        _selector = selector;
+        return this;
+    }
+
+    protected CrawlingSessionBhv myBhv() {
+        if (_myBhv != null) {
+            return _myBhv;
+        } else {
+            _myBhv = _selector.select(CrawlingSessionBhv.class);
+            return _myBhv;
+        }
+    }
+
+    // ===================================================================================
+    //                                                                       Load Referrer
+    //                                                                       =============
+    protected List<CrawlingSessionInfo> _referrerCrawlingSessionInfoList;
+
+    public NestedReferrerLoaderGateway<LoaderOfCrawlingSessionInfo> loadCrawlingSessionInfoList(
+            final ConditionBeanSetupper<CrawlingSessionInfoCB> setupper) {
+        myBhv().loadCrawlingSessionInfoList(_selectedList, setupper)
+                .withNestedReferrer(
+                        new ReferrerListHandler<CrawlingSessionInfo>() {
+                            @Override
+                            public void handle(
+                                    final List<CrawlingSessionInfo> referrerList) {
+                                _referrerCrawlingSessionInfoList = referrerList;
+                            }
+                        });
+        return new NestedReferrerLoaderGateway<LoaderOfCrawlingSessionInfo>() {
+            @Override
+            public void withNestedReferrer(
+                    final ReferrerLoaderHandler<LoaderOfCrawlingSessionInfo> handler) {
+                handler.handle(new LoaderOfCrawlingSessionInfo().ready(
+                        _referrerCrawlingSessionInfoList, _selector));
+            }
+        };
+    }
+
+    // ===================================================================================
+    //                                                                    Pull out Foreign
+    //                                                                    ================
+    // ===================================================================================
+    //                                                                            Accessor
+    //                                                                            ========
+    public List<CrawlingSession> getSelectedList() {
+        return _selectedList;
+    }
+
+    public BehaviorSelector getSelector() {
+        return _selector;
+    }
+}

+ 116 - 0
src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfCrawlingSessionInfo.java

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

+ 130 - 0
src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfDataConfigToLabelTypeMapping.java

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

+ 130 - 0
src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfDataConfigToRoleTypeMapping.java

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

+ 160 - 0
src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfDataCrawlingConfig.java

@@ -0,0 +1,160 @@
+/*
+ * Copyright 2009-2014 the CodeLibs Project and the Others.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+
+package jp.sf.fess.db.bsbhv.loader;
+
+import java.util.List;
+
+import jp.sf.fess.db.cbean.DataConfigToLabelTypeMappingCB;
+import jp.sf.fess.db.cbean.DataConfigToRoleTypeMappingCB;
+import jp.sf.fess.db.exbhv.DataCrawlingConfigBhv;
+import jp.sf.fess.db.exentity.DataConfigToLabelTypeMapping;
+import jp.sf.fess.db.exentity.DataConfigToRoleTypeMapping;
+import jp.sf.fess.db.exentity.DataCrawlingConfig;
+
+import org.seasar.dbflute.BehaviorSelector;
+import org.seasar.dbflute.bhv.ConditionBeanSetupper;
+import org.seasar.dbflute.bhv.NestedReferrerLoaderGateway;
+import org.seasar.dbflute.bhv.ReferrerListHandler;
+import org.seasar.dbflute.bhv.ReferrerLoaderHandler;
+
+/**
+ * The referrer loader of DATA_CRAWLING_CONFIG as TABLE. <br />
+ * <pre>
+ * [primary key]
+ *     ID
+ *
+ * [column]
+ *     ID, NAME, HANDLER_NAME, HANDLER_PARAMETER, HANDLER_SCRIPT, BOOST, AVAILABLE, 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]
+ *     DATA_CONFIG_TO_LABEL_TYPE_MAPPING, DATA_CONFIG_TO_ROLE_TYPE_MAPPING
+ *
+ * [foreign property]
+ *
+ *
+ * [referrer property]
+ *     dataConfigToLabelTypeMappingList, dataConfigToRoleTypeMappingList
+ * </pre>
+ * @author DBFlute(AutoGenerator)
+ */
+public class LoaderOfDataCrawlingConfig {
+
+    // ===================================================================================
+    //                                                                           Attribute
+    //                                                                           =========
+    protected List<DataCrawlingConfig> _selectedList;
+
+    protected BehaviorSelector _selector;
+
+    protected DataCrawlingConfigBhv _myBhv; // lazy-loaded
+
+    // ===================================================================================
+    //                                                                   Ready for Loading
+    //                                                                   =================
+    public LoaderOfDataCrawlingConfig ready(
+            final List<DataCrawlingConfig> selectedList,
+            final BehaviorSelector selector) {
+        _selectedList = selectedList;
+        _selector = selector;
+        return this;
+    }
+
+    protected DataCrawlingConfigBhv myBhv() {
+        if (_myBhv != null) {
+            return _myBhv;
+        } else {
+            _myBhv = _selector.select(DataCrawlingConfigBhv.class);
+            return _myBhv;
+        }
+    }
+
+    // ===================================================================================
+    //                                                                       Load Referrer
+    //                                                                       =============
+    protected List<DataConfigToLabelTypeMapping> _referrerDataConfigToLabelTypeMappingList;
+
+    public NestedReferrerLoaderGateway<LoaderOfDataConfigToLabelTypeMapping> loadDataConfigToLabelTypeMappingList(
+            final ConditionBeanSetupper<DataConfigToLabelTypeMappingCB> setupper) {
+        myBhv().loadDataConfigToLabelTypeMappingList(_selectedList, setupper)
+                .withNestedReferrer(
+                        new ReferrerListHandler<DataConfigToLabelTypeMapping>() {
+                            @Override
+                            public void handle(
+                                    final List<DataConfigToLabelTypeMapping> referrerList) {
+                                _referrerDataConfigToLabelTypeMappingList = referrerList;
+                            }
+                        });
+        return new NestedReferrerLoaderGateway<LoaderOfDataConfigToLabelTypeMapping>() {
+            @Override
+            public void withNestedReferrer(
+                    final ReferrerLoaderHandler<LoaderOfDataConfigToLabelTypeMapping> handler) {
+                handler.handle(new LoaderOfDataConfigToLabelTypeMapping()
+                        .ready(_referrerDataConfigToLabelTypeMappingList,
+                                _selector));
+            }
+        };
+    }
+
+    protected List<DataConfigToRoleTypeMapping> _referrerDataConfigToRoleTypeMappingList;
+
+    public NestedReferrerLoaderGateway<LoaderOfDataConfigToRoleTypeMapping> loadDataConfigToRoleTypeMappingList(
+            final ConditionBeanSetupper<DataConfigToRoleTypeMappingCB> setupper) {
+        myBhv().loadDataConfigToRoleTypeMappingList(_selectedList, setupper)
+                .withNestedReferrer(
+                        new ReferrerListHandler<DataConfigToRoleTypeMapping>() {
+                            @Override
+                            public void handle(
+                                    final List<DataConfigToRoleTypeMapping> referrerList) {
+                                _referrerDataConfigToRoleTypeMappingList = referrerList;
+                            }
+                        });
+        return new NestedReferrerLoaderGateway<LoaderOfDataConfigToRoleTypeMapping>() {
+            @Override
+            public void withNestedReferrer(
+                    final ReferrerLoaderHandler<LoaderOfDataConfigToRoleTypeMapping> handler) {
+                handler.handle(new LoaderOfDataConfigToRoleTypeMapping().ready(
+                        _referrerDataConfigToRoleTypeMappingList, _selector));
+            }
+        };
+    }
+
+    // ===================================================================================
+    //                                                                    Pull out Foreign
+    //                                                                    ================
+    // ===================================================================================
+    //                                                                            Accessor
+    //                                                                            ========
+    public List<DataCrawlingConfig> getSelectedList() {
+        return _selectedList;
+    }
+
+    public BehaviorSelector getSelector() {
+        return _selector;
+    }
+}

+ 101 - 0
src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfFailureUrl.java

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

+ 115 - 0
src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfFavoriteLog.java

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

+ 116 - 0
src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfFileAuthentication.java

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

+ 130 - 0
src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfFileConfigToLabelTypeMapping.java

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

+ 130 - 0
src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfFileConfigToRoleTypeMapping.java

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

+ 185 - 0
src/main/java/jp/sf/fess/db/bsbhv/loader/LoaderOfFileCrawlingConfig.java

@@ -0,0 +1,185 @@
+/*
+ * Copyright 2009-2014 the CodeLibs Project and the Others.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+
+package jp.sf.fess.db.bsbhv.loader;
+
+import java.util.List;
+
+import jp.sf.fess.db.cbean.FileAuthenticationCB;
+import jp.sf.fess.db.cbean.FileConfigToLabelTypeMappingCB;
+import jp.sf.fess.db.cbean.FileConfigToRoleTypeMappingCB;
+import jp.sf.fess.db.exbhv.FileCrawlingConfigBhv;
+import jp.sf.fess.db.exentity.FileAuthentication;
+import jp.sf.fess.db.exentity.FileConfigToLabelTypeMapping;
+import jp.sf.fess.db.exentity.FileConfigToRoleTypeMapping;
+import jp.sf.fess.db.exentity.FileCrawlingConfig;
+
+import org.seasar.dbflute.BehaviorSelector;
+import org.seasar.dbflute.bhv.ConditionBeanSetupper;
+import org.seasar.dbflute.bhv.NestedReferrerLoaderGateway;
+import org.seasar.dbflute.bhv.ReferrerListHandler;
+import org.seasar.dbflute.bhv.ReferrerLoaderHandler;
+
+/**
+ * The referrer loader of FILE_CRAWLING_CONFIG as TABLE. <br />
+ * <pre>
+ * [primary key]
+ *     ID
+ *
+ * [column]
+ *     ID, NAME, PATHS, INCLUDED_PATHS, EXCLUDED_PATHS, INCLUDED_DOC_PATHS, EXCLUDED_DOC_PATHS, CONFIG_PARAMETER, DEPTH, MAX_ACCESS_COUNT, NUM_OF_THREAD, INTERVAL_TIME, BOOST, AVAILABLE, 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]
+ *     FILE_AUTHENTICATION, FILE_CONFIG_TO_LABEL_TYPE_MAPPING, FILE_CONFIG_TO_ROLE_TYPE_MAPPING
+ *
+ * [foreign property]
+ *
+ *
+ * [referrer property]
+ *     fileAuthenticationList, fileConfigToLabelTypeMappingList, fileConfigToRoleTypeMappingList
+ * </pre>
+ * @author DBFlute(AutoGenerator)
+ */
+public class LoaderOfFileCrawlingConfig {
+
+    // ===================================================================================
+    //                                                                           Attribute
+    //                                                                           =========
+    protected List<FileCrawlingConfig> _selectedList;
+
+    protected BehaviorSelector _selector;
+
+    protected FileCrawlingConfigBhv _myBhv; // lazy-loaded
+
+    // ===================================================================================
+    //                                                                   Ready for Loading
+    //                                                                   =================
+    public LoaderOfFileCrawlingConfig ready(
+            final List<FileCrawlingConfig> selectedList,
+            final BehaviorSelector selector) {
+        _selectedList = selectedList;
+        _selector = selector;
+        return this;
+    }
+
+    protected FileCrawlingConfigBhv myBhv() {
+        if (_myBhv != null) {
+            return _myBhv;
+        } else {
+            _myBhv = _selector.select(FileCrawlingConfigBhv.class);
+            return _myBhv;
+        }
+    }
+
+    // ===================================================================================
+    //                                                                       Load Referrer
+    //                                                                       =============
+    protected List<FileAuthentication> _referrerFileAuthenticationList;
+
+    public NestedReferrerLoaderGateway<LoaderOfFileAuthentication> loadFileAuthenticationList(
+            final ConditionBeanSetupper<FileAuthenticationCB> setupper) {
+        myBhv().loadFileAuthenticationList(_selectedList, setupper)
+                .withNestedReferrer(
+                        new ReferrerListHandler<FileAuthentication>() {
+                            @Override
+                            public void handle(
+                                    final List<FileAuthentication> referrerList) {
+                                _referrerFileAuthenticationList = referrerList;
+                            }
+                        });
+        return new NestedReferrerLoaderGateway<LoaderOfFileAuthentication>() {
+            @Override
+            public void withNestedReferrer(
+                    final ReferrerLoaderHandler<LoaderOfFileAuthentication> handler) {
+                handler.handle(new LoaderOfFileAuthentication().ready(
+                        _referrerFileAuthenticationList, _selector));
+            }
+        };
+    }
+
+    protected List<FileConfigToLabelTypeMapping> _referrerFileConfigToLabelTypeMappingList;
+
+    public NestedReferrerLoaderGateway<LoaderOfFileConfigToLabelTypeMapping> loadFileConfigToLabelTypeMappingList(
+            final ConditionBeanSetupper<FileConfigToLabelTypeMappingCB> setupper) {
+        myBhv().loadFileConfigToLabelTypeMappingList(_selectedList, setupper)
+                .withNestedReferrer(
+                        new ReferrerListHandler<FileConfigToLabelTypeMapping>() {
+                            @Override
+                            public void handle(
+                                    final List<FileConfigToLabelTypeMapping> referrerList) {
+                                _referrerFileConfigToLabelTypeMappingList = referrerList;
+                            }
+                        });
+        return new NestedReferrerLoaderGateway<LoaderOfFileConfigToLabelTypeMapping>() {
+            @Override
+            public void withNestedReferrer(
+                    final ReferrerLoaderHandler<LoaderOfFileConfigToLabelTypeMapping> handler) {
+                handler.handle(new LoaderOfFileConfigToLabelTypeMapping()
+                        .ready(_referrerFileConfigToLabelTypeMappingList,
+                                _selector));
+            }
+        };
+    }
+
+    protected List<FileConfigToRoleTypeMapping> _referrerFileConfigToRoleTypeMappingList;
+
+    public NestedReferrerLoaderGateway<LoaderOfFileConfigToRoleTypeMapping> loadFileConfigToRoleTypeMappingList(
+            final ConditionBeanSetupper<FileConfigToRoleTypeMappingCB> setupper) {
+        myBhv().loadFileConfigToRoleTypeMappingList(_selectedList, setupper)
+                .withNestedReferrer(
+                        new ReferrerListHandler<FileConfigToRoleTypeMapping>() {
+                            @Override
+                            public void handle(
+                                    final List<FileConfigToRoleTypeMapping> referrerList) {
+                                _referrerFileConfigToRoleTypeMappingList = referrerList;
+                            }
+                        });
+        return new NestedReferrerLoaderGateway<LoaderOfFileConfigToRoleTypeMapping>() {
+            @Override
+            public void withNestedReferrer(
+                    final ReferrerLoaderHandler<LoaderOfFileConfigToRoleTypeMapping> handler) {
+                handler.handle(new LoaderOfFileConfigToRoleTypeMapping().ready(
+                        _referrerFileConfigToRoleTypeMappingList, _selector));
+            }
+        };
+    }
+
+    // ===================================================================================
+    //                                                                    Pull out Foreign
+    //                                                                    ================
+    // ===================================================================================
+    //                                                                            Accessor
+    //                                                                            ========
+    public List<FileCrawlingConfig> getSelectedList() {
+        return _selectedList;
+    }
+
+    public BehaviorSelector getSelector() {
+        return _selector;
+    }
+}

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است