This commit is contained in:
Shinsuke Sugaya 2014-08-30 22:35:19 +09:00
parent f795e4fa35
commit 2c4cbab53b
397 changed files with 47552 additions and 37599 deletions

1
.gitignore vendored
View file

@ -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

View file

@ -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>

View file

@ -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

View file

@ -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

View file

@ -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
# - - - - - - - - - -/

View file

@ -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
# - - - - - - - - - -/
# /- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View file

@ -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:{

View file

@ -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 |
# --------------------------------------------------------

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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

View file

@ -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

View file

@ -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
# - - - - - - - - - -/

View file

@ -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
# - - - - - - - - - -/
# /- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View file

@ -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:{

View file

@ -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 |
# --------------------------------------------------------

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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

View file

@ -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

View file

@ -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
# - - - - - - - - - -/

View file

@ -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
# - - - - - - - - - -/
# /- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View file

@ -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:{

View file

@ -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 |
# --------------------------------------------------------

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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>

View file

@ -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 */
/**********************************/

View file

@ -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 */
/**********************************/

View file

@ -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;

View file

@ -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=

View file

@ -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");
}
}
}

View file

@ -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);

View file

@ -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);

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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) {
}
}

View file

@ -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) {

View file

@ -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

View file

@ -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);
}
}

View file

@ -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>();
}
// ===================================================================================

View file

@ -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();
}
// -----------------------------------------------------

View file

@ -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();
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -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;
}
}

View file

@ -0,0 +1,134 @@
/*
* Copyright 2009-2014 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.sf.fess.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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

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