diff --git a/pom.xml b/pom.xml index 2d14f4dbb..5ddd6a379 100644 --- a/pom.xml +++ b/pom.xml @@ -277,11 +277,6 @@ ${databaseArtifactId} ${databaseVersion} - - org.codelibs.fess - fess-db-${database} - 1.0.0-SNAPSHOT - jstl jstl diff --git a/src/main/config/es/fess_config.json b/src/main/config/es/fess_config.json index 48f21ddb7..45cbf9618 100644 --- a/src/main/config/es/fess_config.json +++ b/src/main/config/es/fess_config.json @@ -1,31 +1,6 @@ { ".fess_config" : { - "aliases" : { }, "mappings" : { - "user_info" : { - "_all" : { - "enabled" : false - }, - "_id" : { - "path" : "id" - }, - "properties" : { - "code" : { - "type" : "string", - "index" : "not_analyzed" - }, - "createdTime" : { - "type" : "long" - }, - "id" : { - "type" : "string", - "index" : "not_analyzed" - }, - "updatedTime" : { - "type" : "long" - } - } - }, "web_config_to_label" : { "_all" : { "enabled" : false @@ -338,62 +313,6 @@ } } }, - "search_log" : { - "_all" : { - "enabled" : false - }, - "_id" : { - "path" : "id" - }, - "properties" : { - "accessType" : { - "type" : "string", - "index" : "not_analyzed" - }, - "clientIp" : { - "type" : "string", - "index" : "not_analyzed" - }, - "hitCount" : { - "type" : "long" - }, - "id" : { - "type" : "string", - "index" : "not_analyzed" - }, - "queryOffset" : { - "type" : "integer" - }, - "queryPageSize" : { - "type" : "integer" - }, - "referer" : { - "type" : "string", - "index" : "not_analyzed" - }, - "requestedTime" : { - "type" : "long" - }, - "responseTime" : { - "type" : "integer" - }, - "searchWord" : { - "type" : "string", - "index" : "not_analyzed" - }, - "userAgent" : { - "type" : "string", - "index" : "not_analyzed" - }, - "userId" : { - "type" : "long" - }, - "userSessionId" : { - "type" : "string", - "index" : "not_analyzed" - } - } - }, "web_authentication" : { "_all" : { "enabled" : false @@ -594,32 +513,6 @@ } } }, - "search_field_log" : { - "_all" : { - "enabled" : false - }, - "_id" : { - "path" : "id" - }, - "properties" : { - "id" : { - "type" : "string", - "index" : "not_analyzed" - }, - "name" : { - "type" : "string", - "index" : "not_analyzed" - }, - "searchLogId" : { - "type" : "string", - "index" : "not_analyzed" - }, - "value" : { - "type" : "string", - "index" : "not_analyzed" - } - } - }, "data_config" : { "_all" : { "enabled" : false @@ -918,31 +811,6 @@ } } }, - "favorite_log" : { - "_all" : { - "enabled" : false - }, - "_id" : { - "path" : "id" - }, - "properties" : { - "createdTime" : { - "type" : "long" - }, - "id" : { - "type" : "string", - "index" : "not_analyzed" - }, - "url" : { - "type" : "string", - "index" : "not_analyzed" - }, - "userInfoId" : { - "type" : "string", - "index" : "not_analyzed" - } - } - }, "file_config_to_label" : { "_all" : { "enabled" : false @@ -1054,8 +922,7 @@ "type" : "boolean" }, "crawler" : { - "type" : "string", - "index" : "not_analyzed" + "type" : "boolean" }, "createdBy" : { "type" : "string", @@ -1189,45 +1056,14 @@ "index" : "not_analyzed" } } - }, - "click_log" : { - "_all" : { - "enabled" : false - }, - "_id" : { - "path" : "id" - }, - "properties" : { - "id" : { - "type" : "string", - "index" : "not_analyzed" - }, - "requestedTime" : { - "type" : "long" - }, - "searchLogId" : { - "type" : "string", - "index" : "not_analyzed" - }, - "url" : { - "type" : "string", - "index" : "not_analyzed" - } - } } }, "settings" : { "index" : { "refresh_interval" : "1s", - "creation_date" : "1435803297459", - "number_of_shards" : "5", - "number_of_replicas" : "0", - "version" : { - "created" : "1060099" - }, - "uuid" : "fv6Ry_sJQK6lc93JEXDm_A" + "number_of_shards" : "2", + "number_of_replicas" : "0" } - }, - "warmers" : { } + } } } diff --git a/src/main/config/es/search_log.json b/src/main/config/es/search_log.json new file mode 100644 index 000000000..85620260b --- /dev/null +++ b/src/main/config/es/search_log.json @@ -0,0 +1,174 @@ +{ + "search_log" : { + "aliases" : { + "search_log_search" : {}, + "search_log_index" : {} + }, + "mappings" : { + "user_info" : { + "_all" : { + "enabled" : false + }, + "_id" : { + "path" : "id" + }, + "properties" : { + "code" : { + "type" : "string", + "index" : "not_analyzed" + }, + "createdTime" : { + "type" : "long" + }, + "id" : { + "type" : "string", + "index" : "not_analyzed" + }, + "updatedTime" : { + "type" : "long" + } + } + }, + "search_log" : { + "_all" : { + "enabled" : false + }, + "_id" : { + "path" : "id" + }, + "properties" : { + "accessType" : { + "type" : "string", + "index" : "not_analyzed" + }, + "clientIp" : { + "type" : "string", + "index" : "not_analyzed" + }, + "hitCount" : { + "type" : "long" + }, + "id" : { + "type" : "string", + "index" : "not_analyzed" + }, + "queryOffset" : { + "type" : "integer" + }, + "queryPageSize" : { + "type" : "integer" + }, + "referer" : { + "type" : "string", + "index" : "not_analyzed" + }, + "requestedTime" : { + "type" : "long" + }, + "responseTime" : { + "type" : "integer" + }, + "searchWord" : { + "type" : "string", + "index" : "not_analyzed" + }, + "userAgent" : { + "type" : "string", + "index" : "not_analyzed" + }, + "userInfoId" : { + "type" : "string", + "index" : "not_analyzed" + }, + "userSessionId" : { + "type" : "string", + "index" : "not_analyzed" + } + } + }, + "search_field_log" : { + "_all" : { + "enabled" : false + }, + "_id" : { + "path" : "id" + }, + "properties" : { + "id" : { + "type" : "string", + "index" : "not_analyzed" + }, + "name" : { + "type" : "string", + "index" : "not_analyzed" + }, + "searchLogId" : { + "type" : "string", + "index" : "not_analyzed" + }, + "value" : { + "type" : "string", + "index" : "not_analyzed" + } + } + }, + "favorite_log" : { + "_all" : { + "enabled" : false + }, + "_id" : { + "path" : "id" + }, + "properties" : { + "createdTime" : { + "type" : "long" + }, + "id" : { + "type" : "string", + "index" : "not_analyzed" + }, + "url" : { + "type" : "string", + "index" : "not_analyzed" + }, + "userInfoId" : { + "type" : "string", + "index" : "not_analyzed" + } + } + }, + "click_log" : { + "_all" : { + "enabled" : false + }, + "_id" : { + "path" : "id" + }, + "properties" : { + "id" : { + "type" : "string", + "index" : "not_analyzed" + }, + "requestedTime" : { + "type" : "long" + }, + "searchLogId" : { + "type" : "string", + "index" : "not_analyzed" + }, + "url" : { + "type" : "string", + "index" : "not_analyzed" + } + } + } + }, + "settings" : { + "index" : { + "refresh_interval" : "1m", + "number_of_shards" : "10", + "number_of_replicas" : "0" + } + } + } +} diff --git a/src/main/java/org/codelibs/fess/Constants.java b/src/main/java/org/codelibs/fess/Constants.java index 682f7851b..89a994a34 100644 --- a/src/main/java/org/codelibs/fess/Constants.java +++ b/src/main/java/org/codelibs/fess/Constants.java @@ -40,9 +40,9 @@ public class Constants extends CoreLibConstants { public static final String FALSE = "false"; - public static final String T = "T"; + public static final Boolean T = true; - public static final String F = "F"; + public static final Boolean F = false; public static final String ON = "on"; @@ -238,6 +238,14 @@ public class Constants extends CoreLibConstants { public static final String SEARCH_LOG_ACCESS_TYPE = "searchLogAccessType"; + public static final String SEARCH_LOG_ACCESS_TYPE_JSON = "json"; + + public static final String SEARCH_LOG_ACCESS_TYPE_XML = "xml"; + + public static final String SEARCH_LOG_ACCESS_TYPE_WEB = "web"; + + public static final String SEARCH_LOG_ACCESS_TYPE_OTHER = "other"; + public static final String RESULTS_PER_PAGE = "resultsPerPage"; public static final String USER_CODE = "userCode"; @@ -315,4 +323,6 @@ public class Constants extends CoreLibConstants { public static final String PROCESS_TYPE_BOTH = "B"; + public static final long ONE_DAY_IN_MILLIS = 24L * 60L * 60L * 1000L; + } diff --git a/src/main/java/org/codelibs/fess/api/json/JsonApiManager.java b/src/main/java/org/codelibs/fess/api/json/JsonApiManager.java index 035782a35..b99ca7410 100644 --- a/src/main/java/org/codelibs/fess/api/json/JsonApiManager.java +++ b/src/main/java/org/codelibs/fess/api/json/JsonApiManager.java @@ -38,7 +38,6 @@ import org.codelibs.fess.api.WebApiManager; import org.codelibs.fess.api.WebApiRequest; import org.codelibs.fess.api.WebApiResponse; import org.codelibs.fess.client.FessEsClient; -import org.codelibs.fess.db.allcommon.CDef; import org.codelibs.fess.entity.PingResponse; import org.codelibs.fess.util.ComponentUtil; import org.codelibs.fess.util.FacetResponse; @@ -124,7 +123,7 @@ public class JsonApiManager extends BaseApiManager implements WebApiManager { String errMsg = StringUtil.EMPTY; String query = null; final StringBuilder buf = new StringBuilder(1000); - request.setAttribute(Constants.SEARCH_LOG_ACCESS_TYPE, CDef.AccessType.Json); + request.setAttribute(Constants.SEARCH_LOG_ACCESS_TYPE, Constants.SEARCH_LOG_ACCESS_TYPE_JSON); final String queryId = request.getParameter("queryId"); try { chain.doFilter(new WebApiRequest(request, SEARCH_API), new WebApiResponse(response)); diff --git a/src/main/java/org/codelibs/fess/api/xml/XmlApiManager.java b/src/main/java/org/codelibs/fess/api/xml/XmlApiManager.java index 06c27d4e8..1751b5951 100644 --- a/src/main/java/org/codelibs/fess/api/xml/XmlApiManager.java +++ b/src/main/java/org/codelibs/fess/api/xml/XmlApiManager.java @@ -36,7 +36,6 @@ import org.codelibs.fess.api.WebApiManager; import org.codelibs.fess.api.WebApiRequest; import org.codelibs.fess.api.WebApiResponse; import org.codelibs.fess.client.FessEsClient; -import org.codelibs.fess.db.allcommon.CDef; import org.codelibs.fess.entity.PingResponse; import org.codelibs.fess.util.ComponentUtil; import org.codelibs.fess.util.FacetResponse; @@ -112,7 +111,7 @@ public class XmlApiManager extends BaseApiManager implements WebApiManager { String errMsg = StringUtil.EMPTY; final StringBuilder buf = new StringBuilder(1000); String query = null; - request.setAttribute(Constants.SEARCH_LOG_ACCESS_TYPE, CDef.AccessType.Xml); + request.setAttribute(Constants.SEARCH_LOG_ACCESS_TYPE, Constants.SEARCH_LOG_ACCESS_TYPE_XML); final String queryId = request.getParameter("queryId"); try { chain.doFilter(new WebApiRequest(request, SEARCH_API), new WebApiResponse(response)); diff --git a/src/main/java/org/codelibs/fess/beans/converter/LocalDateTimeConverter.java b/src/main/java/org/codelibs/fess/beans/converter/LocalDateTimeConverter.java index e0a80f13c..4db1b34d8 100644 --- a/src/main/java/org/codelibs/fess/beans/converter/LocalDateTimeConverter.java +++ b/src/main/java/org/codelibs/fess/beans/converter/LocalDateTimeConverter.java @@ -33,6 +33,7 @@ public class LocalDateTimeConverter implements Converter { this.pattern = pattern; } + @Override public Object getAsObject(String value) { if (StringUtil.isEmpty(value)) { return null; @@ -40,10 +41,12 @@ public class LocalDateTimeConverter implements Converter { return LocalDateTime.parse(value, DateTimeFormatter.ofPattern(pattern)); } + @Override public String getAsString(Object value) { return ((LocalDateTime) value).format(DateTimeFormatter.ofPattern(pattern)); } + @Override public boolean isTarget(Class clazz) { return clazz == LocalDateTime.class; } diff --git a/src/main/java/org/codelibs/fess/client/FessEsClient.java b/src/main/java/org/codelibs/fess/client/FessEsClient.java index 8c1d6a2a3..01c9a1605 100644 --- a/src/main/java/org/codelibs/fess/client/FessEsClient.java +++ b/src/main/java/org/codelibs/fess/client/FessEsClient.java @@ -317,6 +317,7 @@ public class FessEsClient implements Client { } } + @Override @DestroyMethod public void close() { try { @@ -715,353 +716,440 @@ public class FessEsClient implements Client { // Elasticsearch Client // + @Override public > ActionFuture execute( Action action, Request request) { return client.execute(action, request); } + @Override public > void execute( Action action, Request request, ActionListener listener) { client.execute(action, request, listener); } + @Override public > RequestBuilder prepareExecute( Action action) { return client.prepareExecute(action); } + @Override public ThreadPool threadPool() { return client.threadPool(); } + @Override public AdminClient admin() { return client.admin(); } + @Override public ActionFuture index(IndexRequest request) { return client.index(request); } + @Override public void index(IndexRequest request, ActionListener listener) { client.index(request, listener); } + @Override public IndexRequestBuilder prepareIndex() { return client.prepareIndex(); } + @Override public ActionFuture update(UpdateRequest request) { return client.update(request); } + @Override public void update(UpdateRequest request, ActionListener listener) { client.update(request, listener); } + @Override public UpdateRequestBuilder prepareUpdate() { return client.prepareUpdate(); } + @Override public UpdateRequestBuilder prepareUpdate(String index, String type, String id) { return client.prepareUpdate(index, type, id); } + @Override public IndexRequestBuilder prepareIndex(String index, String type) { return client.prepareIndex(index, type); } + @Override public IndexRequestBuilder prepareIndex(String index, String type, String id) { return client.prepareIndex(index, type, id); } + @Override public ActionFuture delete(DeleteRequest request) { return client.delete(request); } + @Override public void delete(DeleteRequest request, ActionListener listener) { client.delete(request, listener); } + @Override public DeleteRequestBuilder prepareDelete() { return client.prepareDelete(); } + @Override public DeleteRequestBuilder prepareDelete(String index, String type, String id) { return client.prepareDelete(index, type, id); } + @Override public ActionFuture bulk(BulkRequest request) { return client.bulk(request); } + @Override public void bulk(BulkRequest request, ActionListener listener) { client.bulk(request, listener); } + @Override public BulkRequestBuilder prepareBulk() { return client.prepareBulk(); } + @Override public ActionFuture deleteByQuery(DeleteByQueryRequest request) { return client.deleteByQuery(request); } + @Override public void deleteByQuery(DeleteByQueryRequest request, ActionListener listener) { client.deleteByQuery(request, listener); } + @Override public DeleteByQueryRequestBuilder prepareDeleteByQuery(String... indices) { return client.prepareDeleteByQuery(indices); } + @Override public ActionFuture get(GetRequest request) { return client.get(request); } + @Override public void get(GetRequest request, ActionListener listener) { client.get(request, listener); } + @Override public GetRequestBuilder prepareGet() { return client.prepareGet(); } + @Override public GetRequestBuilder prepareGet(String index, String type, String id) { return client.prepareGet(index, type, id); } + @Override public PutIndexedScriptRequestBuilder preparePutIndexedScript() { return client.preparePutIndexedScript(); } + @Override public PutIndexedScriptRequestBuilder preparePutIndexedScript(String scriptLang, String id, String source) { return client.preparePutIndexedScript(scriptLang, id, source); } + @Override public void deleteIndexedScript(DeleteIndexedScriptRequest request, ActionListener listener) { client.deleteIndexedScript(request, listener); } + @Override public ActionFuture deleteIndexedScript(DeleteIndexedScriptRequest request) { return client.deleteIndexedScript(request); } + @Override public DeleteIndexedScriptRequestBuilder prepareDeleteIndexedScript() { return client.prepareDeleteIndexedScript(); } + @Override public DeleteIndexedScriptRequestBuilder prepareDeleteIndexedScript(String scriptLang, String id) { return client.prepareDeleteIndexedScript(scriptLang, id); } + @Override public void putIndexedScript(PutIndexedScriptRequest request, ActionListener listener) { client.putIndexedScript(request, listener); } + @Override public ActionFuture putIndexedScript(PutIndexedScriptRequest request) { return client.putIndexedScript(request); } + @Override public GetIndexedScriptRequestBuilder prepareGetIndexedScript() { return client.prepareGetIndexedScript(); } + @Override public GetIndexedScriptRequestBuilder prepareGetIndexedScript(String scriptLang, String id) { return client.prepareGetIndexedScript(scriptLang, id); } + @Override public void getIndexedScript(GetIndexedScriptRequest request, ActionListener listener) { client.getIndexedScript(request, listener); } + @Override public ActionFuture getIndexedScript(GetIndexedScriptRequest request) { return client.getIndexedScript(request); } + @Override public ActionFuture multiGet(MultiGetRequest request) { return client.multiGet(request); } + @Override public void multiGet(MultiGetRequest request, ActionListener listener) { client.multiGet(request, listener); } + @Override public MultiGetRequestBuilder prepareMultiGet() { return client.prepareMultiGet(); } + @Override public ActionFuture count(CountRequest request) { return client.count(request); } + @Override public void count(CountRequest request, ActionListener listener) { client.count(request, listener); } + @Override public CountRequestBuilder prepareCount(String... indices) { return client.prepareCount(indices); } + @Override public ActionFuture exists(ExistsRequest request) { return client.exists(request); } + @Override public void exists(ExistsRequest request, ActionListener listener) { client.exists(request, listener); } + @Override public ExistsRequestBuilder prepareExists(String... indices) { return client.prepareExists(indices); } + @Override public ActionFuture suggest(SuggestRequest request) { return client.suggest(request); } + @Override public void suggest(SuggestRequest request, ActionListener listener) { client.suggest(request, listener); } + @Override public SuggestRequestBuilder prepareSuggest(String... indices) { return client.prepareSuggest(indices); } + @Override public ActionFuture search(SearchRequest request) { return client.search(request); } + @Override public void search(SearchRequest request, ActionListener listener) { client.search(request, listener); } + @Override public SearchRequestBuilder prepareSearch(String... indices) { return client.prepareSearch(indices); } + @Override public ActionFuture searchScroll(SearchScrollRequest request) { return client.searchScroll(request); } + @Override public void searchScroll(SearchScrollRequest request, ActionListener listener) { client.searchScroll(request, listener); } + @Override public SearchScrollRequestBuilder prepareSearchScroll(String scrollId) { return client.prepareSearchScroll(scrollId); } + @Override public ActionFuture multiSearch(MultiSearchRequest request) { return client.multiSearch(request); } + @Override public void multiSearch(MultiSearchRequest request, ActionListener listener) { client.multiSearch(request, listener); } + @Override public MultiSearchRequestBuilder prepareMultiSearch() { return client.prepareMultiSearch(); } + @Override public ActionFuture moreLikeThis(MoreLikeThisRequest request) { return client.moreLikeThis(request); } + @Override public void moreLikeThis(MoreLikeThisRequest request, ActionListener listener) { client.moreLikeThis(request, listener); } + @Override public MoreLikeThisRequestBuilder prepareMoreLikeThis(String index, String type, String id) { return client.prepareMoreLikeThis(index, type, id); } + @Override public ActionFuture termVector(TermVectorRequest request) { return client.termVector(request); } + @Override public void termVector(TermVectorRequest request, ActionListener listener) { client.termVector(request, listener); } + @Override public TermVectorRequestBuilder prepareTermVector() { return client.prepareTermVector(); } + @Override public TermVectorRequestBuilder prepareTermVector(String index, String type, String id) { return client.prepareTermVector(index, type, id); } + @Override public ActionFuture multiTermVectors(MultiTermVectorsRequest request) { return client.multiTermVectors(request); } + @Override public void multiTermVectors(MultiTermVectorsRequest request, ActionListener listener) { client.multiTermVectors(request, listener); } + @Override public MultiTermVectorsRequestBuilder prepareMultiTermVectors() { return client.prepareMultiTermVectors(); } + @Override public ActionFuture percolate(PercolateRequest request) { return client.percolate(request); } + @Override public void percolate(PercolateRequest request, ActionListener listener) { client.percolate(request, listener); } + @Override public PercolateRequestBuilder preparePercolate() { return client.preparePercolate(); } + @Override public ActionFuture multiPercolate(MultiPercolateRequest request) { return client.multiPercolate(request); } + @Override public void multiPercolate(MultiPercolateRequest request, ActionListener listener) { client.multiPercolate(request, listener); } + @Override public MultiPercolateRequestBuilder prepareMultiPercolate() { return client.prepareMultiPercolate(); } + @Override public ExplainRequestBuilder prepareExplain(String index, String type, String id) { return client.prepareExplain(index, type, id); } + @Override public ActionFuture explain(ExplainRequest request) { return client.explain(request); } + @Override public void explain(ExplainRequest request, ActionListener listener) { client.explain(request, listener); } + @Override public ClearScrollRequestBuilder prepareClearScroll() { return client.prepareClearScroll(); } + @Override public ActionFuture clearScroll(ClearScrollRequest request) { return client.clearScroll(request); } + @Override public void clearScroll(ClearScrollRequest request, ActionListener listener) { client.clearScroll(request, listener); } + @Override public FieldStatsRequestBuilder prepareFieldStats() { return client.prepareFieldStats(); } + @Override public ActionFuture fieldStats(FieldStatsRequest request) { return client.fieldStats(request); } + @Override public void fieldStats(FieldStatsRequest request, ActionListener listener) { client.fieldStats(request, listener); } + @Override public Settings settings() { return client.settings(); } diff --git a/src/main/java/org/codelibs/fess/db/exbhv/BoostDocumentRuleBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/BoostDocumentRuleBhv.java deleted file mode 100644 index 9e01cda16..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/BoostDocumentRuleBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsBoostDocumentRuleBhv; - -/** - * The behavior of BOOST_DOCUMENT_RULE. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class BoostDocumentRuleBhv extends BsBoostDocumentRuleBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/ClickLogBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/ClickLogBhv.java deleted file mode 100644 index b9ebd7d79..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/ClickLogBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsClickLogBhv; - -/** - * The behavior of CLICK_LOG. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class ClickLogBhv extends BsClickLogBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/CrawlingSessionBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/CrawlingSessionBhv.java deleted file mode 100644 index cba883ec2..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/CrawlingSessionBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsCrawlingSessionBhv; - -/** - * The behavior of CRAWLING_SESSION. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class CrawlingSessionBhv extends BsCrawlingSessionBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/CrawlingSessionInfoBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/CrawlingSessionInfoBhv.java deleted file mode 100644 index c94b60b4d..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/CrawlingSessionInfoBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsCrawlingSessionInfoBhv; - -/** - * The behavior of CRAWLING_SESSION_INFO. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class CrawlingSessionInfoBhv extends BsCrawlingSessionInfoBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/DataConfigToLabelTypeMappingBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/DataConfigToLabelTypeMappingBhv.java deleted file mode 100644 index 1286d1d42..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/DataConfigToLabelTypeMappingBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsDataConfigToLabelTypeMappingBhv; - -/** - * The behavior of DATA_CONFIG_TO_LABEL_TYPE_MAPPING. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class DataConfigToLabelTypeMappingBhv extends BsDataConfigToLabelTypeMappingBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/DataConfigToRoleTypeMappingBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/DataConfigToRoleTypeMappingBhv.java deleted file mode 100644 index da8f904e0..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/DataConfigToRoleTypeMappingBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsDataConfigToRoleTypeMappingBhv; - -/** - * The behavior of DATA_CONFIG_TO_ROLE_TYPE_MAPPING. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class DataConfigToRoleTypeMappingBhv extends BsDataConfigToRoleTypeMappingBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/DataCrawlingConfigBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/DataCrawlingConfigBhv.java deleted file mode 100644 index 3591b2f36..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/DataCrawlingConfigBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsDataCrawlingConfigBhv; - -/** - * The behavior of DATA_CRAWLING_CONFIG. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class DataCrawlingConfigBhv extends BsDataCrawlingConfigBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/FailureUrlBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/FailureUrlBhv.java deleted file mode 100644 index e0509fbeb..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/FailureUrlBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsFailureUrlBhv; - -/** - * The behavior of FAILURE_URL. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class FailureUrlBhv extends BsFailureUrlBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/FavoriteLogBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/FavoriteLogBhv.java deleted file mode 100644 index 4db58d5ea..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/FavoriteLogBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsFavoriteLogBhv; - -/** - * The behavior of FAVORITE_LOG. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class FavoriteLogBhv extends BsFavoriteLogBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/FileAuthenticationBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/FileAuthenticationBhv.java deleted file mode 100644 index 289897c75..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/FileAuthenticationBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsFileAuthenticationBhv; - -/** - * The behavior of FILE_AUTHENTICATION. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class FileAuthenticationBhv extends BsFileAuthenticationBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/FileConfigToLabelTypeMappingBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/FileConfigToLabelTypeMappingBhv.java deleted file mode 100644 index a4f406c71..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/FileConfigToLabelTypeMappingBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsFileConfigToLabelTypeMappingBhv; - -/** - * The behavior of FILE_CONFIG_TO_LABEL_TYPE_MAPPING. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class FileConfigToLabelTypeMappingBhv extends BsFileConfigToLabelTypeMappingBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/FileConfigToRoleTypeMappingBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/FileConfigToRoleTypeMappingBhv.java deleted file mode 100644 index 21b9863cf..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/FileConfigToRoleTypeMappingBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsFileConfigToRoleTypeMappingBhv; - -/** - * The behavior of FILE_CONFIG_TO_ROLE_TYPE_MAPPING. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class FileConfigToRoleTypeMappingBhv extends BsFileConfigToRoleTypeMappingBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/FileCrawlingConfigBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/FileCrawlingConfigBhv.java deleted file mode 100644 index ada2c3667..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/FileCrawlingConfigBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsFileCrawlingConfigBhv; - -/** - * The behavior of FILE_CRAWLING_CONFIG. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class FileCrawlingConfigBhv extends BsFileCrawlingConfigBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/JobLogBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/JobLogBhv.java deleted file mode 100644 index 21cd84651..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/JobLogBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsJobLogBhv; - -/** - * The behavior of JOB_LOG. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class JobLogBhv extends BsJobLogBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/KeyMatchBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/KeyMatchBhv.java deleted file mode 100644 index b6ad86d6e..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/KeyMatchBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsKeyMatchBhv; - -/** - * The behavior of KEY_MATCH. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class KeyMatchBhv extends BsKeyMatchBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/LabelTypeBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/LabelTypeBhv.java deleted file mode 100644 index a71100f97..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/LabelTypeBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsLabelTypeBhv; - -/** - * The behavior of LABEL_TYPE. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class LabelTypeBhv extends BsLabelTypeBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/LabelTypeToRoleTypeMappingBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/LabelTypeToRoleTypeMappingBhv.java deleted file mode 100644 index 433940378..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/LabelTypeToRoleTypeMappingBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsLabelTypeToRoleTypeMappingBhv; - -/** - * The behavior of LABEL_TYPE_TO_ROLE_TYPE_MAPPING. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class LabelTypeToRoleTypeMappingBhv extends BsLabelTypeToRoleTypeMappingBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/OverlappingHostBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/OverlappingHostBhv.java deleted file mode 100644 index 3485590e3..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/OverlappingHostBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsOverlappingHostBhv; - -/** - * The behavior of OVERLAPPING_HOST. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class OverlappingHostBhv extends BsOverlappingHostBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/PathMappingBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/PathMappingBhv.java deleted file mode 100644 index d6bf03998..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/PathMappingBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsPathMappingBhv; - -/** - * The behavior of PATH_MAPPING. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class PathMappingBhv extends BsPathMappingBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/RequestHeaderBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/RequestHeaderBhv.java deleted file mode 100644 index 4411d8ae6..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/RequestHeaderBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsRequestHeaderBhv; - -/** - * The behavior of REQUEST_HEADER. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class RequestHeaderBhv extends BsRequestHeaderBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/RoleTypeBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/RoleTypeBhv.java deleted file mode 100644 index bc1ca4b61..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/RoleTypeBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsRoleTypeBhv; - -/** - * The behavior of ROLE_TYPE. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class RoleTypeBhv extends BsRoleTypeBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/ScheduledJobBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/ScheduledJobBhv.java deleted file mode 100644 index 8d5ab7a6d..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/ScheduledJobBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsScheduledJobBhv; - -/** - * The behavior of SCHEDULED_JOB. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class ScheduledJobBhv extends BsScheduledJobBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/SearchFieldLogBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/SearchFieldLogBhv.java deleted file mode 100644 index 202a645aa..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/SearchFieldLogBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsSearchFieldLogBhv; - -/** - * The behavior of SEARCH_FIELD_LOG. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class SearchFieldLogBhv extends BsSearchFieldLogBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/SearchLogBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/SearchLogBhv.java deleted file mode 100644 index 65856804a..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/SearchLogBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsSearchLogBhv; - -/** - * The behavior of SEARCH_LOG. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class SearchLogBhv extends BsSearchLogBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/SuggestBadWordBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/SuggestBadWordBhv.java deleted file mode 100644 index 15f229031..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/SuggestBadWordBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsSuggestBadWordBhv; - -/** - * The behavior of SUGGEST_BAD_WORD. - *

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

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

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

- * @author DBFlute(AutoGenerator) - */ -public class SuggestElevateWordBhv extends BsSuggestElevateWordBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/UserInfoBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/UserInfoBhv.java deleted file mode 100644 index 230299033..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/UserInfoBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsUserInfoBhv; - -/** - * The behavior of USER_INFO. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class UserInfoBhv extends BsUserInfoBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/WebAuthenticationBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/WebAuthenticationBhv.java deleted file mode 100644 index c0753822b..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/WebAuthenticationBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsWebAuthenticationBhv; - -/** - * The behavior of WEB_AUTHENTICATION. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class WebAuthenticationBhv extends BsWebAuthenticationBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/WebConfigToLabelTypeMappingBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/WebConfigToLabelTypeMappingBhv.java deleted file mode 100644 index 62e5293f8..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/WebConfigToLabelTypeMappingBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsWebConfigToLabelTypeMappingBhv; - -/** - * The behavior of WEB_CONFIG_TO_LABEL_TYPE_MAPPING. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class WebConfigToLabelTypeMappingBhv extends BsWebConfigToLabelTypeMappingBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/WebConfigToRoleTypeMappingBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/WebConfigToRoleTypeMappingBhv.java deleted file mode 100644 index d84dc6844..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/WebConfigToRoleTypeMappingBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsWebConfigToRoleTypeMappingBhv; - -/** - * The behavior of WEB_CONFIG_TO_ROLE_TYPE_MAPPING. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class WebConfigToRoleTypeMappingBhv extends BsWebConfigToRoleTypeMappingBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/WebCrawlingConfigBhv.java b/src/main/java/org/codelibs/fess/db/exbhv/WebCrawlingConfigBhv.java deleted file mode 100644 index e36e9e16c..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/WebCrawlingConfigBhv.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv; - -import org.codelibs.fess.db.bsbhv.BsWebCrawlingConfigBhv; - -/** - * The behavior of WEB_CRAWLING_CONFIG. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class WebCrawlingConfigBhv extends BsWebCrawlingConfigBhv { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/ClickUrlRankingPmb.java b/src/main/java/org/codelibs/fess/db/exbhv/pmbean/ClickUrlRankingPmb.java deleted file mode 100644 index 4d7b86799..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/ClickUrlRankingPmb.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv.pmbean; - -import org.codelibs.fess.db.bsbhv.pmbean.BsClickUrlRankingPmb; - -/** - * - * The typed parameter-bean of ClickUrlRanking. (typed to entity, auto-paging)
- * This is related to "selectClickUrlRanking" on ClickLogBhv.
- * - *

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

- * @author DBFlute(AutoGenerator) - */ -public class ClickUrlRankingPmb extends BsClickUrlRankingPmb { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/ClientIpRankingPmb.java b/src/main/java/org/codelibs/fess/db/exbhv/pmbean/ClientIpRankingPmb.java deleted file mode 100644 index af703e277..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/ClientIpRankingPmb.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv.pmbean; - -import org.codelibs.fess.db.bsbhv.pmbean.BsClientIpRankingPmb; - -/** - * - * The typed parameter-bean of ClientIpRanking. (typed to entity, auto-paging)
- * This is related to "selectClientIpRanking" on SearchLogBhv.
- * - *

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

- * @author DBFlute(AutoGenerator) - */ -public class ClientIpRankingPmb extends BsClientIpRankingPmb { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/FavoriteUrlCountPmb.java b/src/main/java/org/codelibs/fess/db/exbhv/pmbean/FavoriteUrlCountPmb.java deleted file mode 100644 index e00271f60..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/FavoriteUrlCountPmb.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv.pmbean; - -import org.codelibs.fess.db.bsbhv.pmbean.BsFavoriteUrlCountPmb; - -/** - * - * The typed parameter-bean of FavoriteUrlCount. (typed to entity, auto-paging)
- * This is related to "selectFavoriteUrlCount" on FavoriteLogBhv.
- * - *

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

- * @author DBFlute(AutoGenerator) - */ -public class FavoriteUrlCountPmb extends BsFavoriteUrlCountPmb { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/FavoriteUrlRankingPmb.java b/src/main/java/org/codelibs/fess/db/exbhv/pmbean/FavoriteUrlRankingPmb.java deleted file mode 100644 index b7e508a73..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/FavoriteUrlRankingPmb.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv.pmbean; - -import org.codelibs.fess.db.bsbhv.pmbean.BsFavoriteUrlRankingPmb; - -/** - * - * The typed parameter-bean of FavoriteUrlRanking. (typed to entity, auto-paging)
- * This is related to "selectFavoriteUrlRanking" on FavoriteLogBhv.
- * - *

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

- * @author DBFlute(AutoGenerator) - */ -public class FavoriteUrlRankingPmb extends BsFavoriteUrlRankingPmb { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/GroupedFieldNamePmb.java b/src/main/java/org/codelibs/fess/db/exbhv/pmbean/GroupedFieldNamePmb.java deleted file mode 100644 index 638d4a554..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/GroupedFieldNamePmb.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv.pmbean; - -import org.codelibs.fess.db.bsbhv.pmbean.BsGroupedFieldNamePmb; - -/** - * - * The typed parameter-bean of GroupedFieldName. (typed to entity, auto-paging)
- * This is related to "selectGroupedFieldName" on SearchFieldLogBhv.
- * - *

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

- * @author DBFlute(AutoGenerator) - */ -public class GroupedFieldNamePmb extends BsGroupedFieldNamePmb { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/HotSearchWordPmb.java b/src/main/java/org/codelibs/fess/db/exbhv/pmbean/HotSearchWordPmb.java deleted file mode 100644 index e5d4eb8a6..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/HotSearchWordPmb.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv.pmbean; - -import org.codelibs.fess.db.bsbhv.pmbean.BsHotSearchWordPmb; - -/** - * - * The typed parameter-bean of HotSearchWord. (typed to entity, auto-paging)
- * This is related to "selectHotSearchWord" on SearchLogBhv.
- * - *

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

- * @author DBFlute(AutoGenerator) - */ -public class HotSearchWordPmb extends BsHotSearchWordPmb { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/RefererRankingPmb.java b/src/main/java/org/codelibs/fess/db/exbhv/pmbean/RefererRankingPmb.java deleted file mode 100644 index a92fa9619..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/RefererRankingPmb.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv.pmbean; - -import org.codelibs.fess.db.bsbhv.pmbean.BsRefererRankingPmb; - -/** - * - * The typed parameter-bean of RefererRanking. (typed to entity, auto-paging)
- * This is related to "selectRefererRanking" on SearchLogBhv.
- * - *

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

- * @author DBFlute(AutoGenerator) - */ -public class RefererRankingPmb extends BsRefererRankingPmb { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/SearchFieldRankingPmb.java b/src/main/java/org/codelibs/fess/db/exbhv/pmbean/SearchFieldRankingPmb.java deleted file mode 100644 index 13e08b57b..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/SearchFieldRankingPmb.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv.pmbean; - -import org.codelibs.fess.db.bsbhv.pmbean.BsSearchFieldRankingPmb; - -/** - * - * The typed parameter-bean of SearchFieldRanking. (typed to entity, auto-paging)
- * This is related to "selectSearchFieldRanking" on SearchLogBhv.
- * - *

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

- * @author DBFlute(AutoGenerator) - */ -public class SearchFieldRankingPmb extends BsSearchFieldRankingPmb { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/SearchQueryRankingPmb.java b/src/main/java/org/codelibs/fess/db/exbhv/pmbean/SearchQueryRankingPmb.java deleted file mode 100644 index 1d05d4254..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/SearchQueryRankingPmb.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv.pmbean; - -import org.codelibs.fess.db.bsbhv.pmbean.BsSearchQueryRankingPmb; - -/** - * - * The typed parameter-bean of SearchQueryRanking. (typed to entity, auto-paging)
- * This is related to "selectSearchQueryRanking" on SearchLogBhv.
- * - *

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

- * @author DBFlute(AutoGenerator) - */ -public class SearchQueryRankingPmb extends BsSearchQueryRankingPmb { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/SearchWordRankingPmb.java b/src/main/java/org/codelibs/fess/db/exbhv/pmbean/SearchWordRankingPmb.java deleted file mode 100644 index 77d6e50d7..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/SearchWordRankingPmb.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv.pmbean; - -import org.codelibs.fess.db.bsbhv.pmbean.BsSearchWordRankingPmb; - -/** - * - * The typed parameter-bean of SearchWordRanking. (typed to entity, auto-paging)
- * This is related to "selectSearchWordRanking" on SearchLogBhv.
- * - *

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

- * @author DBFlute(AutoGenerator) - */ -public class SearchWordRankingPmb extends BsSearchWordRankingPmb { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/SolrQueryRankingPmb.java b/src/main/java/org/codelibs/fess/db/exbhv/pmbean/SolrQueryRankingPmb.java deleted file mode 100644 index 381544867..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/SolrQueryRankingPmb.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv.pmbean; - -import org.codelibs.fess.db.bsbhv.pmbean.BsSolrQueryRankingPmb; - -/** - * - * The typed parameter-bean of SolrQueryRanking. (typed to entity, auto-paging)
- * This is related to "selectSolrQueryRanking" on SearchLogBhv.
- * - *

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

- * @author DBFlute(AutoGenerator) - */ -public class SolrQueryRankingPmb extends BsSolrQueryRankingPmb { -} diff --git a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/UserAgentRankingPmb.java b/src/main/java/org/codelibs/fess/db/exbhv/pmbean/UserAgentRankingPmb.java deleted file mode 100644 index b666afa8b..000000000 --- a/src/main/java/org/codelibs/fess/db/exbhv/pmbean/UserAgentRankingPmb.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exbhv.pmbean; - -import org.codelibs.fess.db.bsbhv.pmbean.BsUserAgentRankingPmb; - -/** - * - * The typed parameter-bean of UserAgentRanking. (typed to entity, auto-paging)
- * This is related to "selectUserAgentRanking" on SearchLogBhv.
- * - *

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

- * @author DBFlute(AutoGenerator) - */ -public class UserAgentRankingPmb extends BsUserAgentRankingPmb { -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/BoostDocumentRule.java b/src/main/java/org/codelibs/fess/db/exentity/BoostDocumentRule.java deleted file mode 100644 index 816f1a278..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/BoostDocumentRule.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsBoostDocumentRule; - -/** - * The entity of BOOST_DOCUMENT_RULE. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class BoostDocumentRule extends BsBoostDocumentRule { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/ClickLog.java b/src/main/java/org/codelibs/fess/db/exentity/ClickLog.java deleted file mode 100644 index f938daf69..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/ClickLog.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import java.text.SimpleDateFormat; -import java.time.LocalDateTime; - -import org.codelibs.fess.Constants; -import org.codelibs.fess.db.bsentity.BsClickLog; - -/** - * The entity of CLICK_LOG. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class ClickLog extends BsClickLog { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - private LocalDateTime queryRequestedTime; - - private String userSessionId; - - private String docId; - - private long clickCount; - - public String getUserSessionId() { - return userSessionId; - } - - public void setUserSessionId(final String userSessionId) { - this.userSessionId = userSessionId; - } - - public LocalDateTime getQueryRequestedTime() { - return queryRequestedTime; - } - - public void setQueryRequestedTime(final LocalDateTime queryRequestedTime) { - this.queryRequestedTime = queryRequestedTime; - } - - public String getRequestedTimeForList() { - final SimpleDateFormat sdf = new SimpleDateFormat(Constants.DEFAULT_DATETIME_FORMAT); - if (getRequestedTime() != null) { - return sdf.format(getRequestedTime()); - } - return null; - } - - public String getDocId() { - return docId; - } - - public void setDocId(final String docId) { - this.docId = docId; - } - - public long getClickCount() { - return clickCount; - } - - public void setClickCount(final long clickCount) { - this.clickCount = clickCount; - } - - @Override - public String toString() { - return "ClickLog [queryRequestedTime=" + queryRequestedTime + ", userSessionId=" + userSessionId + ", docId=" + docId - + ", clickCount=" + clickCount + ", _id=" + _id + ", _searchId=" + _searchId + ", _url=" + _url + ", _requestedTime=" - + _requestedTime + "]"; - } -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/CrawlingSession.java b/src/main/java/org/codelibs/fess/db/exentity/CrawlingSession.java deleted file mode 100644 index 671a74ed2..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/CrawlingSession.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsCrawlingSession; - -/** - * The entity of CRAWLING_SESSION. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class CrawlingSession extends BsCrawlingSession { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - public CrawlingSession() { - } - - public CrawlingSession(final String sessionId) { - setSessionId(sessionId); - } -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/CrawlingSessionInfo.java b/src/main/java/org/codelibs/fess/db/exentity/CrawlingSessionInfo.java deleted file mode 100644 index bb40a361f..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/CrawlingSessionInfo.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import java.util.Locale; - -import org.codelibs.fess.db.bsentity.BsCrawlingSessionInfo; -import org.seasar.struts.util.MessageResourcesUtil; -import org.seasar.struts.util.RequestUtil; - -/** - * The entity of CRAWLING_SESSION_INFO. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class CrawlingSessionInfo extends BsCrawlingSessionInfo { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - // MySQL: public String getKey() {return super.getIdKey();} - // MySQL: public void setKey(String key) {super.setIdKey(key);} - - public String getKeyMsg() { - final Locale locale = RequestUtil.getRequest().getLocale(); - final String message = MessageResourcesUtil.getMessage(locale, "labels.crawling_session_" + getKey()); - if (message == null || message.startsWith("???")) { - return getKey(); - } - return message; - } -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/DataConfigToLabelTypeMapping.java b/src/main/java/org/codelibs/fess/db/exentity/DataConfigToLabelTypeMapping.java deleted file mode 100644 index 56f66bc3d..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/DataConfigToLabelTypeMapping.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsDataConfigToLabelTypeMapping; - -/** - * The entity of DATA_CONFIG_TO_LABEL_TYPE_MAPPING. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class DataConfigToLabelTypeMapping extends BsDataConfigToLabelTypeMapping { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/DataConfigToRoleTypeMapping.java b/src/main/java/org/codelibs/fess/db/exentity/DataConfigToRoleTypeMapping.java deleted file mode 100644 index fd10e5255..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/DataConfigToRoleTypeMapping.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsDataConfigToRoleTypeMapping; - -/** - * The entity of DATA_CONFIG_TO_ROLE_TYPE_MAPPING. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class DataConfigToRoleTypeMapping extends BsDataConfigToRoleTypeMapping { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/DataCrawlingConfig.java b/src/main/java/org/codelibs/fess/db/exentity/DataCrawlingConfig.java deleted file mode 100644 index aabe48fa1..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/DataCrawlingConfig.java +++ /dev/null @@ -1,336 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.regex.Pattern; - -import org.apache.http.auth.AuthScheme; -import org.apache.http.auth.AuthScope; -import org.apache.http.auth.Credentials; -import org.apache.http.auth.NTCredentials; -import org.apache.http.auth.UsernamePasswordCredentials; -import org.apache.http.impl.auth.BasicScheme; -import org.apache.http.impl.auth.DigestScheme; -import org.apache.http.impl.auth.NTLMScheme; -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.Constants; -import org.codelibs.fess.db.bsentity.BsDataCrawlingConfig; -import org.codelibs.fess.util.ParameterUtil; -import org.codelibs.robot.client.S2RobotClientFactory; -import org.codelibs.robot.client.http.Authentication; -import org.codelibs.robot.client.http.HcHttpClient; -import org.codelibs.robot.client.http.impl.AuthenticationImpl; -import org.codelibs.robot.client.http.ntlm.JcifsEngine; -import org.codelibs.robot.client.smb.SmbAuthentication; -import org.codelibs.robot.client.smb.SmbClient; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The entity of DATA_CRAWLING_CONFIG. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class DataCrawlingConfig extends BsDataCrawlingConfig implements CrawlingConfig { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - private static final Logger logger = LoggerFactory.getLogger(DataCrawlingConfig.class); - - private static final String S2ROBOT_WEB_HEADER_PREFIX = "s2robot.web.header."; - - private static final String S2ROBOT_WEB_AUTH = "s2robot.web.auth"; - - private static final String S2ROBOT_USERAGENT = "s2robot.useragent"; - - private static final String S2ROBOT_PARAM_PREFIX = "s2robot.param."; - - private static final Object S2ROBOT_FILE_AUTH = "s2robot.file.auth"; - - private String[] labelTypeIds; - - private String[] roleTypeIds; - - protected Pattern[] includedDocPathPatterns; - - protected Pattern[] excludedDocPathPatterns; - - private Map handlerParameterMap; - - private Map handlerScriptMap; - - public DataCrawlingConfig() { - super(); - setBoost(BigDecimal.ONE); - } - - public String[] getLabelTypeIds() { - if (labelTypeIds == null) { - return StringUtil.EMPTY_STRINGS; - } - return labelTypeIds; - } - - public void setLabelTypeIds(final String[] labelTypeIds) { - this.labelTypeIds = labelTypeIds; - } - - @Override - public String[] getLabelTypeValues() { - final List values = new ArrayList(); - final List list = getDataConfigToLabelTypeMappingList(); - if (list != null && !list.isEmpty()) { - for (final DataConfigToLabelTypeMapping mapping : list) { - mapping.getLabelType().ifPresent(entity -> { - values.add(entity.getValue()); - }); - } - } - return values.toArray(new String[values.size()]); - } - - public String[] getRoleTypeIds() { - if (roleTypeIds == null) { - return StringUtil.EMPTY_STRINGS; - } - return roleTypeIds; - } - - public void setRoleTypeIds(final String[] roleTypeIds) { - this.roleTypeIds = roleTypeIds; - } - - @Override - public String[] getRoleTypeValues() { - final List values = new ArrayList(); - final List list = getDataConfigToRoleTypeMappingList(); - if (list != null && !list.isEmpty()) { - for (final DataConfigToRoleTypeMapping mapping : list) { - mapping.getRoleType().ifPresent(entity -> { - values.add(entity.getValue()); - }); - } - } - return values.toArray(new String[values.size()]); - } - - @Override - public String getDocumentBoost() { - return Float.valueOf(getBoost().floatValue()).toString(); - } - - public String getBoostValue() { - if (_boost != null) { - return Integer.toString(_boost.intValue()); - } - return null; - } - - public void setBoostValue(final String value) { - if (value != null) { - try { - _boost = new BigDecimal(value); - } catch (final Exception e) {} - } - } - - @Override - public String getIndexingTarget(final String input) { - // always return true - return Constants.TRUE; - } - - @Override - public String getConfigId() { - return ConfigType.DATA.getConfigId(getId()); - } - - public Map getHandlerParameterMap() { - if (handlerParameterMap == null) { - handlerParameterMap = ParameterUtil.parse(getHandlerParameter()); - } - return handlerParameterMap; - } - - public Map getHandlerScriptMap() { - if (handlerScriptMap == null) { - handlerScriptMap = ParameterUtil.parse(getHandlerScript()); - } - return handlerScriptMap; - } - - @Override - public void initializeClientFactory(final S2RobotClientFactory robotClientFactory) { - final Map paramMap = getHandlerParameterMap(); - - final Map factoryParamMap = new HashMap(); - robotClientFactory.setInitParameterMap(factoryParamMap); - - // parameters - for (final Map.Entry entry : paramMap.entrySet()) { - final String key = entry.getKey(); - if (key.startsWith(S2ROBOT_PARAM_PREFIX)) { - factoryParamMap.put(key.substring(S2ROBOT_PARAM_PREFIX.length()), entry.getValue()); - } - } - - // user agent - final String userAgent = paramMap.get(S2ROBOT_USERAGENT); - if (StringUtil.isNotBlank(userAgent)) { - factoryParamMap.put(HcHttpClient.USER_AGENT_PROPERTY, userAgent); - } - - // web auth - final String webAuthStr = paramMap.get(S2ROBOT_WEB_AUTH); - if (StringUtil.isNotBlank(webAuthStr)) { - final String[] webAuthNames = webAuthStr.split(","); - final List basicAuthList = new ArrayList(); - for (final String webAuthName : webAuthNames) { - final String scheme = paramMap.get(S2ROBOT_WEB_AUTH + "." + webAuthName + ".scheme"); - final String hostname = paramMap.get(S2ROBOT_WEB_AUTH + "." + webAuthName + ".host"); - final String port = paramMap.get(S2ROBOT_WEB_AUTH + "." + webAuthName + ".port"); - final String realm = paramMap.get(S2ROBOT_WEB_AUTH + "." + webAuthName + ".realm"); - final String username = paramMap.get(S2ROBOT_WEB_AUTH + "." + webAuthName + ".username"); - final String password = paramMap.get(S2ROBOT_WEB_AUTH + "." + webAuthName + ".password"); - - if (StringUtil.isEmpty(username)) { - logger.warn("username is empty. webAuth:" + webAuthName); - continue; - } - - AuthScheme authScheme = null; - if (Constants.BASIC.equals(scheme)) { - authScheme = new BasicScheme(); - } else if (Constants.DIGEST.equals(scheme)) { - authScheme = new DigestScheme(); - } else if (Constants.NTLM.equals(scheme)) { - authScheme = new NTLMScheme(new JcifsEngine()); - } - - AuthScope authScope; - if (StringUtil.isBlank(hostname)) { - authScope = AuthScope.ANY; - } else { - int p = AuthScope.ANY_PORT; - if (StringUtil.isNotBlank(port)) { - try { - p = Integer.parseInt(port); - } catch (final NumberFormatException e) { - logger.warn("Failed to parse " + port, e); - } - } - - String r = realm; - if (StringUtil.isBlank(realm)) { - r = AuthScope.ANY_REALM; - } - - String s = scheme; - if (StringUtil.isBlank(scheme) || Constants.NTLM.equals(scheme)) { - s = AuthScope.ANY_SCHEME; - } - authScope = new AuthScope(hostname, p, r, s); - } - - Credentials credentials; - if (Constants.NTLM.equals(scheme)) { - final String workstation = paramMap.get(S2ROBOT_WEB_AUTH + "." + webAuthName + ".workstation"); - final String domain = paramMap.get(S2ROBOT_WEB_AUTH + "." + webAuthName + ".domain"); - credentials = - new NTCredentials(username, password == null ? StringUtil.EMPTY : password, - workstation == null ? StringUtil.EMPTY : workstation, domain == null ? StringUtil.EMPTY : domain); - } else { - credentials = new UsernamePasswordCredentials(username, password == null ? StringUtil.EMPTY : password); - } - - basicAuthList.add(new AuthenticationImpl(authScope, credentials, authScheme)); - } - factoryParamMap.put(HcHttpClient.BASIC_AUTHENTICATIONS_PROPERTY, - basicAuthList.toArray(new Authentication[basicAuthList.size()])); - } - - // request header - final List rhList = new ArrayList(); - int count = 1; - String headerName = paramMap.get(S2ROBOT_WEB_HEADER_PREFIX + count + ".name"); - while (StringUtil.isNotBlank(headerName)) { - final String headerValue = paramMap.get(S2ROBOT_WEB_HEADER_PREFIX + count + ".value"); - rhList.add(new org.codelibs.robot.client.http.RequestHeader(headerName, headerValue)); - count++; - headerName = paramMap.get(S2ROBOT_WEB_HEADER_PREFIX + count + ".name"); - } - if (!rhList.isEmpty()) { - factoryParamMap.put(HcHttpClient.REQUERT_HEADERS_PROPERTY, - rhList.toArray(new org.codelibs.robot.client.http.RequestHeader[rhList.size()])); - } - - // file auth - final String fileAuthStr = paramMap.get(S2ROBOT_FILE_AUTH); - if (StringUtil.isNotBlank(fileAuthStr)) { - final String[] fileAuthNames = fileAuthStr.split(","); - final List smbAuthList = new ArrayList(); - for (final String fileAuthName : fileAuthNames) { - final String scheme = paramMap.get(S2ROBOT_FILE_AUTH + "." + fileAuthName + ".scheme"); - if (Constants.SAMBA.equals(scheme)) { - final String domain = paramMap.get(S2ROBOT_FILE_AUTH + "." + fileAuthName + ".domain"); - final String hostname = paramMap.get(S2ROBOT_FILE_AUTH + "." + fileAuthName + ".host"); - final String port = paramMap.get(S2ROBOT_FILE_AUTH + "." + fileAuthName + ".port"); - final String username = paramMap.get(S2ROBOT_FILE_AUTH + "." + fileAuthName + ".username"); - final String password = paramMap.get(S2ROBOT_FILE_AUTH + "." + fileAuthName + ".password"); - - if (StringUtil.isEmpty(username)) { - logger.warn("username is empty. fileAuth:" + fileAuthName); - continue; - } - - final SmbAuthentication smbAuth = new SmbAuthentication(); - smbAuth.setDomain(domain == null ? StringUtil.EMPTY : domain); - smbAuth.setServer(hostname); - if (StringUtil.isNotBlank(port)) { - try { - smbAuth.setPort(Integer.parseInt(port)); - } catch (final NumberFormatException e) { - logger.warn("Failed to parse " + port, e); - } - } - smbAuth.setUsername(username); - smbAuth.setPassword(password == null ? StringUtil.EMPTY : password); - smbAuthList.add(smbAuth); - } - } - if (!smbAuthList.isEmpty()) { - factoryParamMap.put(SmbClient.SMB_AUTHENTICATIONS_PROPERTY, smbAuthList.toArray(new SmbAuthentication[smbAuthList.size()])); - } - } - - } - - @Override - public Map getConfigParameterMap(final ConfigName name) { - return Collections.emptyMap(); - } -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/FailureUrl.java b/src/main/java/org/codelibs/fess/db/exentity/FailureUrl.java deleted file mode 100644 index 1249910a5..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/FailureUrl.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import java.text.SimpleDateFormat; - -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.Constants; -import org.codelibs.fess.db.bsentity.BsFailureUrl; -import org.codelibs.fess.util.ComponentUtil; - -/** - * The entity of FAILURE_URL. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class FailureUrl extends BsFailureUrl { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - public String getLastAccessTimeForList() { - final SimpleDateFormat sdf = new SimpleDateFormat(Constants.DEFAULT_DATETIME_FORMAT); - if (getLastAccessTime() != null) { - return sdf.format(getLastAccessTime()); - } - return null; - } - - public String getWebConfigName() { - final CrawlingConfig crawlingConfig = ComponentUtil.getCrawlingConfigHelper().getCrawlingConfig(getConfigId()); - if (crawlingConfig != null) { - return crawlingConfig.getName(); - } - return StringUtil.EMPTY; - } - - public String getFileConfigName() { - final CrawlingConfig crawlingConfig = ComponentUtil.getCrawlingConfigHelper().getCrawlingConfig(getConfigId()); - if (crawlingConfig != null) { - return crawlingConfig.getName(); - } - return StringUtil.EMPTY; - } - - public String getDataConfigName() { - final CrawlingConfig crawlingConfig = ComponentUtil.getCrawlingConfigHelper().getCrawlingConfig(getConfigId()); - if (crawlingConfig != null) { - return crawlingConfig.getName(); - } - return StringUtil.EMPTY; - } -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/FavoriteLog.java b/src/main/java/org/codelibs/fess/db/exentity/FavoriteLog.java deleted file mode 100644 index 43a4605c8..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/FavoriteLog.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsFavoriteLog; - -/** - * The entity of FAVORITE_LOG. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class FavoriteLog extends BsFavoriteLog { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/FileAuthentication.java b/src/main/java/org/codelibs/fess/db/exentity/FileAuthentication.java deleted file mode 100644 index 0143abfa4..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/FileAuthentication.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsFileAuthentication; - -/** - * The entity of FILE_AUTHENTICATION. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class FileAuthentication extends BsFileAuthentication { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/FileConfigToLabelTypeMapping.java b/src/main/java/org/codelibs/fess/db/exentity/FileConfigToLabelTypeMapping.java deleted file mode 100644 index bc4f5e974..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/FileConfigToLabelTypeMapping.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsFileConfigToLabelTypeMapping; - -/** - * The entity of FILE_CONFIG_TO_LABEL_TYPE_MAPPING. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class FileConfigToLabelTypeMapping extends BsFileConfigToLabelTypeMapping { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/FileConfigToRoleTypeMapping.java b/src/main/java/org/codelibs/fess/db/exentity/FileConfigToRoleTypeMapping.java deleted file mode 100644 index 3e2004256..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/FileConfigToRoleTypeMapping.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsFileConfigToRoleTypeMapping; - -/** - * The entity of FILE_CONFIG_TO_ROLE_TYPE_MAPPING. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class FileConfigToRoleTypeMapping extends BsFileConfigToRoleTypeMapping { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/FileCrawlingConfig.java b/src/main/java/org/codelibs/fess/db/exentity/FileCrawlingConfig.java deleted file mode 100644 index d0a3ae09c..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/FileCrawlingConfig.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.regex.Pattern; - -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.Constants; -import org.codelibs.fess.db.bsentity.BsFileCrawlingConfig; -import org.codelibs.fess.helper.SystemHelper; -import org.codelibs.fess.service.FileAuthenticationService; -import org.codelibs.fess.util.ComponentUtil; -import org.codelibs.fess.util.ParameterUtil; -import org.codelibs.robot.client.S2RobotClientFactory; -import org.codelibs.robot.client.smb.SmbAuthentication; -import org.codelibs.robot.client.smb.SmbClient; -import org.seasar.framework.container.SingletonS2Container; - -/** - * The entity of FILE_CRAWLING_CONFIG. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class FileCrawlingConfig extends BsFileCrawlingConfig implements CrawlingConfig { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - private String[] labelTypeIds; - - private String[] roleTypeIds; - - protected volatile Pattern[] includedDocPathPatterns; - - protected volatile Pattern[] excludedDocPathPatterns; - - protected volatile Map> configParameterMap; - - public FileCrawlingConfig() { - super(); - setBoost(BigDecimal.ONE); - } - - public String[] getLabelTypeIds() { - if (labelTypeIds == null) { - return StringUtil.EMPTY_STRINGS; - } - return labelTypeIds; - } - - public void setLabelTypeIds(final String[] labelTypeIds) { - this.labelTypeIds = labelTypeIds; - } - - @Override - public String[] getLabelTypeValues() { - final List values = new ArrayList(); - final List list = getFileConfigToLabelTypeMappingList(); - if (list != null && !list.isEmpty()) { - for (final FileConfigToLabelTypeMapping mapping : list) { - mapping.getLabelType().ifPresent(entity -> { - values.add(entity.getValue()); - }); - } - } - return values.toArray(new String[values.size()]); - } - - public String[] getRoleTypeIds() { - if (roleTypeIds == null) { - return StringUtil.EMPTY_STRINGS; - } - return roleTypeIds; - } - - public void setRoleTypeIds(final String[] roleTypeIds) { - this.roleTypeIds = roleTypeIds; - } - - @Override - public String[] getRoleTypeValues() { - final List values = new ArrayList(); - final List list = getFileConfigToRoleTypeMappingList(); - if (list != null && !list.isEmpty()) { - for (final FileConfigToRoleTypeMapping mapping : list) { - mapping.getRoleType().ifPresent(entity -> { - values.add(entity.getValue()); - }); - } - } - return values.toArray(new String[values.size()]); - } - - @Override - public String getDocumentBoost() { - return Float.valueOf(getBoost().floatValue()).toString(); - } - - @Override - public String getIndexingTarget(final String input) { - if (includedDocPathPatterns == null || excludedDocPathPatterns == null) { - initDocPathPattern(); - } - - if (includedDocPathPatterns.length == 0 && excludedDocPathPatterns.length == 0) { - return Constants.TRUE; - } - - for (final Pattern pattern : includedDocPathPatterns) { - if (pattern.matcher(input).matches()) { - return Constants.TRUE; - } - } - - for (final Pattern pattern : excludedDocPathPatterns) { - if (pattern.matcher(input).matches()) { - return Constants.FALSE; - } - } - - return Constants.TRUE; - - } - - protected synchronized void initDocPathPattern() { - final SystemHelper systemHelper = ComponentUtil.getSystemHelper(); - - if (includedDocPathPatterns == null) { - if (StringUtil.isNotBlank(getIncludedDocPaths())) { - final List pathPatterList = new ArrayList(); - final String[] paths = getIncludedDocPaths().split("[\r\n]"); - for (final String u : paths) { - if (StringUtil.isNotBlank(u) && !u.trim().startsWith("#")) { - pathPatterList.add(Pattern.compile(systemHelper.encodeUrlFilter(u.trim()))); - } - } - includedDocPathPatterns = pathPatterList.toArray(new Pattern[pathPatterList.size()]); - } else { - includedDocPathPatterns = new Pattern[0]; - } - } - - if (excludedDocPathPatterns == null) { - if (StringUtil.isNotBlank(getExcludedDocPaths())) { - final List pathPatterList = new ArrayList(); - final String[] paths = getExcludedDocPaths().split("[\r\n]"); - for (final String u : paths) { - if (StringUtil.isNotBlank(u) && !u.trim().startsWith("#")) { - pathPatterList.add(Pattern.compile(systemHelper.encodeUrlFilter(u.trim()))); - } - } - excludedDocPathPatterns = pathPatterList.toArray(new Pattern[pathPatterList.size()]); - } else if (includedDocPathPatterns.length > 0) { - excludedDocPathPatterns = new Pattern[] { Pattern.compile(".*") }; - } else { - excludedDocPathPatterns = new Pattern[0]; - } - } - } - - public String getBoostValue() { - if (_boost != null) { - return Integer.toString(_boost.intValue()); - } - return null; - } - - public void setBoostValue(final String value) { - if (value != null) { - try { - _boost = new BigDecimal(value); - } catch (final Exception e) {} - } - } - - @Override - public String getConfigId() { - return ConfigType.FILE.getConfigId(getId()); - } - - @Override - public void initializeClientFactory(final S2RobotClientFactory clientFactory) { - final FileAuthenticationService fileAuthenticationService = SingletonS2Container.getComponent(FileAuthenticationService.class); - - // Parameters - final Map paramMap = new HashMap(); - clientFactory.setInitParameterMap(paramMap); - - final Map clientConfigMap = getConfigParameterMap(ConfigName.CLIENT); - if (clientConfigMap != null) { - paramMap.putAll(clientConfigMap); - } - - // auth params - final List fileAuthList = fileAuthenticationService.getFileAuthenticationList(getId()); - final List smbAuthList = new ArrayList(); - for (final FileAuthentication fileAuth : fileAuthList) { - if (Constants.SAMBA.equals(fileAuth.getProtocolScheme())) { - final SmbAuthentication smbAuth = new SmbAuthentication(); - final Map map = ParameterUtil.parse(fileAuth.getParameters()); - final String domain = map.get("domain"); - smbAuth.setDomain(domain == null ? StringUtil.EMPTY : domain); - smbAuth.setServer(fileAuth.getHostname()); - smbAuth.setPort(fileAuth.getPort()); - smbAuth.setUsername(fileAuth.getUsername()); - smbAuth.setPassword(fileAuth.getPassword()); - smbAuthList.add(smbAuth); - } - } - paramMap.put(SmbClient.SMB_AUTHENTICATIONS_PROPERTY, smbAuthList.toArray(new SmbAuthentication[smbAuthList.size()])); - - } - - @Override - public Map getConfigParameterMap(final ConfigName name) { - if (configParameterMap == null) { - configParameterMap = ParameterUtil.createConfigParameterMap(getConfigParameter()); - } - - final Map configMap = configParameterMap.get(name); - if (configMap == null) { - return Collections.emptyMap(); - } - return configMap; - } -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/JobLog.java b/src/main/java/org/codelibs/fess/db/exentity/JobLog.java deleted file mode 100644 index c656a50df..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/JobLog.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.Constants; -import org.codelibs.fess.db.bsentity.BsJobLog; -import org.codelibs.fess.util.ComponentUtil; - -/** - * The entity of JOB_LOG. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class JobLog extends BsJobLog { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - private ScheduledJob scheduledJob; - - public JobLog() { - } - - public JobLog(final ScheduledJob scheduledJob) { - this.scheduledJob = scheduledJob; - setJobName(scheduledJob.getName()); - setScriptType(scheduledJob.getScriptType()); - setScriptData(scheduledJob.getScriptData()); - setTarget(scheduledJob.getTarget()); - setStartTime(ComponentUtil.getSystemHelper().getCurrentTime()); - setJobStatus(Constants.RUNNING); - } - - public ScheduledJob getScheduledJob() { - return scheduledJob; - } -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/KeyMatch.java b/src/main/java/org/codelibs/fess/db/exentity/KeyMatch.java deleted file mode 100644 index 3829c9c8d..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/KeyMatch.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import java.math.BigDecimal; - -import org.codelibs.fess.db.bsentity.BsKeyMatch; - -/** - * The entity of KEY_MATCH. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class KeyMatch extends BsKeyMatch { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - public KeyMatch() { - super(); - setBoost(BigDecimal.ONE); - } - - public String getBoostValue() { - if (_boost != null) { - return Integer.toString(_boost.intValue()); - } - return null; - } - - public void setBoostValue(final String value) { - if (value != null) { - try { - _boost = new BigDecimal(value); - } catch (final Exception e) {} - } - } -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/LabelType.java b/src/main/java/org/codelibs/fess/db/exentity/LabelType.java deleted file mode 100644 index 76d0db817..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/LabelType.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import java.util.ArrayList; -import java.util.List; - -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.db.bsentity.BsLabelType; - -/** - * The entity of LABEL_TYPE. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class LabelType extends BsLabelType { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - private String[] roleTypeIds; - - private List roleValueList; - - public String[] getRoleTypeIds() { - if (roleTypeIds == null) { - return StringUtil.EMPTY_STRINGS; - } - return roleTypeIds; - } - - public void setRoleTypeIds(final String[] roleTypeIds) { - this.roleTypeIds = roleTypeIds; - } - - public List getRoleValueList() { - if (roleValueList == null) { - roleValueList = new ArrayList(); - for (final LabelTypeToRoleTypeMapping mapping : getLabelTypeToRoleTypeMappingList()) { - mapping.getRoleType().ifPresent(entity -> { - roleValueList.add(entity.getValue()); - }); - } - } - return roleValueList; - } - -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/LabelTypeToRoleTypeMapping.java b/src/main/java/org/codelibs/fess/db/exentity/LabelTypeToRoleTypeMapping.java deleted file mode 100644 index 414807626..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/LabelTypeToRoleTypeMapping.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsLabelTypeToRoleTypeMapping; - -/** - * The entity of LABEL_TYPE_TO_ROLE_TYPE_MAPPING. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class LabelTypeToRoleTypeMapping extends BsLabelTypeToRoleTypeMapping { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/OverlappingHost.java b/src/main/java/org/codelibs/fess/db/exentity/OverlappingHost.java deleted file mode 100644 index 3aa3d8e86..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/OverlappingHost.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsOverlappingHost; - -/** - * The entity of OVERLAPPING_HOST. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class OverlappingHost extends BsOverlappingHost { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - public String convert(final String url) { - final String targetStr = getOverlappingName().replaceAll("\\.", "\\\\."); - return url.replaceFirst("://" + targetStr + "$", "://" + getRegularName()).replaceFirst("://" + targetStr + "([:/])", - "://" + getRegularName() + "$1"); - } -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/PathMapping.java b/src/main/java/org/codelibs/fess/db/exentity/PathMapping.java deleted file mode 100644 index e9c096680..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/PathMapping.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.codelibs.fess.db.bsentity.BsPathMapping; - -/** - * The entity of PATH_MAPPING. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class PathMapping extends BsPathMapping { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - private Pattern regexPattern; - - public Matcher getMatcher(final CharSequence input) { - if (regexPattern == null) { - regexPattern = Pattern.compile(getRegex()); - } - return regexPattern.matcher(input); - } -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/RequestHeader.java b/src/main/java/org/codelibs/fess/db/exentity/RequestHeader.java deleted file mode 100644 index f676e56fe..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/RequestHeader.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsRequestHeader; - -/** - * The entity of REQUEST_HEADER. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class RequestHeader extends BsRequestHeader { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - public org.codelibs.robot.client.http.RequestHeader getS2RobotRequestHeader() { - return new org.codelibs.robot.client.http.RequestHeader(getName(), getValue()); - } -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/RoleType.java b/src/main/java/org/codelibs/fess/db/exentity/RoleType.java deleted file mode 100644 index de5af488d..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/RoleType.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsRoleType; - -/** - * The entity of ROLE_TYPE. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class RoleType extends BsRoleType { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/ScheduledJob.java b/src/main/java/org/codelibs/fess/db/exentity/ScheduledJob.java deleted file mode 100644 index 6691f37d6..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/ScheduledJob.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.Constants; -import org.codelibs.fess.db.bsentity.BsScheduledJob; -import org.codelibs.fess.job.TriggeredJob; -import org.codelibs.fess.util.ComponentUtil; - -/** - * The entity of SCHEDULED_JOB. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class ScheduledJob extends BsScheduledJob { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - public boolean isLoggingEnabled() { - return Constants.T.equals(getJobLogging()); - } - - public boolean isCrawlerJob() { - return Constants.T.equals(getCrawler()); - } - - public boolean isEnabled() { - return Constants.T.equals(getAvailable()); - } - - public boolean isRunning() { - return ComponentUtil.getJobHelper().getJobExecutoer(getId()) != null; - } - - public void start() { - final ScheduledJob scheduledJob = this; - new Thread(() -> new TriggeredJob().execute(scheduledJob)).start(); - } -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/SearchFieldLog.java b/src/main/java/org/codelibs/fess/db/exentity/SearchFieldLog.java deleted file mode 100644 index d07168845..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/SearchFieldLog.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsSearchFieldLog; - -/** - * The entity of SEARCH_FIELD_LOG. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class SearchFieldLog extends BsSearchFieldLog { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/SearchLog.java b/src/main/java/org/codelibs/fess/db/exentity/SearchLog.java deleted file mode 100644 index 65ae3281d..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/SearchLog.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import java.text.SimpleDateFormat; - -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.Constants; -import org.codelibs.fess.db.bsentity.BsSearchLog; - -/** - * The entity of SEARCH_LOG. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class SearchLog extends BsSearchLog { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - public String getRequestedTimeForList() { - final SimpleDateFormat sdf = new SimpleDateFormat(Constants.DEFAULT_DATETIME_FORMAT); - if (getRequestedTime() != null) { - return sdf.format(getRequestedTime()); - } - return null; - } - - public void addSearchFieldLogValue(final String name, final String value) { - if (StringUtil.isNotBlank(name) && StringUtil.isNotBlank(value)) { - final SearchFieldLog fieldLog = new SearchFieldLog(); - fieldLog.setName(name); - fieldLog.setValue(value); - getSearchFieldLogList().add(fieldLog); - } - } - - public void setSearchQuery(final String query) { - addSearchFieldLogValue(Constants.SEARCH_FIELD_LOG_SEARCH_QUERY, query); - } - - public void setSolrQuery(final String solrQuery) { - addSearchFieldLogValue(Constants.SEARCH_FIELD_LOG_SOLR_QUERY, solrQuery); - } - -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/SuggestBadWord.java b/src/main/java/org/codelibs/fess/db/exentity/SuggestBadWord.java deleted file mode 100644 index 59b917be3..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/SuggestBadWord.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsSuggestBadWord; - -/** - * The entity of SUGGEST_BAD_WORD. - *

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

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

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

- * @author DBFlute(AutoGenerator) - */ -public class SuggestElevateWord extends BsSuggestElevateWord { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - public SuggestElevateWord() { - super(); - setBoost(BigDecimal.ONE); - } - - public String getBoostValue() { - if (_boost != null) { - return Integer.toString(_boost.intValue()); - } - return null; - } - - public void setBoostValue(final String value) { - if (value != null) { - try { - _boost = new BigDecimal(value); - } catch (final Exception e) {} - } - } -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/UserInfo.java b/src/main/java/org/codelibs/fess/db/exentity/UserInfo.java deleted file mode 100644 index a5522a4d3..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/UserInfo.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsUserInfo; - -/** - * The entity of USER_INFO. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class UserInfo extends BsUserInfo { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/WebAuthentication.java b/src/main/java/org/codelibs/fess/db/exentity/WebAuthentication.java deleted file mode 100644 index 01f6fe758..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/WebAuthentication.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import java.util.Map; - -import org.apache.http.auth.AuthScheme; -import org.apache.http.auth.AuthScope; -import org.apache.http.auth.Credentials; -import org.apache.http.auth.NTCredentials; -import org.apache.http.auth.UsernamePasswordCredentials; -import org.apache.http.impl.auth.BasicScheme; -import org.apache.http.impl.auth.DigestScheme; -import org.apache.http.impl.auth.NTLMScheme; -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.Constants; -import org.codelibs.fess.db.bsentity.BsWebAuthentication; -import org.codelibs.fess.util.ParameterUtil; -import org.codelibs.robot.RobotSystemException; -import org.codelibs.robot.client.http.Authentication; -import org.codelibs.robot.client.http.impl.AuthenticationImpl; -import org.codelibs.robot.client.http.ntlm.JcifsEngine; - -/** - * The entity of WEB_AUTHENTICATION. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class WebAuthentication extends BsWebAuthentication { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - public Authentication getAuthentication() { - return new AuthenticationImpl(getAuthScope(), getCredentials(), getAuthScheme()); - } - - private AuthScheme getAuthScheme() { - if (Constants.BASIC.equals(getProtocolScheme())) { - return new BasicScheme(); - } else if (Constants.DIGEST.equals(getProtocolScheme())) { - return new DigestScheme(); - } else if (Constants.NTLM.equals(getProtocolScheme())) { - return new NTLMScheme(new JcifsEngine()); - } - return null; - } - - private AuthScope getAuthScope() { - if (StringUtil.isBlank(getHostname())) { - return AuthScope.ANY; - } - - int p; - if (getPort() == null) { - p = AuthScope.ANY_PORT; - } else { - p = getPort().intValue(); - } - - String r = getAuthRealm(); - if (StringUtil.isBlank(r)) { - r = AuthScope.ANY_REALM; - } - - String s = getProtocolScheme(); - if (StringUtil.isBlank(s) || Constants.NTLM.equals(s)) { - s = AuthScope.ANY_SCHEME; - } - - return new AuthScope(getHostname(), p, r, s); - } - - private Credentials getCredentials() { - if (StringUtil.isEmpty(getUsername())) { - throw new RobotSystemException("username is empty."); - } - - if (Constants.NTLM.equals(getProtocolScheme())) { - final Map parameterMap = ParameterUtil.parse(getParameters()); - final String workstation = parameterMap.get("workstation"); - final String domain = parameterMap.get("domain"); - return new NTCredentials(getUsername(), getPassword(), workstation == null ? StringUtil.EMPTY : workstation, - domain == null ? StringUtil.EMPTY : domain); - } - - return new UsernamePasswordCredentials(getUsername(), getPassword() == null ? StringUtil.EMPTY : getPassword()); - } - -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/WebConfigToLabelTypeMapping.java b/src/main/java/org/codelibs/fess/db/exentity/WebConfigToLabelTypeMapping.java deleted file mode 100644 index 556878f36..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/WebConfigToLabelTypeMapping.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsWebConfigToLabelTypeMapping; - -/** - * The entity of WEB_CONFIG_TO_LABEL_TYPE_MAPPING. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class WebConfigToLabelTypeMapping extends BsWebConfigToLabelTypeMapping { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/WebConfigToRoleTypeMapping.java b/src/main/java/org/codelibs/fess/db/exentity/WebConfigToRoleTypeMapping.java deleted file mode 100644 index 044ce8e70..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/WebConfigToRoleTypeMapping.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import org.codelibs.fess.db.bsentity.BsWebConfigToRoleTypeMapping; - -/** - * The entity of WEB_CONFIG_TO_ROLE_TYPE_MAPPING. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class WebConfigToRoleTypeMapping extends BsWebConfigToRoleTypeMapping { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/WebCrawlingConfig.java b/src/main/java/org/codelibs/fess/db/exentity/WebCrawlingConfig.java deleted file mode 100644 index 5d1e77544..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/WebCrawlingConfig.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.regex.Pattern; - -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.Constants; -import org.codelibs.fess.db.bsentity.BsWebCrawlingConfig; -import org.codelibs.fess.service.RequestHeaderService; -import org.codelibs.fess.service.WebAuthenticationService; -import org.codelibs.fess.util.ParameterUtil; -import org.codelibs.robot.client.S2RobotClientFactory; -import org.codelibs.robot.client.http.Authentication; -import org.codelibs.robot.client.http.HcHttpClient; -import org.seasar.framework.container.SingletonS2Container; - -/** - * The entity of WEB_CRAWLING_CONFIG. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class WebCrawlingConfig extends BsWebCrawlingConfig implements CrawlingConfig { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; - - private String[] labelTypeIds; - - private String[] roleTypeIds; - - protected volatile Pattern[] includedDocUrlPatterns; - - protected volatile Pattern[] excludedDocUrlPatterns; - - protected volatile Map> configParameterMap; - - public WebCrawlingConfig() { - super(); - setBoost(BigDecimal.ONE); - } - - /* (non-Javadoc) - * @see org.codelibs.fess.db.exentity.CrawlingConfig#getLabelTypeIds() - */ - public String[] getLabelTypeIds() { - if (labelTypeIds == null) { - return StringUtil.EMPTY_STRINGS; - } - return labelTypeIds; - } - - public void setLabelTypeIds(final String[] labelTypeIds) { - this.labelTypeIds = labelTypeIds; - } - - @Override - public String[] getLabelTypeValues() { - final List values = new ArrayList(); - final List list = getWebConfigToLabelTypeMappingList(); - if (list != null && !list.isEmpty()) { - for (final WebConfigToLabelTypeMapping mapping : list) { - mapping.getLabelType().ifPresent(entity -> { - values.add(entity.getValue()); - }); - } - } - return values.toArray(new String[values.size()]); - } - - /* (non-Javadoc) - * @see org.codelibs.fess.db.exentity.CrawlingConfig#getRoleTypeIds() - */ - public String[] getRoleTypeIds() { - if (roleTypeIds == null) { - return StringUtil.EMPTY_STRINGS; - } - return roleTypeIds; - } - - public void setRoleTypeIds(final String[] roleTypeIds) { - this.roleTypeIds = roleTypeIds; - } - - @Override - public String[] getRoleTypeValues() { - final List values = new ArrayList(); - final List list = getWebConfigToRoleTypeMappingList(); - if (list != null && !list.isEmpty()) { - for (final WebConfigToRoleTypeMapping mapping : list) { - mapping.getRoleType().ifPresent(entity -> { - values.add(entity.getValue()); - }); - } - } - return values.toArray(new String[values.size()]); - } - - @Override - public String getDocumentBoost() { - return Float.valueOf(getBoost().floatValue()).toString(); - } - - @Override - public String getIndexingTarget(final String input) { - if (includedDocUrlPatterns == null || excludedDocUrlPatterns == null) { - initDocUrlPattern(); - } - - if (includedDocUrlPatterns.length == 0 && excludedDocUrlPatterns.length == 0) { - return Constants.TRUE; - } - - for (final Pattern pattern : includedDocUrlPatterns) { - if (pattern.matcher(input).matches()) { - return Constants.TRUE; - } - } - - for (final Pattern pattern : excludedDocUrlPatterns) { - if (pattern.matcher(input).matches()) { - return Constants.FALSE; - } - } - - return Constants.TRUE; - } - - protected synchronized void initDocUrlPattern() { - - if (includedDocUrlPatterns == null) { - if (StringUtil.isNotBlank(getIncludedDocUrls())) { - final List urlPatterList = new ArrayList(); - final String[] urls = getIncludedDocUrls().split("[\r\n]"); - for (final String u : urls) { - if (StringUtil.isNotBlank(u) && !u.trim().startsWith("#")) { - urlPatterList.add(Pattern.compile(u.trim())); - } - } - includedDocUrlPatterns = urlPatterList.toArray(new Pattern[urlPatterList.size()]); - } else { - includedDocUrlPatterns = new Pattern[0]; - } - } - - if (excludedDocUrlPatterns == null) { - if (StringUtil.isNotBlank(getExcludedDocUrls())) { - final List urlPatterList = new ArrayList(); - final String[] urls = getExcludedDocUrls().split("[\r\n]"); - for (final String u : urls) { - if (StringUtil.isNotBlank(u) && !u.trim().startsWith("#")) { - urlPatterList.add(Pattern.compile(u.trim())); - } - } - excludedDocUrlPatterns = urlPatterList.toArray(new Pattern[urlPatterList.size()]); - } else if (includedDocUrlPatterns.length > 0) { - excludedDocUrlPatterns = new Pattern[] { Pattern.compile(".*") }; - } else { - excludedDocUrlPatterns = new Pattern[0]; - } - } - } - - public String getBoostValue() { - if (_boost != null) { - return Integer.toString(_boost.intValue()); - } - return null; - } - - public void setBoostValue(final String value) { - if (value != null) { - try { - _boost = new BigDecimal(value); - } catch (final Exception e) {} - } - } - - @Override - public String getConfigId() { - return ConfigType.WEB.getConfigId(getId()); - } - - @Override - public void initializeClientFactory(final S2RobotClientFactory clientFactory) { - final WebAuthenticationService webAuthenticationService = SingletonS2Container.getComponent(WebAuthenticationService.class); - final RequestHeaderService requestHeaderService = SingletonS2Container.getComponent(RequestHeaderService.class); - - // HttpClient Parameters - final Map paramMap = new HashMap(); - clientFactory.setInitParameterMap(paramMap); - - final Map clientConfigMap = getConfigParameterMap(ConfigName.CLIENT); - if (clientConfigMap != null) { - paramMap.putAll(clientConfigMap); - } - - final String userAgent = getUserAgent(); - if (StringUtil.isNotBlank(userAgent)) { - paramMap.put(HcHttpClient.USER_AGENT_PROPERTY, userAgent); - } - - final List webAuthList = webAuthenticationService.getWebAuthenticationList(getId()); - final List basicAuthList = new ArrayList(); - for (final WebAuthentication webAuth : webAuthList) { - basicAuthList.add(webAuth.getAuthentication()); - } - paramMap.put(HcHttpClient.BASIC_AUTHENTICATIONS_PROPERTY, basicAuthList.toArray(new Authentication[basicAuthList.size()])); - - /* TODO CONFIG - // request header - final List requestHeaderList = requestHeaderService.getRequestHeaderList(getId()); - final List rhList = new ArrayList(); - for (final RequestHeader requestHeader : requestHeaderList) { - rhList.add(requestHeader.getS2RobotRequestHeader()); - } - paramMap.put(HcHttpClient.REQUERT_HEADERS_PROPERTY, rhList.toArray(new org.codelibs.robot.client.http.RequestHeader[rhList.size()])); - */ - } - - @Override - public Map getConfigParameterMap(final ConfigName name) { - if (configParameterMap == null) { - configParameterMap = ParameterUtil.createConfigParameterMap(getConfigParameter()); - } - - final Map configMap = configParameterMap.get(name); - if (configMap == null) { - return Collections.emptyMap(); - } - return configMap; - } - -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/customize/ClickUrlRanking.java b/src/main/java/org/codelibs/fess/db/exentity/customize/ClickUrlRanking.java deleted file mode 100644 index 84bcf8d69..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/customize/ClickUrlRanking.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity.customize; - -import org.codelibs.fess.db.bsentity.customize.BsClickUrlRanking; - -/** - * The entity of ClickUrlRanking. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class ClickUrlRanking extends BsClickUrlRanking { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/customize/ClientIpRanking.java b/src/main/java/org/codelibs/fess/db/exentity/customize/ClientIpRanking.java deleted file mode 100644 index 350e483d1..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/customize/ClientIpRanking.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity.customize; - -import org.codelibs.fess.db.bsentity.customize.BsClientIpRanking; - -/** - * The entity of ClientIpRanking. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class ClientIpRanking extends BsClientIpRanking { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/customize/FavoriteUrlCount.java b/src/main/java/org/codelibs/fess/db/exentity/customize/FavoriteUrlCount.java deleted file mode 100644 index 63b3d7768..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/customize/FavoriteUrlCount.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity.customize; - -import org.codelibs.fess.db.bsentity.customize.BsFavoriteUrlCount; - -/** - * The entity of FavoriteUrlCount. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class FavoriteUrlCount extends BsFavoriteUrlCount { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/customize/FavoriteUrlRanking.java b/src/main/java/org/codelibs/fess/db/exentity/customize/FavoriteUrlRanking.java deleted file mode 100644 index 36d772743..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/customize/FavoriteUrlRanking.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity.customize; - -import org.codelibs.fess.db.bsentity.customize.BsFavoriteUrlRanking; - -/** - * The entity of FavoriteUrlRanking. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class FavoriteUrlRanking extends BsFavoriteUrlRanking { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/customize/GroupedFieldName.java b/src/main/java/org/codelibs/fess/db/exentity/customize/GroupedFieldName.java deleted file mode 100644 index 351ac81ec..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/customize/GroupedFieldName.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity.customize; - -import org.codelibs.fess.db.bsentity.customize.BsGroupedFieldName; - -/** - * The entity of GroupedFieldName. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class GroupedFieldName extends BsGroupedFieldName { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/customize/HotSearchWord.java b/src/main/java/org/codelibs/fess/db/exentity/customize/HotSearchWord.java deleted file mode 100644 index a16eb9e81..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/customize/HotSearchWord.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity.customize; - -import org.codelibs.fess.db.bsentity.customize.BsHotSearchWord; - -/** - * The entity of HotSearchWord. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class HotSearchWord extends BsHotSearchWord { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/customize/RefererRanking.java b/src/main/java/org/codelibs/fess/db/exentity/customize/RefererRanking.java deleted file mode 100644 index aef7fe7eb..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/customize/RefererRanking.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity.customize; - -import org.codelibs.fess.db.bsentity.customize.BsRefererRanking; - -/** - * The entity of RefererRanking. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class RefererRanking extends BsRefererRanking { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/customize/SearchFieldRanking.java b/src/main/java/org/codelibs/fess/db/exentity/customize/SearchFieldRanking.java deleted file mode 100644 index 93a00ec75..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/customize/SearchFieldRanking.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity.customize; - -import org.codelibs.fess.db.bsentity.customize.BsSearchFieldRanking; - -/** - * The entity of SearchFieldRanking. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class SearchFieldRanking extends BsSearchFieldRanking { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/customize/SearchQueryRanking.java b/src/main/java/org/codelibs/fess/db/exentity/customize/SearchQueryRanking.java deleted file mode 100644 index bbc4bb7f2..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/customize/SearchQueryRanking.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity.customize; - -import org.codelibs.fess.db.bsentity.customize.BsSearchQueryRanking; - -/** - * The entity of SearchQueryRanking. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class SearchQueryRanking extends BsSearchQueryRanking { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/customize/SearchWordRanking.java b/src/main/java/org/codelibs/fess/db/exentity/customize/SearchWordRanking.java deleted file mode 100644 index fe41c7996..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/customize/SearchWordRanking.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity.customize; - -import org.codelibs.fess.db.bsentity.customize.BsSearchWordRanking; - -/** - * The entity of SearchWordRanking. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class SearchWordRanking extends BsSearchWordRanking { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/customize/SolrQueryRanking.java b/src/main/java/org/codelibs/fess/db/exentity/customize/SolrQueryRanking.java deleted file mode 100644 index 223ec0f9d..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/customize/SolrQueryRanking.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity.customize; - -import org.codelibs.fess.db.bsentity.customize.BsSolrQueryRanking; - -/** - * The entity of SolrQueryRanking. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class SolrQueryRanking extends BsSolrQueryRanking { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/db/exentity/customize/UserAgentRanking.java b/src/main/java/org/codelibs/fess/db/exentity/customize/UserAgentRanking.java deleted file mode 100644 index 04a07903a..000000000 --- a/src/main/java/org/codelibs/fess/db/exentity/customize/UserAgentRanking.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity.customize; - -import org.codelibs.fess.db.bsentity.customize.BsUserAgentRanking; - -/** - * The entity of UserAgentRanking. - *

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

- * @author DBFlute(AutoGenerator) - */ -public class UserAgentRanking extends BsUserAgentRanking { - - /** Serial version UID. (Default) */ - private static final long serialVersionUID = 1L; -} diff --git a/src/main/java/org/codelibs/fess/ds/DataStore.java b/src/main/java/org/codelibs/fess/ds/DataStore.java index 3a4bb4b7d..3b4a3e634 100644 --- a/src/main/java/org/codelibs/fess/ds/DataStore.java +++ b/src/main/java/org/codelibs/fess/ds/DataStore.java @@ -18,11 +18,11 @@ package org.codelibs.fess.ds; import java.util.Map; -import org.codelibs.fess.db.exentity.DataCrawlingConfig; +import org.codelibs.fess.es.exentity.DataConfig; public interface DataStore { - void store(DataCrawlingConfig config, IndexUpdateCallback callback, Map initParamMap); + void store(DataConfig config, IndexUpdateCallback callback, Map initParamMap); void stop(); diff --git a/src/main/java/org/codelibs/fess/ds/impl/AbstractDataStoreImpl.java b/src/main/java/org/codelibs/fess/ds/impl/AbstractDataStoreImpl.java index 9f9f9f02e..7612041ee 100644 --- a/src/main/java/org/codelibs/fess/ds/impl/AbstractDataStoreImpl.java +++ b/src/main/java/org/codelibs/fess/ds/impl/AbstractDataStoreImpl.java @@ -16,20 +16,19 @@ package org.codelibs.fess.ds.impl; -import java.time.LocalDateTime; import java.util.ArrayList; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.Constants; -import org.codelibs.fess.db.exentity.DataCrawlingConfig; import org.codelibs.fess.ds.DataStore; import org.codelibs.fess.ds.IndexUpdateCallback; +import org.codelibs.fess.es.exentity.DataConfig; import org.codelibs.fess.helper.CrawlingSessionHelper; import org.codelibs.fess.helper.FieldHelper; -import org.codelibs.fess.taglib.FessFunctions; import org.codelibs.fess.util.ComponentUtil; import org.seasar.framework.util.OgnlUtil; import org.slf4j.Logger; @@ -49,11 +48,11 @@ public abstract class AbstractDataStoreImpl implements DataStore { } @Override - public void store(final DataCrawlingConfig config, final IndexUpdateCallback callback, final Map initParamMap) { + public void store(final DataConfig config, final IndexUpdateCallback callback, final Map initParamMap) { final Map configParamMap = config.getHandlerParameterMap(); final Map configScriptMap = config.getHandlerScriptMap(); final CrawlingSessionHelper crawlingSessionHelper = ComponentUtil.getCrawlingSessionHelper(); - final LocalDateTime documentExpires = crawlingSessionHelper.getDocumentExpires(); + final Long documentExpires = crawlingSessionHelper.getDocumentExpires(); final FieldHelper fieldHelper = ComponentUtil.getFieldHelper(); initParamMap.putAll(configParamMap); @@ -69,7 +68,7 @@ public abstract class AbstractDataStoreImpl implements DataStore { } // expires if (documentExpires != null) { - defaultDataMap.put(fieldHelper.expiresField, FessFunctions.formatDate(documentExpires)); + defaultDataMap.put(fieldHelper.expiresField, new Date(documentExpires)); } // segment defaultDataMap.put(fieldHelper.segmentField, initParamMap.get(Constants.SESSION_ID)); @@ -144,6 +143,6 @@ public abstract class AbstractDataStoreImpl implements DataStore { } catch (final Exception e) {} } - protected abstract void storeData(DataCrawlingConfig dataConfig, IndexUpdateCallback callback, Map paramMap, + protected abstract void storeData(DataConfig dataConfig, IndexUpdateCallback callback, Map paramMap, Map scriptMap, Map defaultDataMap); } diff --git a/src/main/java/org/codelibs/fess/ds/impl/CsvDataStoreImpl.java b/src/main/java/org/codelibs/fess/ds/impl/CsvDataStoreImpl.java index 00a953ea3..9127f5440 100644 --- a/src/main/java/org/codelibs/fess/ds/impl/CsvDataStoreImpl.java +++ b/src/main/java/org/codelibs/fess/ds/impl/CsvDataStoreImpl.java @@ -31,10 +31,10 @@ import java.util.regex.Pattern; import org.apache.commons.io.IOUtils; import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.Constants; -import org.codelibs.fess.db.exentity.DataCrawlingConfig; import org.codelibs.fess.ds.DataStoreCrawlingException; import org.codelibs.fess.ds.DataStoreException; import org.codelibs.fess.ds.IndexUpdateCallback; +import org.codelibs.fess.es.exentity.DataConfig; import org.codelibs.fess.service.FailureUrlService; import org.codelibs.robot.RobotCrawlAccessException; import org.codelibs.robot.RobotMultipleCrawlAccessException; @@ -152,7 +152,7 @@ public class CsvDataStoreImpl extends AbstractDataStoreImpl { } @Override - protected void storeData(final DataCrawlingConfig dataConfig, final IndexUpdateCallback callback, final Map paramMap, + protected void storeData(final DataConfig dataConfig, final IndexUpdateCallback callback, final Map paramMap, final Map scriptMap, final Map defaultDataMap) { final long readInterval = getReadInterval(paramMap); @@ -173,7 +173,7 @@ public class CsvDataStoreImpl extends AbstractDataStoreImpl { } } - protected void processCsv(final DataCrawlingConfig dataConfig, final IndexUpdateCallback callback, final Map paramMap, + protected void processCsv(final DataConfig dataConfig, final IndexUpdateCallback callback, final Map paramMap, final Map scriptMap, final Map defaultDataMap, final CsvConfig csvConfig, final File csvFile, final long readInterval, final String csvFileEncoding, final boolean hasHeaderLine) { logger.info("Loading " + csvFile.getAbsolutePath()); diff --git a/src/main/java/org/codelibs/fess/ds/impl/DatabaseDataStoreImpl.java b/src/main/java/org/codelibs/fess/ds/impl/DatabaseDataStoreImpl.java index b0d5a187d..a84abc995 100644 --- a/src/main/java/org/codelibs/fess/ds/impl/DatabaseDataStoreImpl.java +++ b/src/main/java/org/codelibs/fess/ds/impl/DatabaseDataStoreImpl.java @@ -29,9 +29,9 @@ import java.util.Set; import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.FessSystemException; -import org.codelibs.fess.db.exentity.DataCrawlingConfig; import org.codelibs.fess.ds.DataStoreException; import org.codelibs.fess.ds.IndexUpdateCallback; +import org.codelibs.fess.es.exentity.DataConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -77,7 +77,7 @@ public class DatabaseDataStoreImpl extends AbstractDataStoreImpl { } @Override - protected void storeData(final DataCrawlingConfig config, final IndexUpdateCallback callback, final Map paramMap, + protected void storeData(final DataConfig config, final IndexUpdateCallback callback, final Map paramMap, final Map scriptMap, final Map defaultDataMap) { final long readInterval = getReadInterval(paramMap); diff --git a/src/main/java/org/codelibs/fess/ds/impl/FileListDataStoreImpl.java b/src/main/java/org/codelibs/fess/ds/impl/FileListDataStoreImpl.java index eb952eb2f..e3a7db091 100644 --- a/src/main/java/org/codelibs/fess/ds/impl/FileListDataStoreImpl.java +++ b/src/main/java/org/codelibs/fess/ds/impl/FileListDataStoreImpl.java @@ -24,10 +24,10 @@ import java.util.Map; import org.codelibs.fess.Constants; import org.codelibs.fess.client.FessEsClient; -import org.codelibs.fess.db.exentity.DataCrawlingConfig; import org.codelibs.fess.ds.DataStoreCrawlingException; import org.codelibs.fess.ds.DataStoreException; import org.codelibs.fess.ds.IndexUpdateCallback; +import org.codelibs.fess.es.exentity.DataConfig; import org.codelibs.fess.helper.CrawlingSessionHelper; import org.codelibs.fess.helper.FieldHelper; import org.codelibs.fess.helper.IndexingHelper; @@ -90,7 +90,7 @@ public class FileListDataStoreImpl extends CsvDataStoreImpl { } @Override - public void store(final DataCrawlingConfig config, final IndexUpdateCallback callback, final Map initParamMap) { + public void store(final DataConfig config, final IndexUpdateCallback callback, final Map initParamMap) { robotClientFactory = SingletonS2Container.getComponent(S2RobotClientFactory.class); @@ -100,7 +100,7 @@ public class FileListDataStoreImpl extends CsvDataStoreImpl { } @Override - protected void storeData(final DataCrawlingConfig dataConfig, final IndexUpdateCallback callback, final Map paramMap, + protected void storeData(final DataConfig dataConfig, final IndexUpdateCallback callback, final Map paramMap, final Map scriptMap, final Map defaultDataMap) { final FileListIndexUpdateCallback fileListIndexUpdateCallback = new FileListIndexUpdateCallback(callback); @@ -109,7 +109,7 @@ public class FileListDataStoreImpl extends CsvDataStoreImpl { } @Override - protected void processCsv(final DataCrawlingConfig dataConfig, final IndexUpdateCallback callback, final Map paramMap, + protected void processCsv(final DataConfig dataConfig, final IndexUpdateCallback callback, final Map paramMap, final Map scriptMap, final Map defaultDataMap, final CsvConfig csvConfig, final File csvFile, final long readInterval, final String csvFileEncoding, final boolean hasHeaderLine) { try { diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/AbstractBehavior.java b/src/main/java/org/codelibs/fess/es/bsbhv/AbstractBehavior.java index 6e1afd0f7..0fa3d1f2b 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/AbstractBehavior.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/AbstractBehavior.java @@ -1,7 +1,12 @@ package org.codelibs.fess.es.bsbhv; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; import java.util.List; +import java.util.ListIterator; import java.util.Map; +import java.util.function.Function; import javax.annotation.Resource; @@ -12,12 +17,17 @@ import org.codelibs.fess.es.cbean.bs.AbstractConditionBean; import org.codelibs.fess.es.cbean.result.EsPagingResultBean; import org.dbflute.Entity; import org.dbflute.bhv.AbstractBehaviorWritable; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.bhv.writable.DeleteOption; import org.dbflute.bhv.writable.InsertOption; import org.dbflute.bhv.writable.UpdateOption; import org.dbflute.cbean.ConditionBean; +import org.dbflute.cbean.coption.CursorSelectOption; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.exception.IllegalBehaviorStateException; +import org.elasticsearch.action.bulk.BulkItemResponse; +import org.elasticsearch.action.bulk.BulkRequestBuilder; +import org.elasticsearch.action.bulk.BulkResponse; import org.elasticsearch.action.count.CountRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.delete.DeleteResponse; @@ -25,41 +35,60 @@ import org.elasticsearch.action.index.IndexRequestBuilder; import org.elasticsearch.action.index.IndexResponse; import org.elasticsearch.action.search.SearchRequestBuilder; import org.elasticsearch.action.search.SearchResponse; +import org.elasticsearch.action.search.SearchType; +import org.elasticsearch.action.update.UpdateRequestBuilder; import org.elasticsearch.client.Client; +import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHits; +/** + * @author FreeGen + */ public abstract class AbstractBehavior extends AbstractBehaviorWritable { @Resource protected Client client; - protected abstract String asIndexEsName(); + protected int sizeForDelete = 100; + + protected String scrollForDelete = "1m"; + + protected int sizeForCursor = 100; + + protected String scrollForCursor = "1m"; + + protected abstract String asEsIndex(); + + protected abstract String asEsIndexType(); + + protected abstract String asEsSearchType(); protected abstract RESULT createEntity(Map source, Class entityType); @Override - protected int delegateSelectCountUniquely(ConditionBean cb) { + protected int delegateSelectCountUniquely(final ConditionBean cb) { // TODO check response and cast problem - CountRequestBuilder builder = client.prepareCount(asIndexEsName()).setTypes(asTableDbName()); + final CountRequestBuilder builder = client.prepareCount(asEsIndex()).setTypes(asEsSearchType()); return (int) ((AbstractConditionBean) cb).build(builder).execute().actionGet().getCount(); } - protected List delegateSelectList(ConditionBean cb, Class entityType) { + @Override + protected List delegateSelectList(final ConditionBean cb, final Class entityType) { // TODO check response - SearchRequestBuilder builder = client.prepareSearch(asIndexEsName()).setTypes(asTableDbName()); + final SearchRequestBuilder builder = client.prepareSearch(asEsIndex()).setTypes(asEsSearchType()); if (cb.isFetchScopeEffective()) { builder.setFrom(cb.getFetchStartIndex()); builder.setSize(cb.getFetchSize()); } ((AbstractConditionBean) cb).request().build(builder); - SearchResponse response = ((AbstractConditionBean) cb).build(builder).execute().actionGet(); + final SearchResponse response = ((AbstractConditionBean) cb).build(builder).execute().actionGet(); - EsPagingResultBean list = new EsPagingResultBean<>(); - SearchHits searchHits = response.getHits(); + final EsPagingResultBean list = new EsPagingResultBean<>(); + final SearchHits searchHits = response.getHits(); searchHits.forEach(hit -> { - Map source = hit.getSource(); - RESULT entity = createEntity(source, entityType); - DocMeta docMeta = ((AbstractEntity) entity).asDocMeta(); + final Map source = hit.getSource(); + final RESULT entity = createEntity(source, entityType); + final DocMeta docMeta = ((AbstractEntity) entity).asDocMeta(); docMeta.id(hit.getId()); docMeta.version(hit.getVersion()); list.add(entity); @@ -78,14 +107,86 @@ public abstract class AbstractBehavior void helpSelectCursorHandlingByPaging(CB cb, EntityRowHandler handler, + Class entityType, CursorSelectOption option) { + delegateSelectCursor(cb, handler, entityType); + } + + @Override + protected void delegateSelectCursor(final ConditionBean cb, final EntityRowHandler handler, + final Class entityType) { + delegateBulkRequest(cb, searchHits -> { + searchHits.forEach(hit -> { + if (handler.isBreakCursor()) { + return; + } + final Map source = hit.getSource(); + final RESULT entity = createEntity(source, entityType); + final DocMeta docMeta = ((AbstractEntity) entity).asDocMeta(); + docMeta.id(hit.getId()); + docMeta.version(hit.getVersion()); + handler.handle(entity); + }); + + return !handler.isBreakCursor(); + }); + } + + protected void delegateSelectBulk(final ConditionBean cb, final EntityRowHandler> handler, + final Class entityType) { + assertCBStateValid(cb); + assertObjectNotNull("entityRowHandler", handler); + assertSpecifyDerivedReferrerEntityProperty(cb, entityType); + assertObjectNotNull("entityRowHandler", handler); + delegateBulkRequest(cb, searchHits -> { + List list = new ArrayList<>(); + searchHits.forEach(hit -> { + final Map source = hit.getSource(); + final RESULT entity = createEntity(source, entityType); + final DocMeta docMeta = ((AbstractEntity) entity).asDocMeta(); + docMeta.id(hit.getId()); + docMeta.version(hit.getVersion()); + list.add(entity); + }); + + handler.handle(list); + return !handler.isBreakCursor(); + }); + } + + protected void delegateBulkRequest(final ConditionBean cb, Function handler) { + final SearchRequestBuilder builder = + client.prepareSearch(asEsIndex()).setTypes(asEsIndexType()).setSearchType(SearchType.SCAN).setScroll(scrollForCursor) + .setSize(sizeForCursor); + ((AbstractConditionBean) cb).request().build(builder); + final SearchResponse response = ((AbstractConditionBean) cb).build(builder).execute().actionGet(); + + String scrollId = response.getScrollId(); + while (scrollId != null) { + final SearchResponse scrollResponse = client.prepareSearchScroll(scrollId).setScroll(scrollForDelete).execute().actionGet(); + scrollId = scrollResponse.getScrollId(); + final SearchHits searchHits = scrollResponse.getHits(); + final SearchHit[] hits = searchHits.getHits(); + if (hits.length == 0) { + scrollId = null; + break; + } + + if (!handler.apply(searchHits)) { + break; + } + } + } + @Override protected Number doReadNextVal() { - String msg = "This table is NOT related to sequence: " + asTableDbName(); + final String msg = "This table is NOT related to sequence: " + asEsIndexType(); throw new UnsupportedOperationException(msg); } @Override - protected ListResultBean createListResultBean(ConditionBean cb, List selectedList) { + protected ListResultBean createListResultBean(final ConditionBean cb, final List selectedList) { if (selectedList instanceof EsPagingResultBean) { return (ListResultBean) selectedList; } @@ -93,48 +194,161 @@ public abstract class AbstractBehavior option) { - AbstractEntity esEntity = (AbstractEntity) entity; - IndexRequestBuilder builder = client.prepareIndex(asIndexEsName(), asTableDbName()).setSource(esEntity.toSource()); - RequestOptionCall indexOption = esEntity.asDocMeta().indexOption(); - if (indexOption != null) { - indexOption.callback(builder); - } - IndexResponse response = builder.execute().actionGet(); + protected int delegateInsert(final Entity entity, final InsertOption option) { + final AbstractEntity esEntity = (AbstractEntity) entity; + IndexRequestBuilder builder = createInsertRequest(esEntity); + + final IndexResponse response = builder.execute().actionGet(); esEntity.asDocMeta().id(response.getId()); return response.isCreated() ? 1 : 0; } - @Override - protected int delegateUpdate(Entity entity, UpdateOption option) { - AbstractEntity esEntity = (AbstractEntity) entity; - IndexRequestBuilder builder = - client.prepareIndex(asIndexEsName(), asTableDbName(), esEntity.asDocMeta().id()).setSource(esEntity.toSource()); - RequestOptionCall indexOption = esEntity.asDocMeta().indexOption(); + protected IndexRequestBuilder createInsertRequest(final AbstractEntity esEntity) { + final IndexRequestBuilder builder = client.prepareIndex(asEsIndex(), asEsIndexType()).setSource(esEntity.toSource()); + final RequestOptionCall indexOption = esEntity.asDocMeta().indexOption(); if (indexOption != null) { indexOption.callback(builder); } - Long version = esEntity.asDocMeta().version(); - if (version != null && version.longValue() != -1) { - builder.setVersion(version); - } - IndexResponse response = builder.execute().actionGet(); - return 1; + return builder; } @Override - protected int delegateDelete(Entity entity, DeleteOption option) { - AbstractEntity esEntity = (AbstractEntity) entity; - DeleteRequestBuilder builder = client.prepareDelete(asIndexEsName(), asTableDbName(), esEntity.asDocMeta().id()); - RequestOptionCall deleteOption = esEntity.asDocMeta().deleteOption(); - if (deleteOption != null) { - deleteOption.callback(builder); + protected int delegateUpdate(final Entity entity, final UpdateOption option) { + final AbstractEntity esEntity = (AbstractEntity) entity; + final IndexRequestBuilder builder = createUpdateRequest(esEntity); + + final IndexResponse response = builder.execute().actionGet(); + long version = response.getVersion(); + if (version != -1) { + esEntity.asDocMeta().version(version); } - DeleteResponse response = builder.execute().actionGet(); + return 1; + } + + protected IndexRequestBuilder createUpdateRequest(final AbstractEntity esEntity) { + final IndexRequestBuilder builder = + client.prepareIndex(asEsIndex(), asEsIndexType(), esEntity.asDocMeta().id()).setSource(esEntity.toSource()); + final RequestOptionCall indexOption = esEntity.asDocMeta().indexOption(); + if (indexOption != null) { + indexOption.callback(builder); + } + final Long version = esEntity.asDocMeta().version(); + if (version != null && version.longValue() != -1) { + builder.setVersion(version); + } + return builder; + } + + @Override + protected int delegateDelete(final Entity entity, final DeleteOption option) { + final AbstractEntity esEntity = (AbstractEntity) entity; + final DeleteRequestBuilder builder = createDeleteRequest(esEntity); + + final DeleteResponse response = builder.execute().actionGet(); return response.isFound() ? 1 : 0; } - protected static String toString(Object value) { + protected DeleteRequestBuilder createDeleteRequest(final AbstractEntity esEntity) { + final DeleteRequestBuilder builder = client.prepareDelete(asEsIndex(), asEsIndexType(), esEntity.asDocMeta().id()); + final RequestOptionCall deleteOption = esEntity.asDocMeta().deleteOption(); + if (deleteOption != null) { + deleteOption.callback(builder); + } + return builder; + } + + @Override + protected int delegateQueryDelete(final ConditionBean cb, final DeleteOption option) { + final SearchRequestBuilder builder = + client.prepareSearch(asEsIndex()).setTypes(asEsIndexType()).setSearchType(SearchType.SCAN).setScroll(scrollForDelete) + .setSize(sizeForDelete); + ((AbstractConditionBean) cb).request().build(builder); + final SearchResponse response = ((AbstractConditionBean) cb).build(builder).execute().actionGet(); + + int count = 0; + String scrollId = response.getScrollId(); + while (scrollId != null) { + final SearchResponse scrollResponse = client.prepareSearchScroll(scrollId).setScroll(scrollForDelete).execute().actionGet(); + scrollId = scrollResponse.getScrollId(); + final SearchHits searchHits = scrollResponse.getHits(); + final SearchHit[] hits = searchHits.getHits(); + if (hits.length == 0) { + scrollId = null; + break; + } + + final BulkRequestBuilder bulkRequest = client.prepareBulk(); + for (final SearchHit hit : hits) { + bulkRequest.add(client.prepareDelete(asEsIndex(), asEsIndexType(), hit.getId())); + } + count += hits.length; + final BulkResponse bulkResponse = bulkRequest.execute().actionGet(); + if (bulkResponse.hasFailures()) { + throw new IllegalBehaviorStateException(bulkResponse.buildFailureMessage()); + } + } + return count; + } + + protected int[] delegateBatchInsert(final List entityList, final InsertOption option) { + if (entityList.isEmpty()) { + return new int[] {}; + } + return delegateBatchRequest(entityList, esEntity -> { + return createInsertRequest(esEntity); + }); + } + + protected int[] delegateBatchUpdate(List entityList, UpdateOption option) { + if (entityList.isEmpty()) { + return new int[] {}; + } + return delegateBatchRequest(entityList, esEntity -> { + return createUpdateRequest(esEntity); + }); + } + + protected int[] delegateBatchDelete(List entityList, DeleteOption option) { + if (entityList.isEmpty()) { + return new int[] {}; + } + return delegateBatchRequest(entityList, esEntity -> { + return createDeleteRequest(esEntity); + }); + } + + protected int[] delegateBatchRequest(final List entityList, Function call) { + final BulkList bulkList = (BulkList) entityList; + final BulkRequestBuilder bulkBuilder = client.prepareBulk(); + for (final Entity entity : entityList) { + final AbstractEntity esEntity = (AbstractEntity) entity; + BUILDER builder = call.apply(esEntity); + if (builder instanceof IndexRequestBuilder) { + bulkBuilder.add((IndexRequestBuilder) builder); + } else if (builder instanceof UpdateRequestBuilder) { + bulkBuilder.add((UpdateRequestBuilder) builder); + } else if (builder instanceof DeleteRequestBuilder) { + bulkBuilder.add((DeleteRequestBuilder) builder); + } + } + RequestOptionCall builderCall = bulkList.getCall(); + if (builderCall != null) { + builderCall.callback(bulkBuilder); + } + BulkResponse response = bulkBuilder.execute().actionGet(); + + List resultList = new ArrayList<>(); + for (BulkItemResponse itemResponse : response.getItems()) { + resultList.add(itemResponse.isFailed() ? 0 : 1); + } + int[] results = new int[resultList.size()]; + for (int i = 0; i < resultList.size(); i++) { + results[i] = resultList.get(i); + } + return results; + } + + protected static String toString(final Object value) { if (value != null) { return value.toString(); } else { @@ -142,7 +356,7 @@ public abstract class AbstractBehavior implements List { + + private final List parent; + + private final RequestOptionCall call; + + public BulkList(final List parent, final RequestOptionCall call) { + this.parent = parent; + this.call = call; + } + + public int size() { + return parent.size(); + } + + public boolean isEmpty() { + return parent.isEmpty(); + } + + public boolean contains(final Object o) { + return parent.contains(o); + } + + public Iterator iterator() { + return parent.iterator(); + } + + public Object[] toArray() { + return parent.toArray(); + } + + public T[] toArray(final T[] a) { + return parent.toArray(a); + } + + public boolean add(final E e) { + return parent.add(e); + } + + public boolean remove(final Object o) { + return parent.remove(o); + } + + public boolean containsAll(final Collection c) { + return parent.containsAll(c); + } + + public boolean addAll(final Collection c) { + return parent.addAll(c); + } + + public boolean addAll(final int index, final Collection c) { + return parent.addAll(index, c); + } + + public boolean removeAll(final Collection c) { + return parent.removeAll(c); + } + + public boolean retainAll(final Collection c) { + return parent.retainAll(c); + } + + public void clear() { + parent.clear(); + } + + public boolean equals(final Object o) { + return parent.equals(o); + } + + public int hashCode() { + return parent.hashCode(); + } + + public E get(final int index) { + return parent.get(index); + } + + public E set(final int index, final E element) { + return parent.set(index, element); + } + + public void add(final int index, final E element) { + parent.add(index, element); + } + + public E remove(final int index) { + return parent.remove(index); + } + + public int indexOf(final Object o) { + return parent.indexOf(o); + } + + public int lastIndexOf(final Object o) { + return parent.lastIndexOf(o); + } + + public ListIterator listIterator() { + return parent.listIterator(); + } + + public ListIterator listIterator(final int index) { + return parent.listIterator(index); + } + + public List subList(final int fromIndex, final int toIndex) { + return parent.subList(fromIndex, toIndex); + } + + public RequestOptionCall getCall() { + return call; + } + } } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsBoostDocumentRuleBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsBoostDocumentRuleBhv.java index 823a17fe8..2ffc11644 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsBoostDocumentRuleBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsBoostDocumentRuleBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.BoostDocumentRuleCB; import org.codelibs.fess.es.exentity.BoostDocumentRule; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsBoostDocumentRuleBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(BoostDocumentRule entity) { doInsert(entity, null); } @@ -176,5 +197,33 @@ public abstract class BsBoostDocumentRuleBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsClickLogBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsClickLogBhv.java index ff2302877..d14a109a1 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsClickLogBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsClickLogBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.ClickLogCB; import org.codelibs.fess.es.exentity.ClickLog; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsClickLogBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(ClickLog entity) { doInsert(entity, null); } @@ -171,5 +192,33 @@ public abstract class BsClickLogBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsCrawlingSessionBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsCrawlingSessionBhv.java index 19d7f0b99..d2c331f61 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsCrawlingSessionBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsCrawlingSessionBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.CrawlingSessionCB; import org.codelibs.fess.es.exentity.CrawlingSession; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(CrawlingSession entity) { doInsert(entity, null); } @@ -173,5 +194,33 @@ public abstract class BsCrawlingSessionBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsCrawlingSessionInfoBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsCrawlingSessionInfoBhv.java index 5297b33ec..80844cb93 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsCrawlingSessionInfoBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsCrawlingSessionInfoBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.CrawlingSessionInfoCB; import org.codelibs.fess.es.exentity.CrawlingSessionInfo; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(CrawlingSessionInfo entity) { doInsert(entity, null); } @@ -173,5 +194,33 @@ public abstract class BsCrawlingSessionInfoBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsDataConfigBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsDataConfigBhv.java index be1931df7..da0b8f998 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsDataConfigBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsDataConfigBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.DataConfigCB; import org.codelibs.fess.es.exentity.DataConfig; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsDataConfigBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(DataConfig entity) { doInsert(entity, null); } @@ -179,5 +200,33 @@ public abstract class BsDataConfigBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsDataConfigToLabelBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsDataConfigToLabelBhv.java index 5e7085d39..534f804ad 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsDataConfigToLabelBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsDataConfigToLabelBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.DataConfigToLabelCB; import org.codelibs.fess.es.exentity.DataConfigToLabel; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsDataConfigToLabelBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(DataConfigToLabel entity) { doInsert(entity, null); } @@ -171,5 +192,33 @@ public abstract class BsDataConfigToLabelBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsDataConfigToRoleBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsDataConfigToRoleBhv.java index a2dfff6c8..f59351cb6 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsDataConfigToRoleBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsDataConfigToRoleBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.DataConfigToRoleCB; import org.codelibs.fess.es.exentity.DataConfigToRole; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsDataConfigToRoleBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(DataConfigToRole entity) { doInsert(entity, null); } @@ -171,5 +192,33 @@ public abstract class BsDataConfigToRoleBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsFailureUrlBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsFailureUrlBhv.java index b90967ea7..ee1ebd1e8 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsFailureUrlBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsFailureUrlBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.FailureUrlCB; import org.codelibs.fess.es.exentity.FailureUrl; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsFailureUrlBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(FailureUrl entity) { doInsert(entity, null); } @@ -175,5 +196,33 @@ public abstract class BsFailureUrlBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsFavoriteLogBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsFavoriteLogBhv.java index beae4b0be..eedbd9587 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsFavoriteLogBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsFavoriteLogBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.FavoriteLogCB; import org.codelibs.fess.es.exentity.FavoriteLog; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsFavoriteLogBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(FavoriteLog entity) { doInsert(entity, null); } @@ -171,5 +192,33 @@ public abstract class BsFavoriteLogBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsFileAuthenticationBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsFileAuthenticationBhv.java index 8fd2f8b1b..44ddb760d 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsFileAuthenticationBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsFileAuthenticationBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.FileAuthenticationCB; import org.codelibs.fess.es.exentity.FileAuthentication; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(FileAuthentication entity) { doInsert(entity, null); } @@ -180,5 +201,33 @@ public abstract class BsFileAuthenticationBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsFileConfigBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsFileConfigBhv.java index 056b47e58..99d022195 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsFileConfigBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsFileConfigBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.FileConfigCB; import org.codelibs.fess.es.exentity.FileConfig; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsFileConfigBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(FileConfig entity) { doInsert(entity, null); } @@ -186,5 +207,33 @@ public abstract class BsFileConfigBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsFileConfigToLabelBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsFileConfigToLabelBhv.java index 063808bec..55c914f7f 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsFileConfigToLabelBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsFileConfigToLabelBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.FileConfigToLabelCB; import org.codelibs.fess.es.exentity.FileConfigToLabel; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsFileConfigToLabelBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(FileConfigToLabel entity) { doInsert(entity, null); } @@ -171,5 +192,33 @@ public abstract class BsFileConfigToLabelBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsFileConfigToRoleBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsFileConfigToRoleBhv.java index a64d1cb63..bb2fb3738 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsFileConfigToRoleBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsFileConfigToRoleBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.FileConfigToRoleCB; import org.codelibs.fess.es.exentity.FileConfigToRole; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsFileConfigToRoleBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(FileConfigToRole entity) { doInsert(entity, null); } @@ -171,5 +192,33 @@ public abstract class BsFileConfigToRoleBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsJobLogBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsJobLogBhv.java index 1eb5c8b9d..86c51965c 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsJobLogBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsJobLogBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.JobLogCB; import org.codelibs.fess.es.exentity.JobLog; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsJobLogBhv extends AbstractBehavior { @Override public String asTableDbName() { + return asEsIndexType(); + } + + @Override + protected String asEsIndex() { + return ".fess_config"; + } + + @Override + public String asEsIndexType() { return "job_log"; } @Override - protected String asIndexEsName() { - return ".fess_config"; + public String asEsSearchType() { + return "job_log"; } @Override @@ -132,6 +145,14 @@ public abstract class BsJobLogBhv extends AbstractBehavior { return (PagingResultBean) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(JobLog entity) { doInsert(entity, null); } @@ -176,5 +197,33 @@ public abstract class BsJobLogBhv extends AbstractBehavior { doDelete(entity, null); } + public int queryDelete(CBCall cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsKeyMatchBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsKeyMatchBhv.java index 86be4bd4c..57b8e52b8 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsKeyMatchBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsKeyMatchBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.KeyMatchCB; import org.codelibs.fess.es.exentity.KeyMatch; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsKeyMatchBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(KeyMatch entity) { doInsert(entity, null); } @@ -176,5 +197,33 @@ public abstract class BsKeyMatchBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsLabelToRoleBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsLabelToRoleBhv.java index b7a682513..53f883c3a 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsLabelToRoleBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsLabelToRoleBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.LabelToRoleCB; import org.codelibs.fess.es.exentity.LabelToRole; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsLabelToRoleBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(LabelToRole entity) { doInsert(entity, null); } @@ -170,5 +191,33 @@ public abstract class BsLabelToRoleBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsLabelTypeBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsLabelTypeBhv.java index 20bb7fcff..c5023c42d 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsLabelTypeBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsLabelTypeBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.LabelTypeCB; import org.codelibs.fess.es.exentity.LabelType; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsLabelTypeBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(LabelType entity) { doInsert(entity, null); } @@ -177,5 +198,33 @@ public abstract class BsLabelTypeBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsOverlappingHostBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsOverlappingHostBhv.java index 7c33a2fb3..b02e38ec0 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsOverlappingHostBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsOverlappingHostBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.OverlappingHostCB; import org.codelibs.fess.es.exentity.OverlappingHost; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsOverlappingHostBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(OverlappingHost entity) { doInsert(entity, null); } @@ -176,5 +197,33 @@ public abstract class BsOverlappingHostBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsPathMappingBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsPathMappingBhv.java index 8d40d870d..f2d0a266c 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsPathMappingBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsPathMappingBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.PathMappingCB; import org.codelibs.fess.es.exentity.PathMapping; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsPathMappingBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(PathMapping entity) { doInsert(entity, null); } @@ -176,5 +197,33 @@ public abstract class BsPathMappingBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsRequestHeaderBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsRequestHeaderBhv.java index 5b9056ceb..44fc297bb 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsRequestHeaderBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsRequestHeaderBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.RequestHeaderCB; import org.codelibs.fess.es.exentity.RequestHeader; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsRequestHeaderBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(RequestHeader entity) { doInsert(entity, null); } @@ -175,5 +196,33 @@ public abstract class BsRequestHeaderBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsRoleTypeBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsRoleTypeBhv.java index 84b81e30b..4f2c5982c 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsRoleTypeBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsRoleTypeBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.RoleTypeCB; import org.codelibs.fess.es.exentity.RoleType; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsRoleTypeBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(RoleType entity) { doInsert(entity, null); } @@ -175,5 +196,33 @@ public abstract class BsRoleTypeBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsScheduledJobBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsScheduledJobBhv.java index c84789d4f..2aaa2860b 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsScheduledJobBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsScheduledJobBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.ScheduledJobCB; import org.codelibs.fess.es.exentity.ScheduledJob; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsScheduledJobBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(ScheduledJob entity) { doInsert(entity, null); } @@ -181,5 +202,33 @@ public abstract class BsScheduledJobBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsSearchFieldLogBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsSearchFieldLogBhv.java index 5bd57834d..6959b581f 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsSearchFieldLogBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsSearchFieldLogBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.SearchFieldLogCB; import org.codelibs.fess.es.exentity.SearchFieldLog; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(SearchFieldLog entity) { doInsert(entity, null); } @@ -171,5 +192,33 @@ public abstract class BsSearchFieldLogBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsSearchLogBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsSearchLogBhv.java index eda966c60..9d52a3072 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsSearchLogBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsSearchLogBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.SearchLogCB; import org.codelibs.fess.es.exentity.SearchLog; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsSearchLogBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(SearchLog entity) { doInsert(entity, null); } @@ -180,5 +201,33 @@ public abstract class BsSearchLogBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsSuggestBadWordBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsSuggestBadWordBhv.java index f3e1038be..df11c9bfa 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsSuggestBadWordBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsSuggestBadWordBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.SuggestBadWordCB; import org.codelibs.fess.es.exentity.SuggestBadWord; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsSuggestBadWordBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(SuggestBadWord entity) { doInsert(entity, null); } @@ -175,5 +196,33 @@ public abstract class BsSuggestBadWordBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsSuggestElevateWordBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsSuggestElevateWordBhv.java index a04bace80..025f51bb7 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsSuggestElevateWordBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsSuggestElevateWordBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.SuggestElevateWordCB; import org.codelibs.fess.es.exentity.SuggestElevateWord; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsSuggestElevateWordBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(SuggestElevateWord entity) { doInsert(entity, null); } @@ -178,5 +199,33 @@ public abstract class BsSuggestElevateWordBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsUserInfoBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsUserInfoBhv.java index 9f6685ab9..08c50ccf1 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsUserInfoBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsUserInfoBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.UserInfoCB; import org.codelibs.fess.es.exentity.UserInfo; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsUserInfoBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(UserInfo entity) { doInsert(entity, null); } @@ -171,5 +192,33 @@ public abstract class BsUserInfoBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsWebAuthenticationBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsWebAuthenticationBhv.java index dd02f3990..90677a58c 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsWebAuthenticationBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsWebAuthenticationBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.WebAuthenticationCB; import org.codelibs.fess.es.exentity.WebAuthentication; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(WebAuthentication entity) { doInsert(entity, null); } @@ -181,5 +202,33 @@ public abstract class BsWebAuthenticationBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsWebConfigBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsWebConfigBhv.java index 5ce0d8614..64775e238 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsWebConfigBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsWebConfigBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.WebConfigCB; import org.codelibs.fess.es.exentity.WebConfig; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsWebConfigBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(WebConfig entity) { doInsert(entity, null); } @@ -187,5 +208,33 @@ public abstract class BsWebConfigBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsWebConfigToLabelBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsWebConfigToLabelBhv.java index 38b3dcd22..e4e92d258 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsWebConfigToLabelBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsWebConfigToLabelBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.WebConfigToLabelCB; import org.codelibs.fess.es.exentity.WebConfigToLabel; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsWebConfigToLabelBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(WebConfigToLabel entity) { doInsert(entity, null); } @@ -171,5 +192,33 @@ public abstract class BsWebConfigToLabelBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsbhv/BsWebConfigToRoleBhv.java b/src/main/java/org/codelibs/fess/es/bsbhv/BsWebConfigToRoleBhv.java index db5e5aba1..7476f230d 100644 --- a/src/main/java/org/codelibs/fess/es/bsbhv/BsWebConfigToRoleBhv.java +++ b/src/main/java/org/codelibs/fess/es/bsbhv/BsWebConfigToRoleBhv.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsbhv; +import java.util.List; import java.util.Map; import org.codelibs.fess.es.bsentity.AbstractEntity; @@ -9,11 +10,13 @@ import org.codelibs.fess.es.cbean.WebConfigToRoleCB; import org.codelibs.fess.es.exentity.WebConfigToRole; import org.dbflute.Entity; import org.dbflute.bhv.readable.CBCall; +import org.dbflute.bhv.readable.EntityRowHandler; import org.dbflute.cbean.ConditionBean; import org.dbflute.cbean.result.ListResultBean; import org.dbflute.cbean.result.PagingResultBean; import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.optional.OptionalEntity; +import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -24,12 +27,22 @@ public abstract class BsWebConfigToRoleBhv extends AbstractBehavior) facadeSelectList(createCB(cbLambda)); } + public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { + facadeSelectCursor(createCB(cbLambda), entityLambda); + } + + public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { + delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); + } + public void insert(WebConfigToRole entity) { doInsert(entity, null); } @@ -171,5 +192,33 @@ public abstract class BsWebConfigToRoleBhv extends AbstractBehavior cbLambda) { + return doQueryDelete(createCB(cbLambda), null); + } + + public int[] batchInsert(List list) { + return batchInsert(list, null); + } + + public int[] batchInsert(List list, RequestOptionCall call) { + return doBatchInsert(new BulkList<>(list, call), null); + } + + public int[] batchUpdate(List list) { + return batchUpdate(list, null); + } + + public int[] batchUpdate(List list, RequestOptionCall call) { + return doBatchUpdate(new BulkList<>(list, call), null); + } + + public int[] batchDelete(List list) { + return batchDelete(list, null); + } + + public int[] batchDelete(List list, RequestOptionCall call) { + return doBatchDelete(new BulkList<>(list, call), null); + } + // TODO create, modify, remove } diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsBoostDocumentRule.java b/src/main/java/org/codelibs/fess/es/bsentity/BsBoostDocumentRule.java index bce8e373a..04cc5ae8c 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsBoostDocumentRule.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsBoostDocumentRule.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -35,9 +36,6 @@ public class BsBoostDocumentRule extends AbstractEntity { /** createdTime */ protected Long createdTime; - /** id */ - protected String id; - /** sortOrder */ protected Integer sortOrder; @@ -56,67 +54,83 @@ public class BsBoostDocumentRule extends AbstractEntity { // Accessor // ======== public String getBoostExpr() { + checkSpecifiedProperty("boostExpr"); return boostExpr; } public void setBoostExpr(String value) { - boostExpr = value; + registerModifiedProperty("boostExpr"); + this.boostExpr = value; } public String getCreatedBy() { + checkSpecifiedProperty("createdBy"); return createdBy; } public void setCreatedBy(String value) { - createdBy = value; + registerModifiedProperty("createdBy"); + this.createdBy = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public Integer getSortOrder() { + checkSpecifiedProperty("sortOrder"); return sortOrder; } public void setSortOrder(Integer value) { - sortOrder = value; + registerModifiedProperty("sortOrder"); + this.sortOrder = value; } public String getUpdatedBy() { + checkSpecifiedProperty("updatedBy"); return updatedBy; } public void setUpdatedBy(String value) { - updatedBy = value; + registerModifiedProperty("updatedBy"); + this.updatedBy = value; } public Long getUpdatedTime() { + checkSpecifiedProperty("updatedTime"); return updatedTime; } public void setUpdatedTime(Long value) { - updatedTime = value; + registerModifiedProperty("updatedTime"); + this.updatedTime = value; } public String getUrlExpr() { + checkSpecifiedProperty("urlExpr"); return urlExpr; } public void setUrlExpr(String value) { - urlExpr = value; + registerModifiedProperty("urlExpr"); + this.urlExpr = value; } @Override @@ -131,8 +145,8 @@ public class BsBoostDocumentRule extends AbstractEntity { if (createdTime != null) { sourceMap.put("createdTime", createdTime); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (sortOrder != null) { sourceMap.put("sortOrder", sortOrder); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsClickLog.java b/src/main/java/org/codelibs/fess/es/bsentity/BsClickLog.java index 80e9ebed1..47fbc1663 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsClickLog.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsClickLog.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -26,9 +27,6 @@ public class BsClickLog extends AbstractEntity { // =================================================================================== // Attribute // ========= - /** id */ - protected String id; - /** requestedTime */ protected Long requestedTime; @@ -44,42 +42,50 @@ public class BsClickLog extends AbstractEntity { // Accessor // ======== public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public Long getRequestedTime() { + checkSpecifiedProperty("requestedTime"); return requestedTime; } public void setRequestedTime(Long value) { - requestedTime = value; + registerModifiedProperty("requestedTime"); + this.requestedTime = value; } public String getSearchLogId() { + checkSpecifiedProperty("searchLogId"); return searchLogId; } public void setSearchLogId(String value) { - searchLogId = value; + registerModifiedProperty("searchLogId"); + this.searchLogId = value; } public String getUrl() { + checkSpecifiedProperty("url"); return url; } public void setUrl(String value) { - url = value; + registerModifiedProperty("url"); + this.url = value; } @Override public Map toSource() { Map sourceMap = new HashMap<>(); - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (requestedTime != null) { sourceMap.put("requestedTime", requestedTime); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsCrawlingSession.java b/src/main/java/org/codelibs/fess/es/bsentity/BsCrawlingSession.java index 57a1d74d7..5cf3ad383 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsCrawlingSession.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsCrawlingSession.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -32,9 +33,6 @@ public class BsCrawlingSession extends AbstractEntity { /** expiredTime */ protected Long expiredTime; - /** id */ - protected String id; - /** name */ protected String name; @@ -47,43 +45,53 @@ public class BsCrawlingSession extends AbstractEntity { // Accessor // ======== public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public Long getExpiredTime() { + checkSpecifiedProperty("expiredTime"); return expiredTime; } public void setExpiredTime(Long value) { - expiredTime = value; + registerModifiedProperty("expiredTime"); + this.expiredTime = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getName() { + checkSpecifiedProperty("name"); return name; } public void setName(String value) { - name = value; + registerModifiedProperty("name"); + this.name = value; } public String getSessionId() { + checkSpecifiedProperty("sessionId"); return sessionId; } public void setSessionId(String value) { - sessionId = value; + registerModifiedProperty("sessionId"); + this.sessionId = value; } @Override @@ -95,8 +103,8 @@ public class BsCrawlingSession extends AbstractEntity { if (expiredTime != null) { sourceMap.put("expiredTime", expiredTime); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (name != null) { sourceMap.put("name", name); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsCrawlingSessionInfo.java b/src/main/java/org/codelibs/fess/es/bsentity/BsCrawlingSessionInfo.java index 3a4f6fed9..276abda61 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsCrawlingSessionInfo.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsCrawlingSessionInfo.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -32,9 +33,6 @@ public class BsCrawlingSessionInfo extends AbstractEntity { /** createdTime */ protected Long createdTime; - /** id */ - protected String id; - /** key */ protected String key; @@ -47,43 +45,53 @@ public class BsCrawlingSessionInfo extends AbstractEntity { // Accessor // ======== public String getCrawlingSessionId() { + checkSpecifiedProperty("crawlingSessionId"); return crawlingSessionId; } public void setCrawlingSessionId(String value) { - crawlingSessionId = value; + registerModifiedProperty("crawlingSessionId"); + this.crawlingSessionId = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getKey() { + checkSpecifiedProperty("key"); return key; } public void setKey(String value) { - key = value; + registerModifiedProperty("key"); + this.key = value; } public String getValue() { + checkSpecifiedProperty("value"); return value; } public void setValue(String value) { - value = value; + registerModifiedProperty("value"); + this.value = value; } @Override @@ -95,8 +103,8 @@ public class BsCrawlingSessionInfo extends AbstractEntity { if (createdTime != null) { sourceMap.put("createdTime", createdTime); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (key != null) { sourceMap.put("key", key); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsDataConfig.java b/src/main/java/org/codelibs/fess/es/bsentity/BsDataConfig.java index 5e7c3db4f..ccb9673e2 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsDataConfig.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsDataConfig.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -47,9 +48,6 @@ public class BsDataConfig extends AbstractEntity { /** handlerScript */ protected String handlerScript; - /** id */ - protected String id; - /** name */ protected String name; @@ -68,99 +66,123 @@ public class BsDataConfig extends AbstractEntity { // Accessor // ======== public Boolean getAvailable() { + checkSpecifiedProperty("available"); return available; } public void setAvailable(Boolean value) { - available = value; + registerModifiedProperty("available"); + this.available = value; } public Float getBoost() { + checkSpecifiedProperty("boost"); return boost; } public void setBoost(Float value) { - boost = value; + registerModifiedProperty("boost"); + this.boost = value; } public String getCreatedBy() { + checkSpecifiedProperty("createdBy"); return createdBy; } public void setCreatedBy(String value) { - createdBy = value; + registerModifiedProperty("createdBy"); + this.createdBy = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public String getHandlerName() { + checkSpecifiedProperty("handlerName"); return handlerName; } public void setHandlerName(String value) { - handlerName = value; + registerModifiedProperty("handlerName"); + this.handlerName = value; } public String getHandlerParameter() { + checkSpecifiedProperty("handlerParameter"); return handlerParameter; } public void setHandlerParameter(String value) { - handlerParameter = value; + registerModifiedProperty("handlerParameter"); + this.handlerParameter = value; } public String getHandlerScript() { + checkSpecifiedProperty("handlerScript"); return handlerScript; } public void setHandlerScript(String value) { - handlerScript = value; + registerModifiedProperty("handlerScript"); + this.handlerScript = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getName() { + checkSpecifiedProperty("name"); return name; } public void setName(String value) { - name = value; + registerModifiedProperty("name"); + this.name = value; } public Integer getSortOrder() { + checkSpecifiedProperty("sortOrder"); return sortOrder; } public void setSortOrder(Integer value) { - sortOrder = value; + registerModifiedProperty("sortOrder"); + this.sortOrder = value; } public String getUpdatedBy() { + checkSpecifiedProperty("updatedBy"); return updatedBy; } public void setUpdatedBy(String value) { - updatedBy = value; + registerModifiedProperty("updatedBy"); + this.updatedBy = value; } public Long getUpdatedTime() { + checkSpecifiedProperty("updatedTime"); return updatedTime; } public void setUpdatedTime(Long value) { - updatedTime = value; + registerModifiedProperty("updatedTime"); + this.updatedTime = value; } @Override @@ -187,8 +209,8 @@ public class BsDataConfig extends AbstractEntity { if (handlerScript != null) { sourceMap.put("handlerScript", handlerScript); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (name != null) { sourceMap.put("name", name); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsDataConfigToLabel.java b/src/main/java/org/codelibs/fess/es/bsentity/BsDataConfigToLabel.java index 283a1bdac..6466685b1 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsDataConfigToLabel.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsDataConfigToLabel.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -29,9 +30,6 @@ public class BsDataConfigToLabel extends AbstractEntity { /** dataConfigId */ protected String dataConfigId; - /** id */ - protected String id; - /** labelTypeId */ protected String labelTypeId; @@ -41,27 +39,33 @@ public class BsDataConfigToLabel extends AbstractEntity { // Accessor // ======== public String getDataConfigId() { + checkSpecifiedProperty("dataConfigId"); return dataConfigId; } public void setDataConfigId(String value) { - dataConfigId = value; + registerModifiedProperty("dataConfigId"); + this.dataConfigId = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getLabelTypeId() { + checkSpecifiedProperty("labelTypeId"); return labelTypeId; } public void setLabelTypeId(String value) { - labelTypeId = value; + registerModifiedProperty("labelTypeId"); + this.labelTypeId = value; } @Override @@ -70,8 +74,8 @@ public class BsDataConfigToLabel extends AbstractEntity { if (dataConfigId != null) { sourceMap.put("dataConfigId", dataConfigId); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (labelTypeId != null) { sourceMap.put("labelTypeId", labelTypeId); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsDataConfigToRole.java b/src/main/java/org/codelibs/fess/es/bsentity/BsDataConfigToRole.java index 7d2e987f0..af4de0936 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsDataConfigToRole.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsDataConfigToRole.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -29,9 +30,6 @@ public class BsDataConfigToRole extends AbstractEntity { /** dataConfigId */ protected String dataConfigId; - /** id */ - protected String id; - /** roleTypeId */ protected String roleTypeId; @@ -41,27 +39,33 @@ public class BsDataConfigToRole extends AbstractEntity { // Accessor // ======== public String getDataConfigId() { + checkSpecifiedProperty("dataConfigId"); return dataConfigId; } public void setDataConfigId(String value) { - dataConfigId = value; + registerModifiedProperty("dataConfigId"); + this.dataConfigId = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getRoleTypeId() { + checkSpecifiedProperty("roleTypeId"); return roleTypeId; } public void setRoleTypeId(String value) { - roleTypeId = value; + registerModifiedProperty("roleTypeId"); + this.roleTypeId = value; } @Override @@ -70,8 +74,8 @@ public class BsDataConfigToRole extends AbstractEntity { if (dataConfigId != null) { sourceMap.put("dataConfigId", dataConfigId); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (roleTypeId != null) { sourceMap.put("roleTypeId", roleTypeId); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsFailureUrl.java b/src/main/java/org/codelibs/fess/es/bsentity/BsFailureUrl.java index 8a7127387..7c057d97d 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsFailureUrl.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsFailureUrl.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -38,9 +39,6 @@ public class BsFailureUrl extends AbstractEntity { /** errorName */ protected String errorName; - /** id */ - protected String id; - /** lastAccessTime */ protected Long lastAccessTime; @@ -56,67 +54,83 @@ public class BsFailureUrl extends AbstractEntity { // Accessor // ======== public String getConfigId() { + checkSpecifiedProperty("configId"); return configId; } public void setConfigId(String value) { - configId = value; + registerModifiedProperty("configId"); + this.configId = value; } public Integer getErrorCount() { + checkSpecifiedProperty("errorCount"); return errorCount; } public void setErrorCount(Integer value) { - errorCount = value; + registerModifiedProperty("errorCount"); + this.errorCount = value; } public String getErrorLog() { + checkSpecifiedProperty("errorLog"); return errorLog; } public void setErrorLog(String value) { - errorLog = value; + registerModifiedProperty("errorLog"); + this.errorLog = value; } public String getErrorName() { + checkSpecifiedProperty("errorName"); return errorName; } public void setErrorName(String value) { - errorName = value; + registerModifiedProperty("errorName"); + this.errorName = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public Long getLastAccessTime() { + checkSpecifiedProperty("lastAccessTime"); return lastAccessTime; } public void setLastAccessTime(Long value) { - lastAccessTime = value; + registerModifiedProperty("lastAccessTime"); + this.lastAccessTime = value; } public String getThreadName() { + checkSpecifiedProperty("threadName"); return threadName; } public void setThreadName(String value) { - threadName = value; + registerModifiedProperty("threadName"); + this.threadName = value; } public String getUrl() { + checkSpecifiedProperty("url"); return url; } public void setUrl(String value) { - url = value; + registerModifiedProperty("url"); + this.url = value; } @Override @@ -134,8 +148,8 @@ public class BsFailureUrl extends AbstractEntity { if (errorName != null) { sourceMap.put("errorName", errorName); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (lastAccessTime != null) { sourceMap.put("lastAccessTime", lastAccessTime); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsFavoriteLog.java b/src/main/java/org/codelibs/fess/es/bsentity/BsFavoriteLog.java index 8c777c632..25eef1311 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsFavoriteLog.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsFavoriteLog.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -29,9 +30,6 @@ public class BsFavoriteLog extends AbstractEntity { /** createdTime */ protected Long createdTime; - /** id */ - protected String id; - /** url */ protected String url; @@ -44,35 +42,43 @@ public class BsFavoriteLog extends AbstractEntity { // Accessor // ======== public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getUrl() { + checkSpecifiedProperty("url"); return url; } public void setUrl(String value) { - url = value; + registerModifiedProperty("url"); + this.url = value; } public String getUserInfoId() { + checkSpecifiedProperty("userInfoId"); return userInfoId; } public void setUserInfoId(String value) { - userInfoId = value; + registerModifiedProperty("userInfoId"); + this.userInfoId = value; } @Override @@ -81,8 +87,8 @@ public class BsFavoriteLog extends AbstractEntity { if (createdTime != null) { sourceMap.put("createdTime", createdTime); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (url != null) { sourceMap.put("url", url); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsFileAuthentication.java b/src/main/java/org/codelibs/fess/es/bsentity/BsFileAuthentication.java index 83cdded8d..a7f4c4acd 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsFileAuthentication.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsFileAuthentication.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -38,9 +39,6 @@ public class BsFileAuthentication extends AbstractEntity { /** hostname */ protected String hostname; - /** id */ - protected String id; - /** parameters */ protected String parameters; @@ -68,99 +66,123 @@ public class BsFileAuthentication extends AbstractEntity { // Accessor // ======== public String getCreatedBy() { + checkSpecifiedProperty("createdBy"); return createdBy; } public void setCreatedBy(String value) { - createdBy = value; + registerModifiedProperty("createdBy"); + this.createdBy = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public String getFileConfigId() { + checkSpecifiedProperty("fileConfigId"); return fileConfigId; } public void setFileConfigId(String value) { - fileConfigId = value; + registerModifiedProperty("fileConfigId"); + this.fileConfigId = value; } public String getHostname() { + checkSpecifiedProperty("hostname"); return hostname; } public void setHostname(String value) { - hostname = value; + registerModifiedProperty("hostname"); + this.hostname = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getParameters() { + checkSpecifiedProperty("parameters"); return parameters; } public void setParameters(String value) { - parameters = value; + registerModifiedProperty("parameters"); + this.parameters = value; } public String getPassword() { + checkSpecifiedProperty("password"); return password; } public void setPassword(String value) { - password = value; + registerModifiedProperty("password"); + this.password = value; } public Integer getPort() { + checkSpecifiedProperty("port"); return port; } public void setPort(Integer value) { - port = value; + registerModifiedProperty("port"); + this.port = value; } public String getProtocolScheme() { + checkSpecifiedProperty("protocolScheme"); return protocolScheme; } public void setProtocolScheme(String value) { - protocolScheme = value; + registerModifiedProperty("protocolScheme"); + this.protocolScheme = value; } public String getUpdatedBy() { + checkSpecifiedProperty("updatedBy"); return updatedBy; } public void setUpdatedBy(String value) { - updatedBy = value; + registerModifiedProperty("updatedBy"); + this.updatedBy = value; } public Long getUpdatedTime() { + checkSpecifiedProperty("updatedTime"); return updatedTime; } public void setUpdatedTime(Long value) { - updatedTime = value; + registerModifiedProperty("updatedTime"); + this.updatedTime = value; } public String getUsername() { + checkSpecifiedProperty("username"); return username; } public void setUsername(String value) { - username = value; + registerModifiedProperty("username"); + this.username = value; } @Override @@ -178,8 +200,8 @@ public class BsFileAuthentication extends AbstractEntity { if (hostname != null) { sourceMap.put("hostname", hostname); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (parameters != null) { sourceMap.put("parameters", parameters); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsFileConfig.java b/src/main/java/org/codelibs/fess/es/bsentity/BsFileConfig.java index 661f01050..8f59c8abb 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsFileConfig.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsFileConfig.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -50,9 +51,6 @@ public class BsFileConfig extends AbstractEntity { /** excludedPaths */ protected String excludedPaths; - /** id */ - protected String id; - /** includedDocPaths */ protected String includedDocPaths; @@ -89,155 +87,193 @@ public class BsFileConfig extends AbstractEntity { // Accessor // ======== public Boolean getAvailable() { + checkSpecifiedProperty("available"); return available; } public void setAvailable(Boolean value) { - available = value; + registerModifiedProperty("available"); + this.available = value; } public Float getBoost() { + checkSpecifiedProperty("boost"); return boost; } public void setBoost(Float value) { - boost = value; + registerModifiedProperty("boost"); + this.boost = value; } public String getConfigParameter() { + checkSpecifiedProperty("configParameter"); return configParameter; } public void setConfigParameter(String value) { - configParameter = value; + registerModifiedProperty("configParameter"); + this.configParameter = value; } public String getCreatedBy() { + checkSpecifiedProperty("createdBy"); return createdBy; } public void setCreatedBy(String value) { - createdBy = value; + registerModifiedProperty("createdBy"); + this.createdBy = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public Integer getDepth() { + checkSpecifiedProperty("depth"); return depth; } public void setDepth(Integer value) { - depth = value; + registerModifiedProperty("depth"); + this.depth = value; } public String getExcludedDocPaths() { + checkSpecifiedProperty("excludedDocPaths"); return excludedDocPaths; } public void setExcludedDocPaths(String value) { - excludedDocPaths = value; + registerModifiedProperty("excludedDocPaths"); + this.excludedDocPaths = value; } public String getExcludedPaths() { + checkSpecifiedProperty("excludedPaths"); return excludedPaths; } public void setExcludedPaths(String value) { - excludedPaths = value; + registerModifiedProperty("excludedPaths"); + this.excludedPaths = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getIncludedDocPaths() { + checkSpecifiedProperty("includedDocPaths"); return includedDocPaths; } public void setIncludedDocPaths(String value) { - includedDocPaths = value; + registerModifiedProperty("includedDocPaths"); + this.includedDocPaths = value; } public String getIncludedPaths() { + checkSpecifiedProperty("includedPaths"); return includedPaths; } public void setIncludedPaths(String value) { - includedPaths = value; + registerModifiedProperty("includedPaths"); + this.includedPaths = value; } public Integer getIntervalTime() { + checkSpecifiedProperty("intervalTime"); return intervalTime; } public void setIntervalTime(Integer value) { - intervalTime = value; + registerModifiedProperty("intervalTime"); + this.intervalTime = value; } public Long getMaxAccessCount() { + checkSpecifiedProperty("maxAccessCount"); return maxAccessCount; } public void setMaxAccessCount(Long value) { - maxAccessCount = value; + registerModifiedProperty("maxAccessCount"); + this.maxAccessCount = value; } public String getName() { + checkSpecifiedProperty("name"); return name; } public void setName(String value) { - name = value; + registerModifiedProperty("name"); + this.name = value; } public Integer getNumOfThread() { + checkSpecifiedProperty("numOfThread"); return numOfThread; } public void setNumOfThread(Integer value) { - numOfThread = value; + registerModifiedProperty("numOfThread"); + this.numOfThread = value; } public String getPaths() { + checkSpecifiedProperty("paths"); return paths; } public void setPaths(String value) { - paths = value; + registerModifiedProperty("paths"); + this.paths = value; } public Integer getSortOrder() { + checkSpecifiedProperty("sortOrder"); return sortOrder; } public void setSortOrder(Integer value) { - sortOrder = value; + registerModifiedProperty("sortOrder"); + this.sortOrder = value; } public String getUpdatedBy() { + checkSpecifiedProperty("updatedBy"); return updatedBy; } public void setUpdatedBy(String value) { - updatedBy = value; + registerModifiedProperty("updatedBy"); + this.updatedBy = value; } public Long getUpdatedTime() { + checkSpecifiedProperty("updatedTime"); return updatedTime; } public void setUpdatedTime(Long value) { - updatedTime = value; + registerModifiedProperty("updatedTime"); + this.updatedTime = value; } @Override @@ -267,8 +303,8 @@ public class BsFileConfig extends AbstractEntity { if (excludedPaths != null) { sourceMap.put("excludedPaths", excludedPaths); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (includedDocPaths != null) { sourceMap.put("includedDocPaths", includedDocPaths); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsFileConfigToLabel.java b/src/main/java/org/codelibs/fess/es/bsentity/BsFileConfigToLabel.java index 4caf1e205..390c6e37a 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsFileConfigToLabel.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsFileConfigToLabel.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -29,9 +30,6 @@ public class BsFileConfigToLabel extends AbstractEntity { /** fileConfigId */ protected String fileConfigId; - /** id */ - protected String id; - /** labelTypeId */ protected String labelTypeId; @@ -41,27 +39,33 @@ public class BsFileConfigToLabel extends AbstractEntity { // Accessor // ======== public String getFileConfigId() { + checkSpecifiedProperty("fileConfigId"); return fileConfigId; } public void setFileConfigId(String value) { - fileConfigId = value; + registerModifiedProperty("fileConfigId"); + this.fileConfigId = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getLabelTypeId() { + checkSpecifiedProperty("labelTypeId"); return labelTypeId; } public void setLabelTypeId(String value) { - labelTypeId = value; + registerModifiedProperty("labelTypeId"); + this.labelTypeId = value; } @Override @@ -70,8 +74,8 @@ public class BsFileConfigToLabel extends AbstractEntity { if (fileConfigId != null) { sourceMap.put("fileConfigId", fileConfigId); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (labelTypeId != null) { sourceMap.put("labelTypeId", labelTypeId); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsFileConfigToRole.java b/src/main/java/org/codelibs/fess/es/bsentity/BsFileConfigToRole.java index b52915c08..855ae1917 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsFileConfigToRole.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsFileConfigToRole.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -29,9 +30,6 @@ public class BsFileConfigToRole extends AbstractEntity { /** fileConfigId */ protected String fileConfigId; - /** id */ - protected String id; - /** roleTypeId */ protected String roleTypeId; @@ -41,27 +39,33 @@ public class BsFileConfigToRole extends AbstractEntity { // Accessor // ======== public String getFileConfigId() { + checkSpecifiedProperty("fileConfigId"); return fileConfigId; } public void setFileConfigId(String value) { - fileConfigId = value; + registerModifiedProperty("fileConfigId"); + this.fileConfigId = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getRoleTypeId() { + checkSpecifiedProperty("roleTypeId"); return roleTypeId; } public void setRoleTypeId(String value) { - roleTypeId = value; + registerModifiedProperty("roleTypeId"); + this.roleTypeId = value; } @Override @@ -70,8 +74,8 @@ public class BsFileConfigToRole extends AbstractEntity { if (fileConfigId != null) { sourceMap.put("fileConfigId", fileConfigId); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (roleTypeId != null) { sourceMap.put("roleTypeId", roleTypeId); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsJobLog.java b/src/main/java/org/codelibs/fess/es/bsentity/BsJobLog.java index dc7577f01..b5f1f49b6 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsJobLog.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsJobLog.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -29,9 +30,6 @@ public class BsJobLog extends AbstractEntity { /** endTime */ protected Long endTime; - /** id */ - protected String id; - /** jobName */ protected String jobName; @@ -59,75 +57,93 @@ public class BsJobLog extends AbstractEntity { // Accessor // ======== public Long getEndTime() { + checkSpecifiedProperty("endTime"); return endTime; } public void setEndTime(Long value) { - endTime = value; + registerModifiedProperty("endTime"); + this.endTime = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getJobName() { + checkSpecifiedProperty("jobName"); return jobName; } public void setJobName(String value) { - jobName = value; + registerModifiedProperty("jobName"); + this.jobName = value; } public String getJobStatus() { + checkSpecifiedProperty("jobStatus"); return jobStatus; } public void setJobStatus(String value) { - jobStatus = value; + registerModifiedProperty("jobStatus"); + this.jobStatus = value; } public String getScriptData() { + checkSpecifiedProperty("scriptData"); return scriptData; } public void setScriptData(String value) { - scriptData = value; + registerModifiedProperty("scriptData"); + this.scriptData = value; } public String getScriptResult() { + checkSpecifiedProperty("scriptResult"); return scriptResult; } public void setScriptResult(String value) { - scriptResult = value; + registerModifiedProperty("scriptResult"); + this.scriptResult = value; } public String getScriptType() { + checkSpecifiedProperty("scriptType"); return scriptType; } public void setScriptType(String value) { - scriptType = value; + registerModifiedProperty("scriptType"); + this.scriptType = value; } public Long getStartTime() { + checkSpecifiedProperty("startTime"); return startTime; } public void setStartTime(Long value) { - startTime = value; + registerModifiedProperty("startTime"); + this.startTime = value; } public String getTarget() { + checkSpecifiedProperty("target"); return target; } public void setTarget(String value) { - target = value; + registerModifiedProperty("target"); + this.target = value; } @Override @@ -136,8 +152,8 @@ public class BsJobLog extends AbstractEntity { if (endTime != null) { sourceMap.put("endTime", endTime); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (jobName != null) { sourceMap.put("jobName", jobName); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsKeyMatch.java b/src/main/java/org/codelibs/fess/es/bsentity/BsKeyMatch.java index 5ddabfcf7..a76d3137f 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsKeyMatch.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsKeyMatch.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -35,9 +36,6 @@ public class BsKeyMatch extends AbstractEntity { /** createdTime */ protected Long createdTime; - /** id */ - protected String id; - /** maxSize */ protected Integer maxSize; @@ -59,75 +57,93 @@ public class BsKeyMatch extends AbstractEntity { // Accessor // ======== public Float getBoost() { + checkSpecifiedProperty("boost"); return boost; } public void setBoost(Float value) { - boost = value; + registerModifiedProperty("boost"); + this.boost = value; } public String getCreatedBy() { + checkSpecifiedProperty("createdBy"); return createdBy; } public void setCreatedBy(String value) { - createdBy = value; + registerModifiedProperty("createdBy"); + this.createdBy = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public Integer getMaxSize() { + checkSpecifiedProperty("maxSize"); return maxSize; } public void setMaxSize(Integer value) { - maxSize = value; + registerModifiedProperty("maxSize"); + this.maxSize = value; } public String getQuery() { + checkSpecifiedProperty("query"); return query; } public void setQuery(String value) { - query = value; + registerModifiedProperty("query"); + this.query = value; } public String getTerm() { + checkSpecifiedProperty("term"); return term; } public void setTerm(String value) { - term = value; + registerModifiedProperty("term"); + this.term = value; } public String getUpdatedBy() { + checkSpecifiedProperty("updatedBy"); return updatedBy; } public void setUpdatedBy(String value) { - updatedBy = value; + registerModifiedProperty("updatedBy"); + this.updatedBy = value; } public Long getUpdatedTime() { + checkSpecifiedProperty("updatedTime"); return updatedTime; } public void setUpdatedTime(Long value) { - updatedTime = value; + registerModifiedProperty("updatedTime"); + this.updatedTime = value; } @Override @@ -142,8 +158,8 @@ public class BsKeyMatch extends AbstractEntity { if (createdTime != null) { sourceMap.put("createdTime", createdTime); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (maxSize != null) { sourceMap.put("maxSize", maxSize); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsLabelToRole.java b/src/main/java/org/codelibs/fess/es/bsentity/BsLabelToRole.java index 05bb77159..babafb786 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsLabelToRole.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsLabelToRole.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -26,9 +27,6 @@ public class BsLabelToRole extends AbstractEntity { // =================================================================================== // Attribute // ========= - /** id */ - protected String id; - /** labelTypeId */ protected String labelTypeId; @@ -41,34 +39,40 @@ public class BsLabelToRole extends AbstractEntity { // Accessor // ======== public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getLabelTypeId() { + checkSpecifiedProperty("labelTypeId"); return labelTypeId; } public void setLabelTypeId(String value) { - labelTypeId = value; + registerModifiedProperty("labelTypeId"); + this.labelTypeId = value; } public String getRoleTypeId() { + checkSpecifiedProperty("roleTypeId"); return roleTypeId; } public void setRoleTypeId(String value) { - roleTypeId = value; + registerModifiedProperty("roleTypeId"); + this.roleTypeId = value; } @Override public Map toSource() { Map sourceMap = new HashMap<>(); - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (labelTypeId != null) { sourceMap.put("labelTypeId", labelTypeId); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsLabelType.java b/src/main/java/org/codelibs/fess/es/bsentity/BsLabelType.java index 630686307..91e1e53e0 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsLabelType.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsLabelType.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -35,9 +36,6 @@ public class BsLabelType extends AbstractEntity { /** excludedPaths */ protected String excludedPaths; - /** id */ - protected String id; - /** includedPaths */ protected String includedPaths; @@ -62,83 +60,103 @@ public class BsLabelType extends AbstractEntity { // Accessor // ======== public String getCreatedBy() { + checkSpecifiedProperty("createdBy"); return createdBy; } public void setCreatedBy(String value) { - createdBy = value; + registerModifiedProperty("createdBy"); + this.createdBy = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public String getExcludedPaths() { + checkSpecifiedProperty("excludedPaths"); return excludedPaths; } public void setExcludedPaths(String value) { - excludedPaths = value; + registerModifiedProperty("excludedPaths"); + this.excludedPaths = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getIncludedPaths() { + checkSpecifiedProperty("includedPaths"); return includedPaths; } public void setIncludedPaths(String value) { - includedPaths = value; + registerModifiedProperty("includedPaths"); + this.includedPaths = value; } public String getName() { + checkSpecifiedProperty("name"); return name; } public void setName(String value) { - name = value; + registerModifiedProperty("name"); + this.name = value; } public Integer getSortOrder() { + checkSpecifiedProperty("sortOrder"); return sortOrder; } public void setSortOrder(Integer value) { - sortOrder = value; + registerModifiedProperty("sortOrder"); + this.sortOrder = value; } public String getUpdatedBy() { + checkSpecifiedProperty("updatedBy"); return updatedBy; } public void setUpdatedBy(String value) { - updatedBy = value; + registerModifiedProperty("updatedBy"); + this.updatedBy = value; } public Long getUpdatedTime() { + checkSpecifiedProperty("updatedTime"); return updatedTime; } public void setUpdatedTime(Long value) { - updatedTime = value; + registerModifiedProperty("updatedTime"); + this.updatedTime = value; } public String getValue() { + checkSpecifiedProperty("value"); return value; } public void setValue(String value) { - value = value; + registerModifiedProperty("value"); + this.value = value; } @Override @@ -153,8 +171,8 @@ public class BsLabelType extends AbstractEntity { if (excludedPaths != null) { sourceMap.put("excludedPaths", excludedPaths); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (includedPaths != null) { sourceMap.put("includedPaths", includedPaths); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsOverlappingHost.java b/src/main/java/org/codelibs/fess/es/bsentity/BsOverlappingHost.java index cb000e25b..b7c14be1c 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsOverlappingHost.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsOverlappingHost.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -32,9 +33,6 @@ public class BsOverlappingHost extends AbstractEntity { /** createdTime */ protected Long createdTime; - /** id */ - protected String id; - /** overlappingName */ protected String overlappingName; @@ -56,67 +54,83 @@ public class BsOverlappingHost extends AbstractEntity { // Accessor // ======== public String getCreatedBy() { + checkSpecifiedProperty("createdBy"); return createdBy; } public void setCreatedBy(String value) { - createdBy = value; + registerModifiedProperty("createdBy"); + this.createdBy = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getOverlappingName() { + checkSpecifiedProperty("overlappingName"); return overlappingName; } public void setOverlappingName(String value) { - overlappingName = value; + registerModifiedProperty("overlappingName"); + this.overlappingName = value; } public String getRegularName() { + checkSpecifiedProperty("regularName"); return regularName; } public void setRegularName(String value) { - regularName = value; + registerModifiedProperty("regularName"); + this.regularName = value; } public Integer getSortOrder() { + checkSpecifiedProperty("sortOrder"); return sortOrder; } public void setSortOrder(Integer value) { - sortOrder = value; + registerModifiedProperty("sortOrder"); + this.sortOrder = value; } public String getUpdatedBy() { + checkSpecifiedProperty("updatedBy"); return updatedBy; } public void setUpdatedBy(String value) { - updatedBy = value; + registerModifiedProperty("updatedBy"); + this.updatedBy = value; } public Long getUpdatedTime() { + checkSpecifiedProperty("updatedTime"); return updatedTime; } public void setUpdatedTime(Long value) { - updatedTime = value; + registerModifiedProperty("updatedTime"); + this.updatedTime = value; } @Override @@ -128,8 +142,8 @@ public class BsOverlappingHost extends AbstractEntity { if (createdTime != null) { sourceMap.put("createdTime", createdTime); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (overlappingName != null) { sourceMap.put("overlappingName", overlappingName); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsPathMapping.java b/src/main/java/org/codelibs/fess/es/bsentity/BsPathMapping.java index 60989190f..287a8e5f1 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsPathMapping.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsPathMapping.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -32,9 +33,6 @@ public class BsPathMapping extends AbstractEntity { /** createdTime */ protected Long createdTime; - /** id */ - protected String id; - /** processType */ protected String processType; @@ -59,75 +57,93 @@ public class BsPathMapping extends AbstractEntity { // Accessor // ======== public String getCreatedBy() { + checkSpecifiedProperty("createdBy"); return createdBy; } public void setCreatedBy(String value) { - createdBy = value; + registerModifiedProperty("createdBy"); + this.createdBy = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getProcessType() { + checkSpecifiedProperty("processType"); return processType; } public void setProcessType(String value) { - processType = value; + registerModifiedProperty("processType"); + this.processType = value; } public String getRegex() { + checkSpecifiedProperty("regex"); return regex; } public void setRegex(String value) { - regex = value; + registerModifiedProperty("regex"); + this.regex = value; } public String getReplacement() { + checkSpecifiedProperty("replacement"); return replacement; } public void setReplacement(String value) { - replacement = value; + registerModifiedProperty("replacement"); + this.replacement = value; } public Integer getSortOrder() { + checkSpecifiedProperty("sortOrder"); return sortOrder; } public void setSortOrder(Integer value) { - sortOrder = value; + registerModifiedProperty("sortOrder"); + this.sortOrder = value; } public String getUpdatedBy() { + checkSpecifiedProperty("updatedBy"); return updatedBy; } public void setUpdatedBy(String value) { - updatedBy = value; + registerModifiedProperty("updatedBy"); + this.updatedBy = value; } public Long getUpdatedTime() { + checkSpecifiedProperty("updatedTime"); return updatedTime; } public void setUpdatedTime(Long value) { - updatedTime = value; + registerModifiedProperty("updatedTime"); + this.updatedTime = value; } @Override @@ -139,8 +155,8 @@ public class BsPathMapping extends AbstractEntity { if (createdTime != null) { sourceMap.put("createdTime", createdTime); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (processType != null) { sourceMap.put("processType", processType); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsRequestHeader.java b/src/main/java/org/codelibs/fess/es/bsentity/BsRequestHeader.java index 2229a4018..3e1d7aa8c 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsRequestHeader.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsRequestHeader.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -32,9 +33,6 @@ public class BsRequestHeader extends AbstractEntity { /** createdTime */ protected Long createdTime; - /** id */ - protected String id; - /** name */ protected String name; @@ -56,67 +54,83 @@ public class BsRequestHeader extends AbstractEntity { // Accessor // ======== public String getCreatedBy() { + checkSpecifiedProperty("createdBy"); return createdBy; } public void setCreatedBy(String value) { - createdBy = value; + registerModifiedProperty("createdBy"); + this.createdBy = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getName() { + checkSpecifiedProperty("name"); return name; } public void setName(String value) { - name = value; + registerModifiedProperty("name"); + this.name = value; } public String getUpdatedBy() { + checkSpecifiedProperty("updatedBy"); return updatedBy; } public void setUpdatedBy(String value) { - updatedBy = value; + registerModifiedProperty("updatedBy"); + this.updatedBy = value; } public Long getUpdatedTime() { + checkSpecifiedProperty("updatedTime"); return updatedTime; } public void setUpdatedTime(Long value) { - updatedTime = value; + registerModifiedProperty("updatedTime"); + this.updatedTime = value; } public String getValue() { + checkSpecifiedProperty("value"); return value; } public void setValue(String value) { - value = value; + registerModifiedProperty("value"); + this.value = value; } public String getWebConfigId() { + checkSpecifiedProperty("webConfigId"); return webConfigId; } public void setWebConfigId(String value) { - webConfigId = value; + registerModifiedProperty("webConfigId"); + this.webConfigId = value; } @Override @@ -128,8 +142,8 @@ public class BsRequestHeader extends AbstractEntity { if (createdTime != null) { sourceMap.put("createdTime", createdTime); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (name != null) { sourceMap.put("name", name); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsRoleType.java b/src/main/java/org/codelibs/fess/es/bsentity/BsRoleType.java index 168c8bfee..abbe6dbce 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsRoleType.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsRoleType.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -32,9 +33,6 @@ public class BsRoleType extends AbstractEntity { /** createdTime */ protected Long createdTime; - /** id */ - protected String id; - /** name */ protected String name; @@ -56,67 +54,83 @@ public class BsRoleType extends AbstractEntity { // Accessor // ======== public String getCreatedBy() { + checkSpecifiedProperty("createdBy"); return createdBy; } public void setCreatedBy(String value) { - createdBy = value; + registerModifiedProperty("createdBy"); + this.createdBy = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getName() { + checkSpecifiedProperty("name"); return name; } public void setName(String value) { - name = value; + registerModifiedProperty("name"); + this.name = value; } public Integer getSortOrder() { + checkSpecifiedProperty("sortOrder"); return sortOrder; } public void setSortOrder(Integer value) { - sortOrder = value; + registerModifiedProperty("sortOrder"); + this.sortOrder = value; } public String getUpdatedBy() { + checkSpecifiedProperty("updatedBy"); return updatedBy; } public void setUpdatedBy(String value) { - updatedBy = value; + registerModifiedProperty("updatedBy"); + this.updatedBy = value; } public Long getUpdatedTime() { + checkSpecifiedProperty("updatedTime"); return updatedTime; } public void setUpdatedTime(Long value) { - updatedTime = value; + registerModifiedProperty("updatedTime"); + this.updatedTime = value; } public String getValue() { + checkSpecifiedProperty("value"); return value; } public void setValue(String value) { - value = value; + registerModifiedProperty("value"); + this.value = value; } @Override @@ -128,8 +142,8 @@ public class BsRoleType extends AbstractEntity { if (createdTime != null) { sourceMap.put("createdTime", createdTime); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (name != null) { sourceMap.put("name", name); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsScheduledJob.java b/src/main/java/org/codelibs/fess/es/bsentity/BsScheduledJob.java index 33fe54ebd..f4575527f 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsScheduledJob.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsScheduledJob.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -30,7 +31,7 @@ public class BsScheduledJob extends AbstractEntity { protected Boolean available; /** crawler */ - protected String crawler; + protected Boolean crawler; /** createdBy */ protected String createdBy; @@ -41,9 +42,6 @@ public class BsScheduledJob extends AbstractEntity { /** cronExpression */ protected String cronExpression; - /** id */ - protected String id; - /** jobLogging */ protected Boolean jobLogging; @@ -74,115 +72,143 @@ public class BsScheduledJob extends AbstractEntity { // Accessor // ======== public Boolean getAvailable() { + checkSpecifiedProperty("available"); return available; } public void setAvailable(Boolean value) { - available = value; + registerModifiedProperty("available"); + this.available = value; } - public String getCrawler() { + public Boolean getCrawler() { + checkSpecifiedProperty("crawler"); return crawler; } - public void setCrawler(String value) { - crawler = value; + public void setCrawler(Boolean value) { + registerModifiedProperty("crawler"); + this.crawler = value; } public String getCreatedBy() { + checkSpecifiedProperty("createdBy"); return createdBy; } public void setCreatedBy(String value) { - createdBy = value; + registerModifiedProperty("createdBy"); + this.createdBy = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public String getCronExpression() { + checkSpecifiedProperty("cronExpression"); return cronExpression; } public void setCronExpression(String value) { - cronExpression = value; + registerModifiedProperty("cronExpression"); + this.cronExpression = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public Boolean getJobLogging() { + checkSpecifiedProperty("jobLogging"); return jobLogging; } public void setJobLogging(Boolean value) { - jobLogging = value; + registerModifiedProperty("jobLogging"); + this.jobLogging = value; } public String getName() { + checkSpecifiedProperty("name"); return name; } public void setName(String value) { - name = value; + registerModifiedProperty("name"); + this.name = value; } public String getScriptData() { + checkSpecifiedProperty("scriptData"); return scriptData; } public void setScriptData(String value) { - scriptData = value; + registerModifiedProperty("scriptData"); + this.scriptData = value; } public String getScriptType() { + checkSpecifiedProperty("scriptType"); return scriptType; } public void setScriptType(String value) { - scriptType = value; + registerModifiedProperty("scriptType"); + this.scriptType = value; } public Integer getSortOrder() { + checkSpecifiedProperty("sortOrder"); return sortOrder; } public void setSortOrder(Integer value) { - sortOrder = value; + registerModifiedProperty("sortOrder"); + this.sortOrder = value; } public String getTarget() { + checkSpecifiedProperty("target"); return target; } public void setTarget(String value) { - target = value; + registerModifiedProperty("target"); + this.target = value; } public String getUpdatedBy() { + checkSpecifiedProperty("updatedBy"); return updatedBy; } public void setUpdatedBy(String value) { - updatedBy = value; + registerModifiedProperty("updatedBy"); + this.updatedBy = value; } public Long getUpdatedTime() { + checkSpecifiedProperty("updatedTime"); return updatedTime; } public void setUpdatedTime(Long value) { - updatedTime = value; + registerModifiedProperty("updatedTime"); + this.updatedTime = value; } @Override @@ -203,8 +229,8 @@ public class BsScheduledJob extends AbstractEntity { if (cronExpression != null) { sourceMap.put("cronExpression", cronExpression); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (jobLogging != null) { sourceMap.put("jobLogging", jobLogging); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsSearchFieldLog.java b/src/main/java/org/codelibs/fess/es/bsentity/BsSearchFieldLog.java index 3d34ab970..4331176d3 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsSearchFieldLog.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsSearchFieldLog.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -26,9 +27,6 @@ public class BsSearchFieldLog extends AbstractEntity { // =================================================================================== // Attribute // ========= - /** id */ - protected String id; - /** name */ protected String name; @@ -44,42 +42,50 @@ public class BsSearchFieldLog extends AbstractEntity { // Accessor // ======== public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getName() { + checkSpecifiedProperty("name"); return name; } public void setName(String value) { - name = value; + registerModifiedProperty("name"); + this.name = value; } public String getSearchLogId() { + checkSpecifiedProperty("searchLogId"); return searchLogId; } public void setSearchLogId(String value) { - searchLogId = value; + registerModifiedProperty("searchLogId"); + this.searchLogId = value; } public String getValue() { + checkSpecifiedProperty("value"); return value; } public void setValue(String value) { - value = value; + registerModifiedProperty("value"); + this.value = value; } @Override public Map toSource() { Map sourceMap = new HashMap<>(); - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (name != null) { sourceMap.put("name", name); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsSearchLog.java b/src/main/java/org/codelibs/fess/es/bsentity/BsSearchLog.java index ef70472fe..5802c8e23 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsSearchLog.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsSearchLog.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -35,9 +36,6 @@ public class BsSearchLog extends AbstractEntity { /** hitCount */ protected Long hitCount; - /** id */ - protected String id; - /** queryOffset */ protected Integer queryOffset; @@ -59,8 +57,8 @@ public class BsSearchLog extends AbstractEntity { /** userAgent */ protected String userAgent; - /** userId */ - protected Long userId; + /** userInfoId */ + protected String userInfoId; /** userSessionId */ protected String userSessionId; @@ -71,107 +69,133 @@ public class BsSearchLog extends AbstractEntity { // Accessor // ======== public String getAccessType() { + checkSpecifiedProperty("accessType"); return accessType; } public void setAccessType(String value) { - accessType = value; + registerModifiedProperty("accessType"); + this.accessType = value; } public String getClientIp() { + checkSpecifiedProperty("clientIp"); return clientIp; } public void setClientIp(String value) { - clientIp = value; + registerModifiedProperty("clientIp"); + this.clientIp = value; } public Long getHitCount() { + checkSpecifiedProperty("hitCount"); return hitCount; } public void setHitCount(Long value) { - hitCount = value; + registerModifiedProperty("hitCount"); + this.hitCount = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public Integer getQueryOffset() { + checkSpecifiedProperty("queryOffset"); return queryOffset; } public void setQueryOffset(Integer value) { - queryOffset = value; + registerModifiedProperty("queryOffset"); + this.queryOffset = value; } public Integer getQueryPageSize() { + checkSpecifiedProperty("queryPageSize"); return queryPageSize; } public void setQueryPageSize(Integer value) { - queryPageSize = value; + registerModifiedProperty("queryPageSize"); + this.queryPageSize = value; } public String getReferer() { + checkSpecifiedProperty("referer"); return referer; } public void setReferer(String value) { - referer = value; + registerModifiedProperty("referer"); + this.referer = value; } public Long getRequestedTime() { + checkSpecifiedProperty("requestedTime"); return requestedTime; } public void setRequestedTime(Long value) { - requestedTime = value; + registerModifiedProperty("requestedTime"); + this.requestedTime = value; } public Integer getResponseTime() { + checkSpecifiedProperty("responseTime"); return responseTime; } public void setResponseTime(Integer value) { - responseTime = value; + registerModifiedProperty("responseTime"); + this.responseTime = value; } public String getSearchWord() { + checkSpecifiedProperty("searchWord"); return searchWord; } public void setSearchWord(String value) { - searchWord = value; + registerModifiedProperty("searchWord"); + this.searchWord = value; } public String getUserAgent() { + checkSpecifiedProperty("userAgent"); return userAgent; } public void setUserAgent(String value) { - userAgent = value; + registerModifiedProperty("userAgent"); + this.userAgent = value; } - public Long getUserId() { - return userId; + public String getUserInfoId() { + checkSpecifiedProperty("userInfoId"); + return userInfoId; } - public void setUserId(Long value) { - userId = value; + public void setUserInfoId(String value) { + registerModifiedProperty("userInfoId"); + this.userInfoId = value; } public String getUserSessionId() { + checkSpecifiedProperty("userSessionId"); return userSessionId; } public void setUserSessionId(String value) { - userSessionId = value; + registerModifiedProperty("userSessionId"); + this.userSessionId = value; } @Override @@ -186,8 +210,8 @@ public class BsSearchLog extends AbstractEntity { if (hitCount != null) { sourceMap.put("hitCount", hitCount); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (queryOffset != null) { sourceMap.put("queryOffset", queryOffset); @@ -210,8 +234,8 @@ public class BsSearchLog extends AbstractEntity { if (userAgent != null) { sourceMap.put("userAgent", userAgent); } - if (userId != null) { - sourceMap.put("userId", userId); + if (userInfoId != null) { + sourceMap.put("userInfoId", userInfoId); } if (userSessionId != null) { sourceMap.put("userSessionId", userSessionId); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsSuggestBadWord.java b/src/main/java/org/codelibs/fess/es/bsentity/BsSuggestBadWord.java index 942a6cd2e..8153cafc5 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsSuggestBadWord.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsSuggestBadWord.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -32,9 +33,6 @@ public class BsSuggestBadWord extends AbstractEntity { /** createdTime */ protected Long createdTime; - /** id */ - protected String id; - /** suggestWord */ protected String suggestWord; @@ -56,67 +54,83 @@ public class BsSuggestBadWord extends AbstractEntity { // Accessor // ======== public String getCreatedBy() { + checkSpecifiedProperty("createdBy"); return createdBy; } public void setCreatedBy(String value) { - createdBy = value; + registerModifiedProperty("createdBy"); + this.createdBy = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getSuggestWord() { + checkSpecifiedProperty("suggestWord"); return suggestWord; } public void setSuggestWord(String value) { - suggestWord = value; + registerModifiedProperty("suggestWord"); + this.suggestWord = value; } public String getTargetLabel() { + checkSpecifiedProperty("targetLabel"); return targetLabel; } public void setTargetLabel(String value) { - targetLabel = value; + registerModifiedProperty("targetLabel"); + this.targetLabel = value; } public String getTargetRole() { + checkSpecifiedProperty("targetRole"); return targetRole; } public void setTargetRole(String value) { - targetRole = value; + registerModifiedProperty("targetRole"); + this.targetRole = value; } public String getUpdatedBy() { + checkSpecifiedProperty("updatedBy"); return updatedBy; } public void setUpdatedBy(String value) { - updatedBy = value; + registerModifiedProperty("updatedBy"); + this.updatedBy = value; } public Long getUpdatedTime() { + checkSpecifiedProperty("updatedTime"); return updatedTime; } public void setUpdatedTime(Long value) { - updatedTime = value; + registerModifiedProperty("updatedTime"); + this.updatedTime = value; } @Override @@ -128,8 +142,8 @@ public class BsSuggestBadWord extends AbstractEntity { if (createdTime != null) { sourceMap.put("createdTime", createdTime); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (suggestWord != null) { sourceMap.put("suggestWord", suggestWord); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsSuggestElevateWord.java b/src/main/java/org/codelibs/fess/es/bsentity/BsSuggestElevateWord.java index 4cac10123..c1cc0c61e 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsSuggestElevateWord.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsSuggestElevateWord.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -35,9 +36,6 @@ public class BsSuggestElevateWord extends AbstractEntity { /** createdTime */ protected Long createdTime; - /** id */ - protected String id; - /** reading */ protected String reading; @@ -62,83 +60,103 @@ public class BsSuggestElevateWord extends AbstractEntity { // Accessor // ======== public Float getBoost() { + checkSpecifiedProperty("boost"); return boost; } public void setBoost(Float value) { - boost = value; + registerModifiedProperty("boost"); + this.boost = value; } public String getCreatedBy() { + checkSpecifiedProperty("createdBy"); return createdBy; } public void setCreatedBy(String value) { - createdBy = value; + registerModifiedProperty("createdBy"); + this.createdBy = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getReading() { + checkSpecifiedProperty("reading"); return reading; } public void setReading(String value) { - reading = value; + registerModifiedProperty("reading"); + this.reading = value; } public String getSuggestWord() { + checkSpecifiedProperty("suggestWord"); return suggestWord; } public void setSuggestWord(String value) { - suggestWord = value; + registerModifiedProperty("suggestWord"); + this.suggestWord = value; } public String getTargetLabel() { + checkSpecifiedProperty("targetLabel"); return targetLabel; } public void setTargetLabel(String value) { - targetLabel = value; + registerModifiedProperty("targetLabel"); + this.targetLabel = value; } public String getTargetRole() { + checkSpecifiedProperty("targetRole"); return targetRole; } public void setTargetRole(String value) { - targetRole = value; + registerModifiedProperty("targetRole"); + this.targetRole = value; } public String getUpdatedBy() { + checkSpecifiedProperty("updatedBy"); return updatedBy; } public void setUpdatedBy(String value) { - updatedBy = value; + registerModifiedProperty("updatedBy"); + this.updatedBy = value; } public Long getUpdatedTime() { + checkSpecifiedProperty("updatedTime"); return updatedTime; } public void setUpdatedTime(Long value) { - updatedTime = value; + registerModifiedProperty("updatedTime"); + this.updatedTime = value; } @Override @@ -153,8 +171,8 @@ public class BsSuggestElevateWord extends AbstractEntity { if (createdTime != null) { sourceMap.put("createdTime", createdTime); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (reading != null) { sourceMap.put("reading", reading); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsUserInfo.java b/src/main/java/org/codelibs/fess/es/bsentity/BsUserInfo.java index 26d345535..db72313c2 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsUserInfo.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsUserInfo.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -32,9 +33,6 @@ public class BsUserInfo extends AbstractEntity { /** createdTime */ protected Long createdTime; - /** id */ - protected String id; - /** updatedTime */ protected Long updatedTime; @@ -44,35 +42,43 @@ public class BsUserInfo extends AbstractEntity { // Accessor // ======== public String getCode() { + checkSpecifiedProperty("code"); return code; } public void setCode(String value) { - code = value; + registerModifiedProperty("code"); + this.code = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public Long getUpdatedTime() { + checkSpecifiedProperty("updatedTime"); return updatedTime; } public void setUpdatedTime(Long value) { - updatedTime = value; + registerModifiedProperty("updatedTime"); + this.updatedTime = value; } @Override @@ -84,8 +90,8 @@ public class BsUserInfo extends AbstractEntity { if (createdTime != null) { sourceMap.put("createdTime", createdTime); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (updatedTime != null) { sourceMap.put("updatedTime", updatedTime); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsWebAuthentication.java b/src/main/java/org/codelibs/fess/es/bsentity/BsWebAuthentication.java index 89eacb30d..5b8afa1f3 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsWebAuthentication.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsWebAuthentication.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -38,9 +39,6 @@ public class BsWebAuthentication extends AbstractEntity { /** hostname */ protected String hostname; - /** id */ - protected String id; - /** parameters */ protected String parameters; @@ -71,107 +69,133 @@ public class BsWebAuthentication extends AbstractEntity { // Accessor // ======== public String getAuthRealm() { + checkSpecifiedProperty("authRealm"); return authRealm; } public void setAuthRealm(String value) { - authRealm = value; + registerModifiedProperty("authRealm"); + this.authRealm = value; } public String getCreatedBy() { + checkSpecifiedProperty("createdBy"); return createdBy; } public void setCreatedBy(String value) { - createdBy = value; + registerModifiedProperty("createdBy"); + this.createdBy = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public String getHostname() { + checkSpecifiedProperty("hostname"); return hostname; } public void setHostname(String value) { - hostname = value; + registerModifiedProperty("hostname"); + this.hostname = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getParameters() { + checkSpecifiedProperty("parameters"); return parameters; } public void setParameters(String value) { - parameters = value; + registerModifiedProperty("parameters"); + this.parameters = value; } public String getPassword() { + checkSpecifiedProperty("password"); return password; } public void setPassword(String value) { - password = value; + registerModifiedProperty("password"); + this.password = value; } public Integer getPort() { + checkSpecifiedProperty("port"); return port; } public void setPort(Integer value) { - port = value; + registerModifiedProperty("port"); + this.port = value; } public String getProtocolScheme() { + checkSpecifiedProperty("protocolScheme"); return protocolScheme; } public void setProtocolScheme(String value) { - protocolScheme = value; + registerModifiedProperty("protocolScheme"); + this.protocolScheme = value; } public String getUpdatedBy() { + checkSpecifiedProperty("updatedBy"); return updatedBy; } public void setUpdatedBy(String value) { - updatedBy = value; + registerModifiedProperty("updatedBy"); + this.updatedBy = value; } public Long getUpdatedTime() { + checkSpecifiedProperty("updatedTime"); return updatedTime; } public void setUpdatedTime(Long value) { - updatedTime = value; + registerModifiedProperty("updatedTime"); + this.updatedTime = value; } public String getUsername() { + checkSpecifiedProperty("username"); return username; } public void setUsername(String value) { - username = value; + registerModifiedProperty("username"); + this.username = value; } public String getWebConfigId() { + checkSpecifiedProperty("webConfigId"); return webConfigId; } public void setWebConfigId(String value) { - webConfigId = value; + registerModifiedProperty("webConfigId"); + this.webConfigId = value; } @Override @@ -189,8 +213,8 @@ public class BsWebAuthentication extends AbstractEntity { if (hostname != null) { sourceMap.put("hostname", hostname); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (parameters != null) { sourceMap.put("parameters", parameters); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsWebConfig.java b/src/main/java/org/codelibs/fess/es/bsentity/BsWebConfig.java index c38a33c67..5a0176846 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsWebConfig.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsWebConfig.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -50,9 +51,6 @@ public class BsWebConfig extends AbstractEntity { /** excludedUrls */ protected String excludedUrls; - /** id */ - protected String id; - /** includedDocUrls */ protected String includedDocUrls; @@ -92,163 +90,203 @@ public class BsWebConfig extends AbstractEntity { // Accessor // ======== public Boolean getAvailable() { + checkSpecifiedProperty("available"); return available; } public void setAvailable(Boolean value) { - available = value; + registerModifiedProperty("available"); + this.available = value; } public Float getBoost() { + checkSpecifiedProperty("boost"); return boost; } public void setBoost(Float value) { - boost = value; + registerModifiedProperty("boost"); + this.boost = value; } public String getConfigParameter() { + checkSpecifiedProperty("configParameter"); return configParameter; } public void setConfigParameter(String value) { - configParameter = value; + registerModifiedProperty("configParameter"); + this.configParameter = value; } public String getCreatedBy() { + checkSpecifiedProperty("createdBy"); return createdBy; } public void setCreatedBy(String value) { - createdBy = value; + registerModifiedProperty("createdBy"); + this.createdBy = value; } public Long getCreatedTime() { + checkSpecifiedProperty("createdTime"); return createdTime; } public void setCreatedTime(Long value) { - createdTime = value; + registerModifiedProperty("createdTime"); + this.createdTime = value; } public Integer getDepth() { + checkSpecifiedProperty("depth"); return depth; } public void setDepth(Integer value) { - depth = value; + registerModifiedProperty("depth"); + this.depth = value; } public String getExcludedDocUrls() { + checkSpecifiedProperty("excludedDocUrls"); return excludedDocUrls; } public void setExcludedDocUrls(String value) { - excludedDocUrls = value; + registerModifiedProperty("excludedDocUrls"); + this.excludedDocUrls = value; } public String getExcludedUrls() { + checkSpecifiedProperty("excludedUrls"); return excludedUrls; } public void setExcludedUrls(String value) { - excludedUrls = value; + registerModifiedProperty("excludedUrls"); + this.excludedUrls = value; } public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getIncludedDocUrls() { + checkSpecifiedProperty("includedDocUrls"); return includedDocUrls; } public void setIncludedDocUrls(String value) { - includedDocUrls = value; + registerModifiedProperty("includedDocUrls"); + this.includedDocUrls = value; } public String getIncludedUrls() { + checkSpecifiedProperty("includedUrls"); return includedUrls; } public void setIncludedUrls(String value) { - includedUrls = value; + registerModifiedProperty("includedUrls"); + this.includedUrls = value; } public Integer getIntervalTime() { + checkSpecifiedProperty("intervalTime"); return intervalTime; } public void setIntervalTime(Integer value) { - intervalTime = value; + registerModifiedProperty("intervalTime"); + this.intervalTime = value; } public Long getMaxAccessCount() { + checkSpecifiedProperty("maxAccessCount"); return maxAccessCount; } public void setMaxAccessCount(Long value) { - maxAccessCount = value; + registerModifiedProperty("maxAccessCount"); + this.maxAccessCount = value; } public String getName() { + checkSpecifiedProperty("name"); return name; } public void setName(String value) { - name = value; + registerModifiedProperty("name"); + this.name = value; } public Integer getNumOfThread() { + checkSpecifiedProperty("numOfThread"); return numOfThread; } public void setNumOfThread(Integer value) { - numOfThread = value; + registerModifiedProperty("numOfThread"); + this.numOfThread = value; } public Integer getSortOrder() { + checkSpecifiedProperty("sortOrder"); return sortOrder; } public void setSortOrder(Integer value) { - sortOrder = value; + registerModifiedProperty("sortOrder"); + this.sortOrder = value; } public String getUpdatedBy() { + checkSpecifiedProperty("updatedBy"); return updatedBy; } public void setUpdatedBy(String value) { - updatedBy = value; + registerModifiedProperty("updatedBy"); + this.updatedBy = value; } public Long getUpdatedTime() { + checkSpecifiedProperty("updatedTime"); return updatedTime; } public void setUpdatedTime(Long value) { - updatedTime = value; + registerModifiedProperty("updatedTime"); + this.updatedTime = value; } public String getUrls() { + checkSpecifiedProperty("urls"); return urls; } public void setUrls(String value) { - urls = value; + registerModifiedProperty("urls"); + this.urls = value; } public String getUserAgent() { + checkSpecifiedProperty("userAgent"); return userAgent; } public void setUserAgent(String value) { - userAgent = value; + registerModifiedProperty("userAgent"); + this.userAgent = value; } @Override @@ -278,8 +316,8 @@ public class BsWebConfig extends AbstractEntity { if (excludedUrls != null) { sourceMap.put("excludedUrls", excludedUrls); } - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (includedDocUrls != null) { sourceMap.put("includedDocUrls", includedDocUrls); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsWebConfigToLabel.java b/src/main/java/org/codelibs/fess/es/bsentity/BsWebConfigToLabel.java index f20be5687..368fc2264 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsWebConfigToLabel.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsWebConfigToLabel.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -26,9 +27,6 @@ public class BsWebConfigToLabel extends AbstractEntity { // =================================================================================== // Attribute // ========= - /** id */ - protected String id; - /** labelTypeId */ protected String labelTypeId; @@ -41,34 +39,40 @@ public class BsWebConfigToLabel extends AbstractEntity { // Accessor // ======== public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getLabelTypeId() { + checkSpecifiedProperty("labelTypeId"); return labelTypeId; } public void setLabelTypeId(String value) { - labelTypeId = value; + registerModifiedProperty("labelTypeId"); + this.labelTypeId = value; } public String getWebConfigId() { + checkSpecifiedProperty("webConfigId"); return webConfigId; } public void setWebConfigId(String value) { - webConfigId = value; + registerModifiedProperty("webConfigId"); + this.webConfigId = value; } @Override public Map toSource() { Map sourceMap = new HashMap<>(); - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (labelTypeId != null) { sourceMap.put("labelTypeId", labelTypeId); diff --git a/src/main/java/org/codelibs/fess/es/bsentity/BsWebConfigToRole.java b/src/main/java/org/codelibs/fess/es/bsentity/BsWebConfigToRole.java index f35973264..9e79081fc 100644 --- a/src/main/java/org/codelibs/fess/es/bsentity/BsWebConfigToRole.java +++ b/src/main/java/org/codelibs/fess/es/bsentity/BsWebConfigToRole.java @@ -1,5 +1,6 @@ package org.codelibs.fess.es.bsentity; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; @@ -26,9 +27,6 @@ public class BsWebConfigToRole extends AbstractEntity { // =================================================================================== // Attribute // ========= - /** id */ - protected String id; - /** roleTypeId */ protected String roleTypeId; @@ -41,34 +39,40 @@ public class BsWebConfigToRole extends AbstractEntity { // Accessor // ======== public String getId() { - return id; + checkSpecifiedProperty("id"); + return asDocMeta().id(); } public void setId(String value) { - id = value; + registerModifiedProperty("id"); + asDocMeta().id(value); } public String getRoleTypeId() { + checkSpecifiedProperty("roleTypeId"); return roleTypeId; } public void setRoleTypeId(String value) { - roleTypeId = value; + registerModifiedProperty("roleTypeId"); + this.roleTypeId = value; } public String getWebConfigId() { + checkSpecifiedProperty("webConfigId"); return webConfigId; } public void setWebConfigId(String value) { - webConfigId = value; + registerModifiedProperty("webConfigId"); + this.webConfigId = value; } @Override public Map toSource() { Map sourceMap = new HashMap<>(); - if (id != null) { - sourceMap.put("id", id); + if (asDocMeta().id() != null) { + sourceMap.put("id", asDocMeta().id()); } if (roleTypeId != null) { sourceMap.put("roleTypeId", roleTypeId); diff --git a/src/main/java/org/codelibs/fess/es/cbean/bs/BsSearchLogCB.java b/src/main/java/org/codelibs/fess/es/cbean/bs/BsSearchLogCB.java index bdbd47366..6b555ed46 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/bs/BsSearchLogCB.java +++ b/src/main/java/org/codelibs/fess/es/cbean/bs/BsSearchLogCB.java @@ -167,8 +167,8 @@ public class BsSearchLogCB extends AbstractConditionBean { doColumn("userAgent"); } - public void columnUserId() { - doColumn("userId"); + public void columnUserInfoId() { + doColumn("userInfoId"); } public void columnUserSessionId() { diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsBoostDocumentRuleCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsBoostDocumentRuleCF.java index 4aa0f1753..72e17d892 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsBoostDocumentRuleCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsBoostDocumentRuleCF.java @@ -106,6 +106,25 @@ public abstract class BsBoostDocumentRuleCF extends AbstractConditionFilter { } } + public void setBoostExpr_NotEqual(String boostExpr) { + setBoostExpr_NotEqual(boostExpr, null, null); + } + + public void setBoostExpr_NotEqual(String boostExpr, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setBoostExpr_Equal(boostExpr, eqOpLambda); + }, notOpLambda); + } + + public void setBoostExpr_Equal(String boostExpr) { + setBoostExpr_Term(boostExpr, null); + } + + public void setBoostExpr_Equal(String boostExpr, ConditionOptionCall opLambda) { + setBoostExpr_Term(boostExpr, opLambda); + } + public void setBoostExpr_Term(String boostExpr) { setBoostExpr_Term(boostExpr, null); } @@ -213,6 +232,25 @@ public abstract class BsBoostDocumentRuleCF extends AbstractConditionFilter { } } + public void setCreatedBy_NotEqual(String createdBy) { + setCreatedBy_NotEqual(createdBy, null, null); + } + + public void setCreatedBy_NotEqual(String createdBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedBy_Equal(createdBy, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -320,6 +358,25 @@ public abstract class BsBoostDocumentRuleCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -416,6 +473,25 @@ public abstract class BsBoostDocumentRuleCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -523,6 +599,25 @@ public abstract class BsBoostDocumentRuleCF extends AbstractConditionFilter { } } + public void setSortOrder_NotEqual(Integer sortOrder) { + setSortOrder_NotEqual(sortOrder, null, null); + } + + public void setSortOrder_NotEqual(Integer sortOrder, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setSortOrder_Equal(sortOrder, eqOpLambda); + }, notOpLambda); + } + + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -619,6 +714,25 @@ public abstract class BsBoostDocumentRuleCF extends AbstractConditionFilter { } } + public void setUpdatedBy_NotEqual(String updatedBy) { + setUpdatedBy_NotEqual(updatedBy, null, null); + } + + public void setUpdatedBy_NotEqual(String updatedBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedBy_Equal(updatedBy, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -726,6 +840,25 @@ public abstract class BsBoostDocumentRuleCF extends AbstractConditionFilter { } } + public void setUpdatedTime_NotEqual(Long updatedTime) { + setUpdatedTime_NotEqual(updatedTime, null, null); + } + + public void setUpdatedTime_NotEqual(Long updatedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedTime_Equal(updatedTime, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } @@ -822,6 +955,25 @@ public abstract class BsBoostDocumentRuleCF extends AbstractConditionFilter { } } + public void setUrlExpr_NotEqual(String urlExpr) { + setUrlExpr_NotEqual(urlExpr, null, null); + } + + public void setUrlExpr_NotEqual(String urlExpr, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUrlExpr_Equal(urlExpr, eqOpLambda); + }, notOpLambda); + } + + public void setUrlExpr_Equal(String urlExpr) { + setUrlExpr_Term(urlExpr, null); + } + + public void setUrlExpr_Equal(String urlExpr, ConditionOptionCall opLambda) { + setUrlExpr_Term(urlExpr, opLambda); + } + public void setUrlExpr_Term(String urlExpr) { setUrlExpr_Term(urlExpr, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsClickLogCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsClickLogCF.java index 8002f47dd..308f9a9d4 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsClickLogCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsClickLogCF.java @@ -106,6 +106,25 @@ public abstract class BsClickLogCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -213,6 +232,25 @@ public abstract class BsClickLogCF extends AbstractConditionFilter { } } + public void setRequestedTime_NotEqual(Long requestedTime) { + setRequestedTime_NotEqual(requestedTime, null, null); + } + + public void setRequestedTime_NotEqual(Long requestedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setRequestedTime_Equal(requestedTime, eqOpLambda); + }, notOpLambda); + } + + public void setRequestedTime_Equal(Long requestedTime) { + setRequestedTime_Term(requestedTime, null); + } + + public void setRequestedTime_Equal(Long requestedTime, ConditionOptionCall opLambda) { + setRequestedTime_Term(requestedTime, opLambda); + } + public void setRequestedTime_Term(Long requestedTime) { setRequestedTime_Term(requestedTime, null); } @@ -309,6 +347,25 @@ public abstract class BsClickLogCF extends AbstractConditionFilter { } } + public void setSearchLogId_NotEqual(String searchLogId) { + setSearchLogId_NotEqual(searchLogId, null, null); + } + + public void setSearchLogId_NotEqual(String searchLogId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setSearchLogId_Equal(searchLogId, eqOpLambda); + }, notOpLambda); + } + + public void setSearchLogId_Equal(String searchLogId) { + setSearchLogId_Term(searchLogId, null); + } + + public void setSearchLogId_Equal(String searchLogId, ConditionOptionCall opLambda) { + setSearchLogId_Term(searchLogId, opLambda); + } + public void setSearchLogId_Term(String searchLogId) { setSearchLogId_Term(searchLogId, null); } @@ -416,6 +473,25 @@ public abstract class BsClickLogCF extends AbstractConditionFilter { } } + public void setUrl_NotEqual(String url) { + setUrl_NotEqual(url, null, null); + } + + public void setUrl_NotEqual(String url, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUrl_Equal(url, eqOpLambda); + }, notOpLambda); + } + + public void setUrl_Equal(String url) { + setUrl_Term(url, null); + } + + public void setUrl_Equal(String url, ConditionOptionCall opLambda) { + setUrl_Term(url, opLambda); + } + public void setUrl_Term(String url) { setUrl_Term(url, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsCrawlingSessionCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsCrawlingSessionCF.java index c559b768e..7f2a00fda 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsCrawlingSessionCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsCrawlingSessionCF.java @@ -106,6 +106,25 @@ public abstract class BsCrawlingSessionCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -202,6 +221,25 @@ public abstract class BsCrawlingSessionCF extends AbstractConditionFilter { } } + public void setExpiredTime_NotEqual(Long expiredTime) { + setExpiredTime_NotEqual(expiredTime, null, null); + } + + public void setExpiredTime_NotEqual(Long expiredTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setExpiredTime_Equal(expiredTime, eqOpLambda); + }, notOpLambda); + } + + public void setExpiredTime_Equal(Long expiredTime) { + setExpiredTime_Term(expiredTime, null); + } + + public void setExpiredTime_Equal(Long expiredTime, ConditionOptionCall opLambda) { + setExpiredTime_Term(expiredTime, opLambda); + } + public void setExpiredTime_Term(Long expiredTime) { setExpiredTime_Term(expiredTime, null); } @@ -298,6 +336,25 @@ public abstract class BsCrawlingSessionCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -405,6 +462,25 @@ public abstract class BsCrawlingSessionCF extends AbstractConditionFilter { } } + public void setName_NotEqual(String name) { + setName_NotEqual(name, null, null); + } + + public void setName_NotEqual(String name, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setName_Equal(name, eqOpLambda); + }, notOpLambda); + } + + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -512,6 +588,25 @@ public abstract class BsCrawlingSessionCF extends AbstractConditionFilter { } } + public void setSessionId_NotEqual(String sessionId) { + setSessionId_NotEqual(sessionId, null, null); + } + + public void setSessionId_NotEqual(String sessionId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setSessionId_Equal(sessionId, eqOpLambda); + }, notOpLambda); + } + + public void setSessionId_Equal(String sessionId) { + setSessionId_Term(sessionId, null); + } + + public void setSessionId_Equal(String sessionId, ConditionOptionCall opLambda) { + setSessionId_Term(sessionId, opLambda); + } + public void setSessionId_Term(String sessionId) { setSessionId_Term(sessionId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsCrawlingSessionInfoCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsCrawlingSessionInfoCF.java index df4f1a0b9..91e91a98c 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsCrawlingSessionInfoCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsCrawlingSessionInfoCF.java @@ -106,6 +106,25 @@ public abstract class BsCrawlingSessionInfoCF extends AbstractConditionFilter { } } + public void setCrawlingSessionId_NotEqual(String crawlingSessionId) { + setCrawlingSessionId_NotEqual(crawlingSessionId, null, null); + } + + public void setCrawlingSessionId_NotEqual(String crawlingSessionId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCrawlingSessionId_Equal(crawlingSessionId, eqOpLambda); + }, notOpLambda); + } + + public void setCrawlingSessionId_Equal(String crawlingSessionId) { + setCrawlingSessionId_Term(crawlingSessionId, null); + } + + public void setCrawlingSessionId_Equal(String crawlingSessionId, ConditionOptionCall opLambda) { + setCrawlingSessionId_Term(crawlingSessionId, opLambda); + } + public void setCrawlingSessionId_Term(String crawlingSessionId) { setCrawlingSessionId_Term(crawlingSessionId, null); } @@ -213,6 +232,25 @@ public abstract class BsCrawlingSessionInfoCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -309,6 +347,25 @@ public abstract class BsCrawlingSessionInfoCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -416,6 +473,25 @@ public abstract class BsCrawlingSessionInfoCF extends AbstractConditionFilter { } } + public void setKey_NotEqual(String key) { + setKey_NotEqual(key, null, null); + } + + public void setKey_NotEqual(String key, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setKey_Equal(key, eqOpLambda); + }, notOpLambda); + } + + public void setKey_Equal(String key) { + setKey_Term(key, null); + } + + public void setKey_Equal(String key, ConditionOptionCall opLambda) { + setKey_Term(key, opLambda); + } + public void setKey_Term(String key) { setKey_Term(key, null); } @@ -523,6 +599,25 @@ public abstract class BsCrawlingSessionInfoCF extends AbstractConditionFilter { } } + public void setValue_NotEqual(String value) { + setValue_NotEqual(value, null, null); + } + + public void setValue_NotEqual(String value, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setValue_Equal(value, eqOpLambda); + }, notOpLambda); + } + + public void setValue_Equal(String value) { + setValue_Term(value, null); + } + + public void setValue_Equal(String value, ConditionOptionCall opLambda) { + setValue_Term(value, opLambda); + } + public void setValue_Term(String value) { setValue_Term(value, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsDataConfigCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsDataConfigCF.java index 8787a69a3..7716cd0d9 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsDataConfigCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsDataConfigCF.java @@ -106,6 +106,25 @@ public abstract class BsDataConfigCF extends AbstractConditionFilter { } } + public void setAvailable_NotEqual(Boolean available) { + setAvailable_NotEqual(available, null, null); + } + + public void setAvailable_NotEqual(Boolean available, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setAvailable_Equal(available, eqOpLambda); + }, notOpLambda); + } + + public void setAvailable_Equal(Boolean available) { + setAvailable_Term(available, null); + } + + public void setAvailable_Equal(Boolean available, ConditionOptionCall opLambda) { + setAvailable_Term(available, opLambda); + } + public void setAvailable_Term(Boolean available) { setAvailable_Term(available, null); } @@ -202,6 +221,25 @@ public abstract class BsDataConfigCF extends AbstractConditionFilter { } } + public void setBoost_NotEqual(Float boost) { + setBoost_NotEqual(boost, null, null); + } + + public void setBoost_NotEqual(Float boost, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setBoost_Equal(boost, eqOpLambda); + }, notOpLambda); + } + + public void setBoost_Equal(Float boost) { + setBoost_Term(boost, null); + } + + public void setBoost_Equal(Float boost, ConditionOptionCall opLambda) { + setBoost_Term(boost, opLambda); + } + public void setBoost_Term(Float boost) { setBoost_Term(boost, null); } @@ -298,6 +336,25 @@ public abstract class BsDataConfigCF extends AbstractConditionFilter { } } + public void setCreatedBy_NotEqual(String createdBy) { + setCreatedBy_NotEqual(createdBy, null, null); + } + + public void setCreatedBy_NotEqual(String createdBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedBy_Equal(createdBy, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -405,6 +462,25 @@ public abstract class BsDataConfigCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -501,6 +577,25 @@ public abstract class BsDataConfigCF extends AbstractConditionFilter { } } + public void setHandlerName_NotEqual(String handlerName) { + setHandlerName_NotEqual(handlerName, null, null); + } + + public void setHandlerName_NotEqual(String handlerName, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setHandlerName_Equal(handlerName, eqOpLambda); + }, notOpLambda); + } + + public void setHandlerName_Equal(String handlerName) { + setHandlerName_Term(handlerName, null); + } + + public void setHandlerName_Equal(String handlerName, ConditionOptionCall opLambda) { + setHandlerName_Term(handlerName, opLambda); + } + public void setHandlerName_Term(String handlerName) { setHandlerName_Term(handlerName, null); } @@ -608,6 +703,25 @@ public abstract class BsDataConfigCF extends AbstractConditionFilter { } } + public void setHandlerParameter_NotEqual(String handlerParameter) { + setHandlerParameter_NotEqual(handlerParameter, null, null); + } + + public void setHandlerParameter_NotEqual(String handlerParameter, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setHandlerParameter_Equal(handlerParameter, eqOpLambda); + }, notOpLambda); + } + + public void setHandlerParameter_Equal(String handlerParameter) { + setHandlerParameter_Term(handlerParameter, null); + } + + public void setHandlerParameter_Equal(String handlerParameter, ConditionOptionCall opLambda) { + setHandlerParameter_Term(handlerParameter, opLambda); + } + public void setHandlerParameter_Term(String handlerParameter) { setHandlerParameter_Term(handlerParameter, null); } @@ -715,6 +829,25 @@ public abstract class BsDataConfigCF extends AbstractConditionFilter { } } + public void setHandlerScript_NotEqual(String handlerScript) { + setHandlerScript_NotEqual(handlerScript, null, null); + } + + public void setHandlerScript_NotEqual(String handlerScript, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setHandlerScript_Equal(handlerScript, eqOpLambda); + }, notOpLambda); + } + + public void setHandlerScript_Equal(String handlerScript) { + setHandlerScript_Term(handlerScript, null); + } + + public void setHandlerScript_Equal(String handlerScript, ConditionOptionCall opLambda) { + setHandlerScript_Term(handlerScript, opLambda); + } + public void setHandlerScript_Term(String handlerScript) { setHandlerScript_Term(handlerScript, null); } @@ -822,6 +955,25 @@ public abstract class BsDataConfigCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -929,6 +1081,25 @@ public abstract class BsDataConfigCF extends AbstractConditionFilter { } } + public void setName_NotEqual(String name) { + setName_NotEqual(name, null, null); + } + + public void setName_NotEqual(String name, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setName_Equal(name, eqOpLambda); + }, notOpLambda); + } + + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -1036,6 +1207,25 @@ public abstract class BsDataConfigCF extends AbstractConditionFilter { } } + public void setSortOrder_NotEqual(Integer sortOrder) { + setSortOrder_NotEqual(sortOrder, null, null); + } + + public void setSortOrder_NotEqual(Integer sortOrder, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setSortOrder_Equal(sortOrder, eqOpLambda); + }, notOpLambda); + } + + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -1132,6 +1322,25 @@ public abstract class BsDataConfigCF extends AbstractConditionFilter { } } + public void setUpdatedBy_NotEqual(String updatedBy) { + setUpdatedBy_NotEqual(updatedBy, null, null); + } + + public void setUpdatedBy_NotEqual(String updatedBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedBy_Equal(updatedBy, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1239,6 +1448,25 @@ public abstract class BsDataConfigCF extends AbstractConditionFilter { } } + public void setUpdatedTime_NotEqual(Long updatedTime) { + setUpdatedTime_NotEqual(updatedTime, null, null); + } + + public void setUpdatedTime_NotEqual(Long updatedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedTime_Equal(updatedTime, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsDataConfigToLabelCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsDataConfigToLabelCF.java index 34501c728..b4fa132e9 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsDataConfigToLabelCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsDataConfigToLabelCF.java @@ -106,6 +106,25 @@ public abstract class BsDataConfigToLabelCF extends AbstractConditionFilter { } } + public void setDataConfigId_NotEqual(String dataConfigId) { + setDataConfigId_NotEqual(dataConfigId, null, null); + } + + public void setDataConfigId_NotEqual(String dataConfigId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setDataConfigId_Equal(dataConfigId, eqOpLambda); + }, notOpLambda); + } + + public void setDataConfigId_Equal(String dataConfigId) { + setDataConfigId_Term(dataConfigId, null); + } + + public void setDataConfigId_Equal(String dataConfigId, ConditionOptionCall opLambda) { + setDataConfigId_Term(dataConfigId, opLambda); + } + public void setDataConfigId_Term(String dataConfigId) { setDataConfigId_Term(dataConfigId, null); } @@ -213,6 +232,25 @@ public abstract class BsDataConfigToLabelCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -320,6 +358,25 @@ public abstract class BsDataConfigToLabelCF extends AbstractConditionFilter { } } + public void setLabelTypeId_NotEqual(String labelTypeId) { + setLabelTypeId_NotEqual(labelTypeId, null, null); + } + + public void setLabelTypeId_NotEqual(String labelTypeId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setLabelTypeId_Equal(labelTypeId, eqOpLambda); + }, notOpLambda); + } + + public void setLabelTypeId_Equal(String labelTypeId) { + setLabelTypeId_Term(labelTypeId, null); + } + + public void setLabelTypeId_Equal(String labelTypeId, ConditionOptionCall opLambda) { + setLabelTypeId_Term(labelTypeId, opLambda); + } + public void setLabelTypeId_Term(String labelTypeId) { setLabelTypeId_Term(labelTypeId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsDataConfigToRoleCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsDataConfigToRoleCF.java index d2e2863cc..2b99e9dd5 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsDataConfigToRoleCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsDataConfigToRoleCF.java @@ -106,6 +106,25 @@ public abstract class BsDataConfigToRoleCF extends AbstractConditionFilter { } } + public void setDataConfigId_NotEqual(String dataConfigId) { + setDataConfigId_NotEqual(dataConfigId, null, null); + } + + public void setDataConfigId_NotEqual(String dataConfigId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setDataConfigId_Equal(dataConfigId, eqOpLambda); + }, notOpLambda); + } + + public void setDataConfigId_Equal(String dataConfigId) { + setDataConfigId_Term(dataConfigId, null); + } + + public void setDataConfigId_Equal(String dataConfigId, ConditionOptionCall opLambda) { + setDataConfigId_Term(dataConfigId, opLambda); + } + public void setDataConfigId_Term(String dataConfigId) { setDataConfigId_Term(dataConfigId, null); } @@ -213,6 +232,25 @@ public abstract class BsDataConfigToRoleCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -320,6 +358,25 @@ public abstract class BsDataConfigToRoleCF extends AbstractConditionFilter { } } + public void setRoleTypeId_NotEqual(String roleTypeId) { + setRoleTypeId_NotEqual(roleTypeId, null, null); + } + + public void setRoleTypeId_NotEqual(String roleTypeId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setRoleTypeId_Equal(roleTypeId, eqOpLambda); + }, notOpLambda); + } + + public void setRoleTypeId_Equal(String roleTypeId) { + setRoleTypeId_Term(roleTypeId, null); + } + + public void setRoleTypeId_Equal(String roleTypeId, ConditionOptionCall opLambda) { + setRoleTypeId_Term(roleTypeId, opLambda); + } + public void setRoleTypeId_Term(String roleTypeId) { setRoleTypeId_Term(roleTypeId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFailureUrlCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFailureUrlCF.java index 25d8ed628..7b0869d95 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFailureUrlCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFailureUrlCF.java @@ -106,6 +106,25 @@ public abstract class BsFailureUrlCF extends AbstractConditionFilter { } } + public void setConfigId_NotEqual(String configId) { + setConfigId_NotEqual(configId, null, null); + } + + public void setConfigId_NotEqual(String configId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setConfigId_Equal(configId, eqOpLambda); + }, notOpLambda); + } + + public void setConfigId_Equal(String configId) { + setConfigId_Term(configId, null); + } + + public void setConfigId_Equal(String configId, ConditionOptionCall opLambda) { + setConfigId_Term(configId, opLambda); + } + public void setConfigId_Term(String configId) { setConfigId_Term(configId, null); } @@ -213,6 +232,25 @@ public abstract class BsFailureUrlCF extends AbstractConditionFilter { } } + public void setErrorCount_NotEqual(Integer errorCount) { + setErrorCount_NotEqual(errorCount, null, null); + } + + public void setErrorCount_NotEqual(Integer errorCount, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setErrorCount_Equal(errorCount, eqOpLambda); + }, notOpLambda); + } + + public void setErrorCount_Equal(Integer errorCount) { + setErrorCount_Term(errorCount, null); + } + + public void setErrorCount_Equal(Integer errorCount, ConditionOptionCall opLambda) { + setErrorCount_Term(errorCount, opLambda); + } + public void setErrorCount_Term(Integer errorCount) { setErrorCount_Term(errorCount, null); } @@ -309,6 +347,25 @@ public abstract class BsFailureUrlCF extends AbstractConditionFilter { } } + public void setErrorLog_NotEqual(String errorLog) { + setErrorLog_NotEqual(errorLog, null, null); + } + + public void setErrorLog_NotEqual(String errorLog, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setErrorLog_Equal(errorLog, eqOpLambda); + }, notOpLambda); + } + + public void setErrorLog_Equal(String errorLog) { + setErrorLog_Term(errorLog, null); + } + + public void setErrorLog_Equal(String errorLog, ConditionOptionCall opLambda) { + setErrorLog_Term(errorLog, opLambda); + } + public void setErrorLog_Term(String errorLog) { setErrorLog_Term(errorLog, null); } @@ -416,6 +473,25 @@ public abstract class BsFailureUrlCF extends AbstractConditionFilter { } } + public void setErrorName_NotEqual(String errorName) { + setErrorName_NotEqual(errorName, null, null); + } + + public void setErrorName_NotEqual(String errorName, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setErrorName_Equal(errorName, eqOpLambda); + }, notOpLambda); + } + + public void setErrorName_Equal(String errorName) { + setErrorName_Term(errorName, null); + } + + public void setErrorName_Equal(String errorName, ConditionOptionCall opLambda) { + setErrorName_Term(errorName, opLambda); + } + public void setErrorName_Term(String errorName) { setErrorName_Term(errorName, null); } @@ -523,6 +599,25 @@ public abstract class BsFailureUrlCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -630,6 +725,25 @@ public abstract class BsFailureUrlCF extends AbstractConditionFilter { } } + public void setLastAccessTime_NotEqual(Long lastAccessTime) { + setLastAccessTime_NotEqual(lastAccessTime, null, null); + } + + public void setLastAccessTime_NotEqual(Long lastAccessTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setLastAccessTime_Equal(lastAccessTime, eqOpLambda); + }, notOpLambda); + } + + public void setLastAccessTime_Equal(Long lastAccessTime) { + setLastAccessTime_Term(lastAccessTime, null); + } + + public void setLastAccessTime_Equal(Long lastAccessTime, ConditionOptionCall opLambda) { + setLastAccessTime_Term(lastAccessTime, opLambda); + } + public void setLastAccessTime_Term(Long lastAccessTime) { setLastAccessTime_Term(lastAccessTime, null); } @@ -726,6 +840,25 @@ public abstract class BsFailureUrlCF extends AbstractConditionFilter { } } + public void setThreadName_NotEqual(String threadName) { + setThreadName_NotEqual(threadName, null, null); + } + + public void setThreadName_NotEqual(String threadName, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setThreadName_Equal(threadName, eqOpLambda); + }, notOpLambda); + } + + public void setThreadName_Equal(String threadName) { + setThreadName_Term(threadName, null); + } + + public void setThreadName_Equal(String threadName, ConditionOptionCall opLambda) { + setThreadName_Term(threadName, opLambda); + } + public void setThreadName_Term(String threadName) { setThreadName_Term(threadName, null); } @@ -833,6 +966,25 @@ public abstract class BsFailureUrlCF extends AbstractConditionFilter { } } + public void setUrl_NotEqual(String url) { + setUrl_NotEqual(url, null, null); + } + + public void setUrl_NotEqual(String url, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUrl_Equal(url, eqOpLambda); + }, notOpLambda); + } + + public void setUrl_Equal(String url) { + setUrl_Term(url, null); + } + + public void setUrl_Equal(String url, ConditionOptionCall opLambda) { + setUrl_Term(url, opLambda); + } + public void setUrl_Term(String url) { setUrl_Term(url, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFavoriteLogCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFavoriteLogCF.java index af4f0098d..b3dfb54e5 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFavoriteLogCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFavoriteLogCF.java @@ -106,6 +106,25 @@ public abstract class BsFavoriteLogCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -202,6 +221,25 @@ public abstract class BsFavoriteLogCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -309,6 +347,25 @@ public abstract class BsFavoriteLogCF extends AbstractConditionFilter { } } + public void setUrl_NotEqual(String url) { + setUrl_NotEqual(url, null, null); + } + + public void setUrl_NotEqual(String url, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUrl_Equal(url, eqOpLambda); + }, notOpLambda); + } + + public void setUrl_Equal(String url) { + setUrl_Term(url, null); + } + + public void setUrl_Equal(String url, ConditionOptionCall opLambda) { + setUrl_Term(url, opLambda); + } + public void setUrl_Term(String url) { setUrl_Term(url, null); } @@ -416,6 +473,25 @@ public abstract class BsFavoriteLogCF extends AbstractConditionFilter { } } + public void setUserInfoId_NotEqual(String userInfoId) { + setUserInfoId_NotEqual(userInfoId, null, null); + } + + public void setUserInfoId_NotEqual(String userInfoId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUserInfoId_Equal(userInfoId, eqOpLambda); + }, notOpLambda); + } + + public void setUserInfoId_Equal(String userInfoId) { + setUserInfoId_Term(userInfoId, null); + } + + public void setUserInfoId_Equal(String userInfoId, ConditionOptionCall opLambda) { + setUserInfoId_Term(userInfoId, opLambda); + } + public void setUserInfoId_Term(String userInfoId) { setUserInfoId_Term(userInfoId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFileAuthenticationCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFileAuthenticationCF.java index f55f94779..35daa55fc 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFileAuthenticationCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFileAuthenticationCF.java @@ -106,6 +106,25 @@ public abstract class BsFileAuthenticationCF extends AbstractConditionFilter { } } + public void setCreatedBy_NotEqual(String createdBy) { + setCreatedBy_NotEqual(createdBy, null, null); + } + + public void setCreatedBy_NotEqual(String createdBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedBy_Equal(createdBy, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -213,6 +232,25 @@ public abstract class BsFileAuthenticationCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -309,6 +347,25 @@ public abstract class BsFileAuthenticationCF extends AbstractConditionFilter { } } + public void setFileConfigId_NotEqual(String fileConfigId) { + setFileConfigId_NotEqual(fileConfigId, null, null); + } + + public void setFileConfigId_NotEqual(String fileConfigId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setFileConfigId_Equal(fileConfigId, eqOpLambda); + }, notOpLambda); + } + + public void setFileConfigId_Equal(String fileConfigId) { + setFileConfigId_Term(fileConfigId, null); + } + + public void setFileConfigId_Equal(String fileConfigId, ConditionOptionCall opLambda) { + setFileConfigId_Term(fileConfigId, opLambda); + } + public void setFileConfigId_Term(String fileConfigId) { setFileConfigId_Term(fileConfigId, null); } @@ -416,6 +473,25 @@ public abstract class BsFileAuthenticationCF extends AbstractConditionFilter { } } + public void setHostname_NotEqual(String hostname) { + setHostname_NotEqual(hostname, null, null); + } + + public void setHostname_NotEqual(String hostname, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setHostname_Equal(hostname, eqOpLambda); + }, notOpLambda); + } + + public void setHostname_Equal(String hostname) { + setHostname_Term(hostname, null); + } + + public void setHostname_Equal(String hostname, ConditionOptionCall opLambda) { + setHostname_Term(hostname, opLambda); + } + public void setHostname_Term(String hostname) { setHostname_Term(hostname, null); } @@ -523,6 +599,25 @@ public abstract class BsFileAuthenticationCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -630,6 +725,25 @@ public abstract class BsFileAuthenticationCF extends AbstractConditionFilter { } } + public void setParameters_NotEqual(String parameters) { + setParameters_NotEqual(parameters, null, null); + } + + public void setParameters_NotEqual(String parameters, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setParameters_Equal(parameters, eqOpLambda); + }, notOpLambda); + } + + public void setParameters_Equal(String parameters) { + setParameters_Term(parameters, null); + } + + public void setParameters_Equal(String parameters, ConditionOptionCall opLambda) { + setParameters_Term(parameters, opLambda); + } + public void setParameters_Term(String parameters) { setParameters_Term(parameters, null); } @@ -737,6 +851,25 @@ public abstract class BsFileAuthenticationCF extends AbstractConditionFilter { } } + public void setPassword_NotEqual(String password) { + setPassword_NotEqual(password, null, null); + } + + public void setPassword_NotEqual(String password, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setPassword_Equal(password, eqOpLambda); + }, notOpLambda); + } + + public void setPassword_Equal(String password) { + setPassword_Term(password, null); + } + + public void setPassword_Equal(String password, ConditionOptionCall opLambda) { + setPassword_Term(password, opLambda); + } + public void setPassword_Term(String password) { setPassword_Term(password, null); } @@ -844,6 +977,25 @@ public abstract class BsFileAuthenticationCF extends AbstractConditionFilter { } } + public void setPort_NotEqual(Integer port) { + setPort_NotEqual(port, null, null); + } + + public void setPort_NotEqual(Integer port, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setPort_Equal(port, eqOpLambda); + }, notOpLambda); + } + + public void setPort_Equal(Integer port) { + setPort_Term(port, null); + } + + public void setPort_Equal(Integer port, ConditionOptionCall opLambda) { + setPort_Term(port, opLambda); + } + public void setPort_Term(Integer port) { setPort_Term(port, null); } @@ -940,6 +1092,25 @@ public abstract class BsFileAuthenticationCF extends AbstractConditionFilter { } } + public void setProtocolScheme_NotEqual(String protocolScheme) { + setProtocolScheme_NotEqual(protocolScheme, null, null); + } + + public void setProtocolScheme_NotEqual(String protocolScheme, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setProtocolScheme_Equal(protocolScheme, eqOpLambda); + }, notOpLambda); + } + + public void setProtocolScheme_Equal(String protocolScheme) { + setProtocolScheme_Term(protocolScheme, null); + } + + public void setProtocolScheme_Equal(String protocolScheme, ConditionOptionCall opLambda) { + setProtocolScheme_Term(protocolScheme, opLambda); + } + public void setProtocolScheme_Term(String protocolScheme) { setProtocolScheme_Term(protocolScheme, null); } @@ -1047,6 +1218,25 @@ public abstract class BsFileAuthenticationCF extends AbstractConditionFilter { } } + public void setUpdatedBy_NotEqual(String updatedBy) { + setUpdatedBy_NotEqual(updatedBy, null, null); + } + + public void setUpdatedBy_NotEqual(String updatedBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedBy_Equal(updatedBy, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1154,6 +1344,25 @@ public abstract class BsFileAuthenticationCF extends AbstractConditionFilter { } } + public void setUpdatedTime_NotEqual(Long updatedTime) { + setUpdatedTime_NotEqual(updatedTime, null, null); + } + + public void setUpdatedTime_NotEqual(Long updatedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedTime_Equal(updatedTime, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } @@ -1250,6 +1459,25 @@ public abstract class BsFileAuthenticationCF extends AbstractConditionFilter { } } + public void setUsername_NotEqual(String username) { + setUsername_NotEqual(username, null, null); + } + + public void setUsername_NotEqual(String username, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUsername_Equal(username, eqOpLambda); + }, notOpLambda); + } + + public void setUsername_Equal(String username) { + setUsername_Term(username, null); + } + + public void setUsername_Equal(String username, ConditionOptionCall opLambda) { + setUsername_Term(username, opLambda); + } + public void setUsername_Term(String username) { setUsername_Term(username, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFileConfigCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFileConfigCF.java index 681cac876..ac1738d70 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFileConfigCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFileConfigCF.java @@ -106,6 +106,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setAvailable_NotEqual(Boolean available) { + setAvailable_NotEqual(available, null, null); + } + + public void setAvailable_NotEqual(Boolean available, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setAvailable_Equal(available, eqOpLambda); + }, notOpLambda); + } + + public void setAvailable_Equal(Boolean available) { + setAvailable_Term(available, null); + } + + public void setAvailable_Equal(Boolean available, ConditionOptionCall opLambda) { + setAvailable_Term(available, opLambda); + } + public void setAvailable_Term(Boolean available) { setAvailable_Term(available, null); } @@ -202,6 +221,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setBoost_NotEqual(Float boost) { + setBoost_NotEqual(boost, null, null); + } + + public void setBoost_NotEqual(Float boost, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setBoost_Equal(boost, eqOpLambda); + }, notOpLambda); + } + + public void setBoost_Equal(Float boost) { + setBoost_Term(boost, null); + } + + public void setBoost_Equal(Float boost, ConditionOptionCall opLambda) { + setBoost_Term(boost, opLambda); + } + public void setBoost_Term(Float boost) { setBoost_Term(boost, null); } @@ -298,6 +336,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setConfigParameter_NotEqual(String configParameter) { + setConfigParameter_NotEqual(configParameter, null, null); + } + + public void setConfigParameter_NotEqual(String configParameter, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setConfigParameter_Equal(configParameter, eqOpLambda); + }, notOpLambda); + } + + public void setConfigParameter_Equal(String configParameter) { + setConfigParameter_Term(configParameter, null); + } + + public void setConfigParameter_Equal(String configParameter, ConditionOptionCall opLambda) { + setConfigParameter_Term(configParameter, opLambda); + } + public void setConfigParameter_Term(String configParameter) { setConfigParameter_Term(configParameter, null); } @@ -405,6 +462,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setCreatedBy_NotEqual(String createdBy) { + setCreatedBy_NotEqual(createdBy, null, null); + } + + public void setCreatedBy_NotEqual(String createdBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedBy_Equal(createdBy, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -512,6 +588,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -608,6 +703,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setDepth_NotEqual(Integer depth) { + setDepth_NotEqual(depth, null, null); + } + + public void setDepth_NotEqual(Integer depth, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setDepth_Equal(depth, eqOpLambda); + }, notOpLambda); + } + + public void setDepth_Equal(Integer depth) { + setDepth_Term(depth, null); + } + + public void setDepth_Equal(Integer depth, ConditionOptionCall opLambda) { + setDepth_Term(depth, opLambda); + } + public void setDepth_Term(Integer depth) { setDepth_Term(depth, null); } @@ -704,6 +818,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setExcludedDocPaths_NotEqual(String excludedDocPaths) { + setExcludedDocPaths_NotEqual(excludedDocPaths, null, null); + } + + public void setExcludedDocPaths_NotEqual(String excludedDocPaths, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setExcludedDocPaths_Equal(excludedDocPaths, eqOpLambda); + }, notOpLambda); + } + + public void setExcludedDocPaths_Equal(String excludedDocPaths) { + setExcludedDocPaths_Term(excludedDocPaths, null); + } + + public void setExcludedDocPaths_Equal(String excludedDocPaths, ConditionOptionCall opLambda) { + setExcludedDocPaths_Term(excludedDocPaths, opLambda); + } + public void setExcludedDocPaths_Term(String excludedDocPaths) { setExcludedDocPaths_Term(excludedDocPaths, null); } @@ -811,6 +944,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setExcludedPaths_NotEqual(String excludedPaths) { + setExcludedPaths_NotEqual(excludedPaths, null, null); + } + + public void setExcludedPaths_NotEqual(String excludedPaths, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setExcludedPaths_Equal(excludedPaths, eqOpLambda); + }, notOpLambda); + } + + public void setExcludedPaths_Equal(String excludedPaths) { + setExcludedPaths_Term(excludedPaths, null); + } + + public void setExcludedPaths_Equal(String excludedPaths, ConditionOptionCall opLambda) { + setExcludedPaths_Term(excludedPaths, opLambda); + } + public void setExcludedPaths_Term(String excludedPaths) { setExcludedPaths_Term(excludedPaths, null); } @@ -918,6 +1070,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -1025,6 +1196,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setIncludedDocPaths_NotEqual(String includedDocPaths) { + setIncludedDocPaths_NotEqual(includedDocPaths, null, null); + } + + public void setIncludedDocPaths_NotEqual(String includedDocPaths, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setIncludedDocPaths_Equal(includedDocPaths, eqOpLambda); + }, notOpLambda); + } + + public void setIncludedDocPaths_Equal(String includedDocPaths) { + setIncludedDocPaths_Term(includedDocPaths, null); + } + + public void setIncludedDocPaths_Equal(String includedDocPaths, ConditionOptionCall opLambda) { + setIncludedDocPaths_Term(includedDocPaths, opLambda); + } + public void setIncludedDocPaths_Term(String includedDocPaths) { setIncludedDocPaths_Term(includedDocPaths, null); } @@ -1132,6 +1322,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setIncludedPaths_NotEqual(String includedPaths) { + setIncludedPaths_NotEqual(includedPaths, null, null); + } + + public void setIncludedPaths_NotEqual(String includedPaths, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setIncludedPaths_Equal(includedPaths, eqOpLambda); + }, notOpLambda); + } + + public void setIncludedPaths_Equal(String includedPaths) { + setIncludedPaths_Term(includedPaths, null); + } + + public void setIncludedPaths_Equal(String includedPaths, ConditionOptionCall opLambda) { + setIncludedPaths_Term(includedPaths, opLambda); + } + public void setIncludedPaths_Term(String includedPaths) { setIncludedPaths_Term(includedPaths, null); } @@ -1239,6 +1448,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setIntervalTime_NotEqual(Integer intervalTime) { + setIntervalTime_NotEqual(intervalTime, null, null); + } + + public void setIntervalTime_NotEqual(Integer intervalTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setIntervalTime_Equal(intervalTime, eqOpLambda); + }, notOpLambda); + } + + public void setIntervalTime_Equal(Integer intervalTime) { + setIntervalTime_Term(intervalTime, null); + } + + public void setIntervalTime_Equal(Integer intervalTime, ConditionOptionCall opLambda) { + setIntervalTime_Term(intervalTime, opLambda); + } + public void setIntervalTime_Term(Integer intervalTime) { setIntervalTime_Term(intervalTime, null); } @@ -1335,6 +1563,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setMaxAccessCount_NotEqual(Long maxAccessCount) { + setMaxAccessCount_NotEqual(maxAccessCount, null, null); + } + + public void setMaxAccessCount_NotEqual(Long maxAccessCount, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setMaxAccessCount_Equal(maxAccessCount, eqOpLambda); + }, notOpLambda); + } + + public void setMaxAccessCount_Equal(Long maxAccessCount) { + setMaxAccessCount_Term(maxAccessCount, null); + } + + public void setMaxAccessCount_Equal(Long maxAccessCount, ConditionOptionCall opLambda) { + setMaxAccessCount_Term(maxAccessCount, opLambda); + } + public void setMaxAccessCount_Term(Long maxAccessCount) { setMaxAccessCount_Term(maxAccessCount, null); } @@ -1431,6 +1678,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setName_NotEqual(String name) { + setName_NotEqual(name, null, null); + } + + public void setName_NotEqual(String name, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setName_Equal(name, eqOpLambda); + }, notOpLambda); + } + + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -1538,6 +1804,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setNumOfThread_NotEqual(Integer numOfThread) { + setNumOfThread_NotEqual(numOfThread, null, null); + } + + public void setNumOfThread_NotEqual(Integer numOfThread, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setNumOfThread_Equal(numOfThread, eqOpLambda); + }, notOpLambda); + } + + public void setNumOfThread_Equal(Integer numOfThread) { + setNumOfThread_Term(numOfThread, null); + } + + public void setNumOfThread_Equal(Integer numOfThread, ConditionOptionCall opLambda) { + setNumOfThread_Term(numOfThread, opLambda); + } + public void setNumOfThread_Term(Integer numOfThread) { setNumOfThread_Term(numOfThread, null); } @@ -1634,6 +1919,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setPaths_NotEqual(String paths) { + setPaths_NotEqual(paths, null, null); + } + + public void setPaths_NotEqual(String paths, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setPaths_Equal(paths, eqOpLambda); + }, notOpLambda); + } + + public void setPaths_Equal(String paths) { + setPaths_Term(paths, null); + } + + public void setPaths_Equal(String paths, ConditionOptionCall opLambda) { + setPaths_Term(paths, opLambda); + } + public void setPaths_Term(String paths) { setPaths_Term(paths, null); } @@ -1741,6 +2045,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setSortOrder_NotEqual(Integer sortOrder) { + setSortOrder_NotEqual(sortOrder, null, null); + } + + public void setSortOrder_NotEqual(Integer sortOrder, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setSortOrder_Equal(sortOrder, eqOpLambda); + }, notOpLambda); + } + + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -1837,6 +2160,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setUpdatedBy_NotEqual(String updatedBy) { + setUpdatedBy_NotEqual(updatedBy, null, null); + } + + public void setUpdatedBy_NotEqual(String updatedBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedBy_Equal(updatedBy, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1944,6 +2286,25 @@ public abstract class BsFileConfigCF extends AbstractConditionFilter { } } + public void setUpdatedTime_NotEqual(Long updatedTime) { + setUpdatedTime_NotEqual(updatedTime, null, null); + } + + public void setUpdatedTime_NotEqual(Long updatedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedTime_Equal(updatedTime, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFileConfigToLabelCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFileConfigToLabelCF.java index 64ef860e2..603762d49 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFileConfigToLabelCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFileConfigToLabelCF.java @@ -106,6 +106,25 @@ public abstract class BsFileConfigToLabelCF extends AbstractConditionFilter { } } + public void setFileConfigId_NotEqual(String fileConfigId) { + setFileConfigId_NotEqual(fileConfigId, null, null); + } + + public void setFileConfigId_NotEqual(String fileConfigId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setFileConfigId_Equal(fileConfigId, eqOpLambda); + }, notOpLambda); + } + + public void setFileConfigId_Equal(String fileConfigId) { + setFileConfigId_Term(fileConfigId, null); + } + + public void setFileConfigId_Equal(String fileConfigId, ConditionOptionCall opLambda) { + setFileConfigId_Term(fileConfigId, opLambda); + } + public void setFileConfigId_Term(String fileConfigId) { setFileConfigId_Term(fileConfigId, null); } @@ -213,6 +232,25 @@ public abstract class BsFileConfigToLabelCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -320,6 +358,25 @@ public abstract class BsFileConfigToLabelCF extends AbstractConditionFilter { } } + public void setLabelTypeId_NotEqual(String labelTypeId) { + setLabelTypeId_NotEqual(labelTypeId, null, null); + } + + public void setLabelTypeId_NotEqual(String labelTypeId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setLabelTypeId_Equal(labelTypeId, eqOpLambda); + }, notOpLambda); + } + + public void setLabelTypeId_Equal(String labelTypeId) { + setLabelTypeId_Term(labelTypeId, null); + } + + public void setLabelTypeId_Equal(String labelTypeId, ConditionOptionCall opLambda) { + setLabelTypeId_Term(labelTypeId, opLambda); + } + public void setLabelTypeId_Term(String labelTypeId) { setLabelTypeId_Term(labelTypeId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFileConfigToRoleCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFileConfigToRoleCF.java index 442573810..c302bc866 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFileConfigToRoleCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsFileConfigToRoleCF.java @@ -106,6 +106,25 @@ public abstract class BsFileConfigToRoleCF extends AbstractConditionFilter { } } + public void setFileConfigId_NotEqual(String fileConfigId) { + setFileConfigId_NotEqual(fileConfigId, null, null); + } + + public void setFileConfigId_NotEqual(String fileConfigId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setFileConfigId_Equal(fileConfigId, eqOpLambda); + }, notOpLambda); + } + + public void setFileConfigId_Equal(String fileConfigId) { + setFileConfigId_Term(fileConfigId, null); + } + + public void setFileConfigId_Equal(String fileConfigId, ConditionOptionCall opLambda) { + setFileConfigId_Term(fileConfigId, opLambda); + } + public void setFileConfigId_Term(String fileConfigId) { setFileConfigId_Term(fileConfigId, null); } @@ -213,6 +232,25 @@ public abstract class BsFileConfigToRoleCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -320,6 +358,25 @@ public abstract class BsFileConfigToRoleCF extends AbstractConditionFilter { } } + public void setRoleTypeId_NotEqual(String roleTypeId) { + setRoleTypeId_NotEqual(roleTypeId, null, null); + } + + public void setRoleTypeId_NotEqual(String roleTypeId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setRoleTypeId_Equal(roleTypeId, eqOpLambda); + }, notOpLambda); + } + + public void setRoleTypeId_Equal(String roleTypeId) { + setRoleTypeId_Term(roleTypeId, null); + } + + public void setRoleTypeId_Equal(String roleTypeId, ConditionOptionCall opLambda) { + setRoleTypeId_Term(roleTypeId, opLambda); + } + public void setRoleTypeId_Term(String roleTypeId) { setRoleTypeId_Term(roleTypeId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsJobLogCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsJobLogCF.java index 820e2d86b..bfced1aac 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsJobLogCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsJobLogCF.java @@ -106,6 +106,25 @@ public abstract class BsJobLogCF extends AbstractConditionFilter { } } + public void setEndTime_NotEqual(Long endTime) { + setEndTime_NotEqual(endTime, null, null); + } + + public void setEndTime_NotEqual(Long endTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setEndTime_Equal(endTime, eqOpLambda); + }, notOpLambda); + } + + public void setEndTime_Equal(Long endTime) { + setEndTime_Term(endTime, null); + } + + public void setEndTime_Equal(Long endTime, ConditionOptionCall opLambda) { + setEndTime_Term(endTime, opLambda); + } + public void setEndTime_Term(Long endTime) { setEndTime_Term(endTime, null); } @@ -202,6 +221,25 @@ public abstract class BsJobLogCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -309,6 +347,25 @@ public abstract class BsJobLogCF extends AbstractConditionFilter { } } + public void setJobName_NotEqual(String jobName) { + setJobName_NotEqual(jobName, null, null); + } + + public void setJobName_NotEqual(String jobName, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setJobName_Equal(jobName, eqOpLambda); + }, notOpLambda); + } + + public void setJobName_Equal(String jobName) { + setJobName_Term(jobName, null); + } + + public void setJobName_Equal(String jobName, ConditionOptionCall opLambda) { + setJobName_Term(jobName, opLambda); + } + public void setJobName_Term(String jobName) { setJobName_Term(jobName, null); } @@ -416,6 +473,25 @@ public abstract class BsJobLogCF extends AbstractConditionFilter { } } + public void setJobStatus_NotEqual(String jobStatus) { + setJobStatus_NotEqual(jobStatus, null, null); + } + + public void setJobStatus_NotEqual(String jobStatus, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setJobStatus_Equal(jobStatus, eqOpLambda); + }, notOpLambda); + } + + public void setJobStatus_Equal(String jobStatus) { + setJobStatus_Term(jobStatus, null); + } + + public void setJobStatus_Equal(String jobStatus, ConditionOptionCall opLambda) { + setJobStatus_Term(jobStatus, opLambda); + } + public void setJobStatus_Term(String jobStatus) { setJobStatus_Term(jobStatus, null); } @@ -523,6 +599,25 @@ public abstract class BsJobLogCF extends AbstractConditionFilter { } } + public void setScriptData_NotEqual(String scriptData) { + setScriptData_NotEqual(scriptData, null, null); + } + + public void setScriptData_NotEqual(String scriptData, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setScriptData_Equal(scriptData, eqOpLambda); + }, notOpLambda); + } + + public void setScriptData_Equal(String scriptData) { + setScriptData_Term(scriptData, null); + } + + public void setScriptData_Equal(String scriptData, ConditionOptionCall opLambda) { + setScriptData_Term(scriptData, opLambda); + } + public void setScriptData_Term(String scriptData) { setScriptData_Term(scriptData, null); } @@ -630,6 +725,25 @@ public abstract class BsJobLogCF extends AbstractConditionFilter { } } + public void setScriptResult_NotEqual(String scriptResult) { + setScriptResult_NotEqual(scriptResult, null, null); + } + + public void setScriptResult_NotEqual(String scriptResult, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setScriptResult_Equal(scriptResult, eqOpLambda); + }, notOpLambda); + } + + public void setScriptResult_Equal(String scriptResult) { + setScriptResult_Term(scriptResult, null); + } + + public void setScriptResult_Equal(String scriptResult, ConditionOptionCall opLambda) { + setScriptResult_Term(scriptResult, opLambda); + } + public void setScriptResult_Term(String scriptResult) { setScriptResult_Term(scriptResult, null); } @@ -737,6 +851,25 @@ public abstract class BsJobLogCF extends AbstractConditionFilter { } } + public void setScriptType_NotEqual(String scriptType) { + setScriptType_NotEqual(scriptType, null, null); + } + + public void setScriptType_NotEqual(String scriptType, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setScriptType_Equal(scriptType, eqOpLambda); + }, notOpLambda); + } + + public void setScriptType_Equal(String scriptType) { + setScriptType_Term(scriptType, null); + } + + public void setScriptType_Equal(String scriptType, ConditionOptionCall opLambda) { + setScriptType_Term(scriptType, opLambda); + } + public void setScriptType_Term(String scriptType) { setScriptType_Term(scriptType, null); } @@ -844,6 +977,25 @@ public abstract class BsJobLogCF extends AbstractConditionFilter { } } + public void setStartTime_NotEqual(Long startTime) { + setStartTime_NotEqual(startTime, null, null); + } + + public void setStartTime_NotEqual(Long startTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setStartTime_Equal(startTime, eqOpLambda); + }, notOpLambda); + } + + public void setStartTime_Equal(Long startTime) { + setStartTime_Term(startTime, null); + } + + public void setStartTime_Equal(Long startTime, ConditionOptionCall opLambda) { + setStartTime_Term(startTime, opLambda); + } + public void setStartTime_Term(Long startTime) { setStartTime_Term(startTime, null); } @@ -940,6 +1092,25 @@ public abstract class BsJobLogCF extends AbstractConditionFilter { } } + public void setTarget_NotEqual(String target) { + setTarget_NotEqual(target, null, null); + } + + public void setTarget_NotEqual(String target, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setTarget_Equal(target, eqOpLambda); + }, notOpLambda); + } + + public void setTarget_Equal(String target) { + setTarget_Term(target, null); + } + + public void setTarget_Equal(String target, ConditionOptionCall opLambda) { + setTarget_Term(target, opLambda); + } + public void setTarget_Term(String target) { setTarget_Term(target, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsKeyMatchCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsKeyMatchCF.java index d5ae20e4b..a1a60409c 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsKeyMatchCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsKeyMatchCF.java @@ -106,6 +106,25 @@ public abstract class BsKeyMatchCF extends AbstractConditionFilter { } } + public void setBoost_NotEqual(Float boost) { + setBoost_NotEqual(boost, null, null); + } + + public void setBoost_NotEqual(Float boost, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setBoost_Equal(boost, eqOpLambda); + }, notOpLambda); + } + + public void setBoost_Equal(Float boost) { + setBoost_Term(boost, null); + } + + public void setBoost_Equal(Float boost, ConditionOptionCall opLambda) { + setBoost_Term(boost, opLambda); + } + public void setBoost_Term(Float boost) { setBoost_Term(boost, null); } @@ -202,6 +221,25 @@ public abstract class BsKeyMatchCF extends AbstractConditionFilter { } } + public void setCreatedBy_NotEqual(String createdBy) { + setCreatedBy_NotEqual(createdBy, null, null); + } + + public void setCreatedBy_NotEqual(String createdBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedBy_Equal(createdBy, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -309,6 +347,25 @@ public abstract class BsKeyMatchCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -405,6 +462,25 @@ public abstract class BsKeyMatchCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -512,6 +588,25 @@ public abstract class BsKeyMatchCF extends AbstractConditionFilter { } } + public void setMaxSize_NotEqual(Integer maxSize) { + setMaxSize_NotEqual(maxSize, null, null); + } + + public void setMaxSize_NotEqual(Integer maxSize, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setMaxSize_Equal(maxSize, eqOpLambda); + }, notOpLambda); + } + + public void setMaxSize_Equal(Integer maxSize) { + setMaxSize_Term(maxSize, null); + } + + public void setMaxSize_Equal(Integer maxSize, ConditionOptionCall opLambda) { + setMaxSize_Term(maxSize, opLambda); + } + public void setMaxSize_Term(Integer maxSize) { setMaxSize_Term(maxSize, null); } @@ -608,6 +703,25 @@ public abstract class BsKeyMatchCF extends AbstractConditionFilter { } } + public void setQuery_NotEqual(String query) { + setQuery_NotEqual(query, null, null); + } + + public void setQuery_NotEqual(String query, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setQuery_Equal(query, eqOpLambda); + }, notOpLambda); + } + + public void setQuery_Equal(String query) { + setQuery_Term(query, null); + } + + public void setQuery_Equal(String query, ConditionOptionCall opLambda) { + setQuery_Term(query, opLambda); + } + public void setQuery_Term(String query) { setQuery_Term(query, null); } @@ -715,6 +829,25 @@ public abstract class BsKeyMatchCF extends AbstractConditionFilter { } } + public void setTerm_NotEqual(String term) { + setTerm_NotEqual(term, null, null); + } + + public void setTerm_NotEqual(String term, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setTerm_Equal(term, eqOpLambda); + }, notOpLambda); + } + + public void setTerm_Equal(String term) { + setTerm_Term(term, null); + } + + public void setTerm_Equal(String term, ConditionOptionCall opLambda) { + setTerm_Term(term, opLambda); + } + public void setTerm_Term(String term) { setTerm_Term(term, null); } @@ -822,6 +955,25 @@ public abstract class BsKeyMatchCF extends AbstractConditionFilter { } } + public void setUpdatedBy_NotEqual(String updatedBy) { + setUpdatedBy_NotEqual(updatedBy, null, null); + } + + public void setUpdatedBy_NotEqual(String updatedBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedBy_Equal(updatedBy, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -929,6 +1081,25 @@ public abstract class BsKeyMatchCF extends AbstractConditionFilter { } } + public void setUpdatedTime_NotEqual(Long updatedTime) { + setUpdatedTime_NotEqual(updatedTime, null, null); + } + + public void setUpdatedTime_NotEqual(Long updatedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedTime_Equal(updatedTime, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsLabelToRoleCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsLabelToRoleCF.java index 5accfe9aa..8f796fd01 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsLabelToRoleCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsLabelToRoleCF.java @@ -106,6 +106,25 @@ public abstract class BsLabelToRoleCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -213,6 +232,25 @@ public abstract class BsLabelToRoleCF extends AbstractConditionFilter { } } + public void setLabelTypeId_NotEqual(String labelTypeId) { + setLabelTypeId_NotEqual(labelTypeId, null, null); + } + + public void setLabelTypeId_NotEqual(String labelTypeId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setLabelTypeId_Equal(labelTypeId, eqOpLambda); + }, notOpLambda); + } + + public void setLabelTypeId_Equal(String labelTypeId) { + setLabelTypeId_Term(labelTypeId, null); + } + + public void setLabelTypeId_Equal(String labelTypeId, ConditionOptionCall opLambda) { + setLabelTypeId_Term(labelTypeId, opLambda); + } + public void setLabelTypeId_Term(String labelTypeId) { setLabelTypeId_Term(labelTypeId, null); } @@ -320,6 +358,25 @@ public abstract class BsLabelToRoleCF extends AbstractConditionFilter { } } + public void setRoleTypeId_NotEqual(String roleTypeId) { + setRoleTypeId_NotEqual(roleTypeId, null, null); + } + + public void setRoleTypeId_NotEqual(String roleTypeId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setRoleTypeId_Equal(roleTypeId, eqOpLambda); + }, notOpLambda); + } + + public void setRoleTypeId_Equal(String roleTypeId) { + setRoleTypeId_Term(roleTypeId, null); + } + + public void setRoleTypeId_Equal(String roleTypeId, ConditionOptionCall opLambda) { + setRoleTypeId_Term(roleTypeId, opLambda); + } + public void setRoleTypeId_Term(String roleTypeId) { setRoleTypeId_Term(roleTypeId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsLabelTypeCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsLabelTypeCF.java index fb4d6bc51..841a3c193 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsLabelTypeCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsLabelTypeCF.java @@ -106,6 +106,25 @@ public abstract class BsLabelTypeCF extends AbstractConditionFilter { } } + public void setCreatedBy_NotEqual(String createdBy) { + setCreatedBy_NotEqual(createdBy, null, null); + } + + public void setCreatedBy_NotEqual(String createdBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedBy_Equal(createdBy, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -213,6 +232,25 @@ public abstract class BsLabelTypeCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -309,6 +347,25 @@ public abstract class BsLabelTypeCF extends AbstractConditionFilter { } } + public void setExcludedPaths_NotEqual(String excludedPaths) { + setExcludedPaths_NotEqual(excludedPaths, null, null); + } + + public void setExcludedPaths_NotEqual(String excludedPaths, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setExcludedPaths_Equal(excludedPaths, eqOpLambda); + }, notOpLambda); + } + + public void setExcludedPaths_Equal(String excludedPaths) { + setExcludedPaths_Term(excludedPaths, null); + } + + public void setExcludedPaths_Equal(String excludedPaths, ConditionOptionCall opLambda) { + setExcludedPaths_Term(excludedPaths, opLambda); + } + public void setExcludedPaths_Term(String excludedPaths) { setExcludedPaths_Term(excludedPaths, null); } @@ -416,6 +473,25 @@ public abstract class BsLabelTypeCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -523,6 +599,25 @@ public abstract class BsLabelTypeCF extends AbstractConditionFilter { } } + public void setIncludedPaths_NotEqual(String includedPaths) { + setIncludedPaths_NotEqual(includedPaths, null, null); + } + + public void setIncludedPaths_NotEqual(String includedPaths, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setIncludedPaths_Equal(includedPaths, eqOpLambda); + }, notOpLambda); + } + + public void setIncludedPaths_Equal(String includedPaths) { + setIncludedPaths_Term(includedPaths, null); + } + + public void setIncludedPaths_Equal(String includedPaths, ConditionOptionCall opLambda) { + setIncludedPaths_Term(includedPaths, opLambda); + } + public void setIncludedPaths_Term(String includedPaths) { setIncludedPaths_Term(includedPaths, null); } @@ -630,6 +725,25 @@ public abstract class BsLabelTypeCF extends AbstractConditionFilter { } } + public void setName_NotEqual(String name) { + setName_NotEqual(name, null, null); + } + + public void setName_NotEqual(String name, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setName_Equal(name, eqOpLambda); + }, notOpLambda); + } + + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -737,6 +851,25 @@ public abstract class BsLabelTypeCF extends AbstractConditionFilter { } } + public void setSortOrder_NotEqual(Integer sortOrder) { + setSortOrder_NotEqual(sortOrder, null, null); + } + + public void setSortOrder_NotEqual(Integer sortOrder, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setSortOrder_Equal(sortOrder, eqOpLambda); + }, notOpLambda); + } + + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -833,6 +966,25 @@ public abstract class BsLabelTypeCF extends AbstractConditionFilter { } } + public void setUpdatedBy_NotEqual(String updatedBy) { + setUpdatedBy_NotEqual(updatedBy, null, null); + } + + public void setUpdatedBy_NotEqual(String updatedBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedBy_Equal(updatedBy, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -940,6 +1092,25 @@ public abstract class BsLabelTypeCF extends AbstractConditionFilter { } } + public void setUpdatedTime_NotEqual(Long updatedTime) { + setUpdatedTime_NotEqual(updatedTime, null, null); + } + + public void setUpdatedTime_NotEqual(Long updatedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedTime_Equal(updatedTime, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } @@ -1036,6 +1207,25 @@ public abstract class BsLabelTypeCF extends AbstractConditionFilter { } } + public void setValue_NotEqual(String value) { + setValue_NotEqual(value, null, null); + } + + public void setValue_NotEqual(String value, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setValue_Equal(value, eqOpLambda); + }, notOpLambda); + } + + public void setValue_Equal(String value) { + setValue_Term(value, null); + } + + public void setValue_Equal(String value, ConditionOptionCall opLambda) { + setValue_Term(value, opLambda); + } + public void setValue_Term(String value) { setValue_Term(value, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsOverlappingHostCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsOverlappingHostCF.java index 2672ad965..bff80c2c8 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsOverlappingHostCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsOverlappingHostCF.java @@ -106,6 +106,25 @@ public abstract class BsOverlappingHostCF extends AbstractConditionFilter { } } + public void setCreatedBy_NotEqual(String createdBy) { + setCreatedBy_NotEqual(createdBy, null, null); + } + + public void setCreatedBy_NotEqual(String createdBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedBy_Equal(createdBy, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -213,6 +232,25 @@ public abstract class BsOverlappingHostCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -309,6 +347,25 @@ public abstract class BsOverlappingHostCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -416,6 +473,25 @@ public abstract class BsOverlappingHostCF extends AbstractConditionFilter { } } + public void setOverlappingName_NotEqual(String overlappingName) { + setOverlappingName_NotEqual(overlappingName, null, null); + } + + public void setOverlappingName_NotEqual(String overlappingName, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setOverlappingName_Equal(overlappingName, eqOpLambda); + }, notOpLambda); + } + + public void setOverlappingName_Equal(String overlappingName) { + setOverlappingName_Term(overlappingName, null); + } + + public void setOverlappingName_Equal(String overlappingName, ConditionOptionCall opLambda) { + setOverlappingName_Term(overlappingName, opLambda); + } + public void setOverlappingName_Term(String overlappingName) { setOverlappingName_Term(overlappingName, null); } @@ -523,6 +599,25 @@ public abstract class BsOverlappingHostCF extends AbstractConditionFilter { } } + public void setRegularName_NotEqual(String regularName) { + setRegularName_NotEqual(regularName, null, null); + } + + public void setRegularName_NotEqual(String regularName, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setRegularName_Equal(regularName, eqOpLambda); + }, notOpLambda); + } + + public void setRegularName_Equal(String regularName) { + setRegularName_Term(regularName, null); + } + + public void setRegularName_Equal(String regularName, ConditionOptionCall opLambda) { + setRegularName_Term(regularName, opLambda); + } + public void setRegularName_Term(String regularName) { setRegularName_Term(regularName, null); } @@ -630,6 +725,25 @@ public abstract class BsOverlappingHostCF extends AbstractConditionFilter { } } + public void setSortOrder_NotEqual(Integer sortOrder) { + setSortOrder_NotEqual(sortOrder, null, null); + } + + public void setSortOrder_NotEqual(Integer sortOrder, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setSortOrder_Equal(sortOrder, eqOpLambda); + }, notOpLambda); + } + + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -726,6 +840,25 @@ public abstract class BsOverlappingHostCF extends AbstractConditionFilter { } } + public void setUpdatedBy_NotEqual(String updatedBy) { + setUpdatedBy_NotEqual(updatedBy, null, null); + } + + public void setUpdatedBy_NotEqual(String updatedBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedBy_Equal(updatedBy, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -833,6 +966,25 @@ public abstract class BsOverlappingHostCF extends AbstractConditionFilter { } } + public void setUpdatedTime_NotEqual(Long updatedTime) { + setUpdatedTime_NotEqual(updatedTime, null, null); + } + + public void setUpdatedTime_NotEqual(Long updatedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedTime_Equal(updatedTime, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsPathMappingCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsPathMappingCF.java index fa2041543..713183700 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsPathMappingCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsPathMappingCF.java @@ -106,6 +106,25 @@ public abstract class BsPathMappingCF extends AbstractConditionFilter { } } + public void setCreatedBy_NotEqual(String createdBy) { + setCreatedBy_NotEqual(createdBy, null, null); + } + + public void setCreatedBy_NotEqual(String createdBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedBy_Equal(createdBy, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -213,6 +232,25 @@ public abstract class BsPathMappingCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -309,6 +347,25 @@ public abstract class BsPathMappingCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -416,6 +473,25 @@ public abstract class BsPathMappingCF extends AbstractConditionFilter { } } + public void setProcessType_NotEqual(String processType) { + setProcessType_NotEqual(processType, null, null); + } + + public void setProcessType_NotEqual(String processType, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setProcessType_Equal(processType, eqOpLambda); + }, notOpLambda); + } + + public void setProcessType_Equal(String processType) { + setProcessType_Term(processType, null); + } + + public void setProcessType_Equal(String processType, ConditionOptionCall opLambda) { + setProcessType_Term(processType, opLambda); + } + public void setProcessType_Term(String processType) { setProcessType_Term(processType, null); } @@ -523,6 +599,25 @@ public abstract class BsPathMappingCF extends AbstractConditionFilter { } } + public void setRegex_NotEqual(String regex) { + setRegex_NotEqual(regex, null, null); + } + + public void setRegex_NotEqual(String regex, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setRegex_Equal(regex, eqOpLambda); + }, notOpLambda); + } + + public void setRegex_Equal(String regex) { + setRegex_Term(regex, null); + } + + public void setRegex_Equal(String regex, ConditionOptionCall opLambda) { + setRegex_Term(regex, opLambda); + } + public void setRegex_Term(String regex) { setRegex_Term(regex, null); } @@ -630,6 +725,25 @@ public abstract class BsPathMappingCF extends AbstractConditionFilter { } } + public void setReplacement_NotEqual(String replacement) { + setReplacement_NotEqual(replacement, null, null); + } + + public void setReplacement_NotEqual(String replacement, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setReplacement_Equal(replacement, eqOpLambda); + }, notOpLambda); + } + + public void setReplacement_Equal(String replacement) { + setReplacement_Term(replacement, null); + } + + public void setReplacement_Equal(String replacement, ConditionOptionCall opLambda) { + setReplacement_Term(replacement, opLambda); + } + public void setReplacement_Term(String replacement) { setReplacement_Term(replacement, null); } @@ -737,6 +851,25 @@ public abstract class BsPathMappingCF extends AbstractConditionFilter { } } + public void setSortOrder_NotEqual(Integer sortOrder) { + setSortOrder_NotEqual(sortOrder, null, null); + } + + public void setSortOrder_NotEqual(Integer sortOrder, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setSortOrder_Equal(sortOrder, eqOpLambda); + }, notOpLambda); + } + + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -833,6 +966,25 @@ public abstract class BsPathMappingCF extends AbstractConditionFilter { } } + public void setUpdatedBy_NotEqual(String updatedBy) { + setUpdatedBy_NotEqual(updatedBy, null, null); + } + + public void setUpdatedBy_NotEqual(String updatedBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedBy_Equal(updatedBy, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -940,6 +1092,25 @@ public abstract class BsPathMappingCF extends AbstractConditionFilter { } } + public void setUpdatedTime_NotEqual(Long updatedTime) { + setUpdatedTime_NotEqual(updatedTime, null, null); + } + + public void setUpdatedTime_NotEqual(Long updatedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedTime_Equal(updatedTime, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsRequestHeaderCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsRequestHeaderCF.java index 92d166b06..376c00b5e 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsRequestHeaderCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsRequestHeaderCF.java @@ -106,6 +106,25 @@ public abstract class BsRequestHeaderCF extends AbstractConditionFilter { } } + public void setCreatedBy_NotEqual(String createdBy) { + setCreatedBy_NotEqual(createdBy, null, null); + } + + public void setCreatedBy_NotEqual(String createdBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedBy_Equal(createdBy, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -213,6 +232,25 @@ public abstract class BsRequestHeaderCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -309,6 +347,25 @@ public abstract class BsRequestHeaderCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -416,6 +473,25 @@ public abstract class BsRequestHeaderCF extends AbstractConditionFilter { } } + public void setName_NotEqual(String name) { + setName_NotEqual(name, null, null); + } + + public void setName_NotEqual(String name, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setName_Equal(name, eqOpLambda); + }, notOpLambda); + } + + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -523,6 +599,25 @@ public abstract class BsRequestHeaderCF extends AbstractConditionFilter { } } + public void setUpdatedBy_NotEqual(String updatedBy) { + setUpdatedBy_NotEqual(updatedBy, null, null); + } + + public void setUpdatedBy_NotEqual(String updatedBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedBy_Equal(updatedBy, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -630,6 +725,25 @@ public abstract class BsRequestHeaderCF extends AbstractConditionFilter { } } + public void setUpdatedTime_NotEqual(Long updatedTime) { + setUpdatedTime_NotEqual(updatedTime, null, null); + } + + public void setUpdatedTime_NotEqual(Long updatedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedTime_Equal(updatedTime, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } @@ -726,6 +840,25 @@ public abstract class BsRequestHeaderCF extends AbstractConditionFilter { } } + public void setValue_NotEqual(String value) { + setValue_NotEqual(value, null, null); + } + + public void setValue_NotEqual(String value, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setValue_Equal(value, eqOpLambda); + }, notOpLambda); + } + + public void setValue_Equal(String value) { + setValue_Term(value, null); + } + + public void setValue_Equal(String value, ConditionOptionCall opLambda) { + setValue_Term(value, opLambda); + } + public void setValue_Term(String value) { setValue_Term(value, null); } @@ -833,6 +966,25 @@ public abstract class BsRequestHeaderCF extends AbstractConditionFilter { } } + public void setWebConfigId_NotEqual(String webConfigId) { + setWebConfigId_NotEqual(webConfigId, null, null); + } + + public void setWebConfigId_NotEqual(String webConfigId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setWebConfigId_Equal(webConfigId, eqOpLambda); + }, notOpLambda); + } + + public void setWebConfigId_Equal(String webConfigId) { + setWebConfigId_Term(webConfigId, null); + } + + public void setWebConfigId_Equal(String webConfigId, ConditionOptionCall opLambda) { + setWebConfigId_Term(webConfigId, opLambda); + } + public void setWebConfigId_Term(String webConfigId) { setWebConfigId_Term(webConfigId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsRoleTypeCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsRoleTypeCF.java index 177e9c2ce..38f06316d 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsRoleTypeCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsRoleTypeCF.java @@ -106,6 +106,25 @@ public abstract class BsRoleTypeCF extends AbstractConditionFilter { } } + public void setCreatedBy_NotEqual(String createdBy) { + setCreatedBy_NotEqual(createdBy, null, null); + } + + public void setCreatedBy_NotEqual(String createdBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedBy_Equal(createdBy, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -213,6 +232,25 @@ public abstract class BsRoleTypeCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -309,6 +347,25 @@ public abstract class BsRoleTypeCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -416,6 +473,25 @@ public abstract class BsRoleTypeCF extends AbstractConditionFilter { } } + public void setName_NotEqual(String name) { + setName_NotEqual(name, null, null); + } + + public void setName_NotEqual(String name, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setName_Equal(name, eqOpLambda); + }, notOpLambda); + } + + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -523,6 +599,25 @@ public abstract class BsRoleTypeCF extends AbstractConditionFilter { } } + public void setSortOrder_NotEqual(Integer sortOrder) { + setSortOrder_NotEqual(sortOrder, null, null); + } + + public void setSortOrder_NotEqual(Integer sortOrder, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setSortOrder_Equal(sortOrder, eqOpLambda); + }, notOpLambda); + } + + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -619,6 +714,25 @@ public abstract class BsRoleTypeCF extends AbstractConditionFilter { } } + public void setUpdatedBy_NotEqual(String updatedBy) { + setUpdatedBy_NotEqual(updatedBy, null, null); + } + + public void setUpdatedBy_NotEqual(String updatedBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedBy_Equal(updatedBy, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -726,6 +840,25 @@ public abstract class BsRoleTypeCF extends AbstractConditionFilter { } } + public void setUpdatedTime_NotEqual(Long updatedTime) { + setUpdatedTime_NotEqual(updatedTime, null, null); + } + + public void setUpdatedTime_NotEqual(Long updatedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedTime_Equal(updatedTime, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } @@ -822,6 +955,25 @@ public abstract class BsRoleTypeCF extends AbstractConditionFilter { } } + public void setValue_NotEqual(String value) { + setValue_NotEqual(value, null, null); + } + + public void setValue_NotEqual(String value, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setValue_Equal(value, eqOpLambda); + }, notOpLambda); + } + + public void setValue_Equal(String value) { + setValue_Term(value, null); + } + + public void setValue_Equal(String value, ConditionOptionCall opLambda) { + setValue_Term(value, opLambda); + } + public void setValue_Term(String value) { setValue_Term(value, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsScheduledJobCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsScheduledJobCF.java index f21488410..06f01295e 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsScheduledJobCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsScheduledJobCF.java @@ -106,6 +106,25 @@ public abstract class BsScheduledJobCF extends AbstractConditionFilter { } } + public void setAvailable_NotEqual(Boolean available) { + setAvailable_NotEqual(available, null, null); + } + + public void setAvailable_NotEqual(Boolean available, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setAvailable_Equal(available, eqOpLambda); + }, notOpLambda); + } + + public void setAvailable_Equal(Boolean available) { + setAvailable_Term(available, null); + } + + public void setAvailable_Equal(Boolean available, ConditionOptionCall opLambda) { + setAvailable_Term(available, opLambda); + } + public void setAvailable_Term(Boolean available) { setAvailable_Term(available, null); } @@ -202,47 +221,55 @@ public abstract class BsScheduledJobCF extends AbstractConditionFilter { } } - public void setCrawler_Term(String crawler) { + public void setCrawler_NotEqual(Boolean crawler) { + setCrawler_NotEqual(crawler, null, null); + } + + public void setCrawler_NotEqual(Boolean crawler, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCrawler_Equal(crawler, eqOpLambda); + }, notOpLambda); + } + + public void setCrawler_Equal(Boolean crawler) { setCrawler_Term(crawler, null); } - public void setCrawler_Term(String crawler, ConditionOptionCall opLambda) { + public void setCrawler_Equal(Boolean crawler, ConditionOptionCall opLambda) { + setCrawler_Term(crawler, opLambda); + } + + public void setCrawler_Term(Boolean crawler) { + setCrawler_Term(crawler, null); + } + + public void setCrawler_Term(Boolean crawler, ConditionOptionCall opLambda) { TermFilterBuilder builder = regTermF("crawler", crawler); if (opLambda != null) { opLambda.callback(builder); } } - public void setCrawler_Terms(Collection crawlerList) { + public void setCrawler_Terms(Collection crawlerList) { setCrawler_Terms(crawlerList, null); } - public void setCrawler_Terms(Collection crawlerList, ConditionOptionCall opLambda) { + public void setCrawler_Terms(Collection crawlerList, ConditionOptionCall opLambda) { TermsFilterBuilder builder = regTermsF("crawler", crawlerList); if (opLambda != null) { opLambda.callback(builder); } } - public void setCrawler_InScope(Collection crawlerList) { + public void setCrawler_InScope(Collection crawlerList) { setCrawler_Terms(crawlerList, null); } - public void setCrawler_InScope(Collection crawlerList, ConditionOptionCall opLambda) { + public void setCrawler_InScope(Collection crawlerList, ConditionOptionCall opLambda) { setCrawler_Terms(crawlerList, opLambda); } - public void setCrawler_Prefix(String crawler) { - setCrawler_Prefix(crawler, null); - } - - public void setCrawler_Prefix(String crawler, ConditionOptionCall opLambda) { - PrefixFilterBuilder builder = regPrefixF("crawler", crawler); - if (opLambda != null) { - opLambda.callback(builder); - } - } - public void setCrawler_Exists() { setCrawler_Exists(null); } @@ -265,50 +292,69 @@ public abstract class BsScheduledJobCF extends AbstractConditionFilter { } } - public void setCrawler_GreaterThan(String crawler) { + public void setCrawler_GreaterThan(Boolean crawler) { setCrawler_GreaterThan(crawler, null); } - public void setCrawler_GreaterThan(String crawler, ConditionOptionCall opLambda) { + public void setCrawler_GreaterThan(Boolean crawler, ConditionOptionCall opLambda) { RangeFilterBuilder builder = regRangeF("crawler", ConditionKey.CK_GREATER_THAN, crawler); if (opLambda != null) { opLambda.callback(builder); } } - public void setCrawler_LessThan(String crawler) { + public void setCrawler_LessThan(Boolean crawler) { setCrawler_LessThan(crawler, null); } - public void setCrawler_LessThan(String crawler, ConditionOptionCall opLambda) { + public void setCrawler_LessThan(Boolean crawler, ConditionOptionCall opLambda) { RangeFilterBuilder builder = regRangeF("crawler", ConditionKey.CK_LESS_THAN, crawler); if (opLambda != null) { opLambda.callback(builder); } } - public void setCrawler_GreaterEqual(String crawler) { + public void setCrawler_GreaterEqual(Boolean crawler) { setCrawler_GreaterEqual(crawler, null); } - public void setCrawler_GreaterEqual(String crawler, ConditionOptionCall opLambda) { + public void setCrawler_GreaterEqual(Boolean crawler, ConditionOptionCall opLambda) { RangeFilterBuilder builder = regRangeF("crawler", ConditionKey.CK_GREATER_EQUAL, crawler); if (opLambda != null) { opLambda.callback(builder); } } - public void setCrawler_LessEqual(String crawler) { + public void setCrawler_LessEqual(Boolean crawler) { setCrawler_LessEqual(crawler, null); } - public void setCrawler_LessEqual(String crawler, ConditionOptionCall opLambda) { + public void setCrawler_LessEqual(Boolean crawler, ConditionOptionCall opLambda) { RangeFilterBuilder builder = regRangeF("crawler", ConditionKey.CK_LESS_EQUAL, crawler); if (opLambda != null) { opLambda.callback(builder); } } + public void setCreatedBy_NotEqual(String createdBy) { + setCreatedBy_NotEqual(createdBy, null, null); + } + + public void setCreatedBy_NotEqual(String createdBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedBy_Equal(createdBy, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -416,6 +462,25 @@ public abstract class BsScheduledJobCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -512,6 +577,25 @@ public abstract class BsScheduledJobCF extends AbstractConditionFilter { } } + public void setCronExpression_NotEqual(String cronExpression) { + setCronExpression_NotEqual(cronExpression, null, null); + } + + public void setCronExpression_NotEqual(String cronExpression, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCronExpression_Equal(cronExpression, eqOpLambda); + }, notOpLambda); + } + + public void setCronExpression_Equal(String cronExpression) { + setCronExpression_Term(cronExpression, null); + } + + public void setCronExpression_Equal(String cronExpression, ConditionOptionCall opLambda) { + setCronExpression_Term(cronExpression, opLambda); + } + public void setCronExpression_Term(String cronExpression) { setCronExpression_Term(cronExpression, null); } @@ -619,6 +703,25 @@ public abstract class BsScheduledJobCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -726,6 +829,25 @@ public abstract class BsScheduledJobCF extends AbstractConditionFilter { } } + public void setJobLogging_NotEqual(Boolean jobLogging) { + setJobLogging_NotEqual(jobLogging, null, null); + } + + public void setJobLogging_NotEqual(Boolean jobLogging, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setJobLogging_Equal(jobLogging, eqOpLambda); + }, notOpLambda); + } + + public void setJobLogging_Equal(Boolean jobLogging) { + setJobLogging_Term(jobLogging, null); + } + + public void setJobLogging_Equal(Boolean jobLogging, ConditionOptionCall opLambda) { + setJobLogging_Term(jobLogging, opLambda); + } + public void setJobLogging_Term(Boolean jobLogging) { setJobLogging_Term(jobLogging, null); } @@ -822,6 +944,25 @@ public abstract class BsScheduledJobCF extends AbstractConditionFilter { } } + public void setName_NotEqual(String name) { + setName_NotEqual(name, null, null); + } + + public void setName_NotEqual(String name, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setName_Equal(name, eqOpLambda); + }, notOpLambda); + } + + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -929,6 +1070,25 @@ public abstract class BsScheduledJobCF extends AbstractConditionFilter { } } + public void setScriptData_NotEqual(String scriptData) { + setScriptData_NotEqual(scriptData, null, null); + } + + public void setScriptData_NotEqual(String scriptData, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setScriptData_Equal(scriptData, eqOpLambda); + }, notOpLambda); + } + + public void setScriptData_Equal(String scriptData) { + setScriptData_Term(scriptData, null); + } + + public void setScriptData_Equal(String scriptData, ConditionOptionCall opLambda) { + setScriptData_Term(scriptData, opLambda); + } + public void setScriptData_Term(String scriptData) { setScriptData_Term(scriptData, null); } @@ -1036,6 +1196,25 @@ public abstract class BsScheduledJobCF extends AbstractConditionFilter { } } + public void setScriptType_NotEqual(String scriptType) { + setScriptType_NotEqual(scriptType, null, null); + } + + public void setScriptType_NotEqual(String scriptType, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setScriptType_Equal(scriptType, eqOpLambda); + }, notOpLambda); + } + + public void setScriptType_Equal(String scriptType) { + setScriptType_Term(scriptType, null); + } + + public void setScriptType_Equal(String scriptType, ConditionOptionCall opLambda) { + setScriptType_Term(scriptType, opLambda); + } + public void setScriptType_Term(String scriptType) { setScriptType_Term(scriptType, null); } @@ -1143,6 +1322,25 @@ public abstract class BsScheduledJobCF extends AbstractConditionFilter { } } + public void setSortOrder_NotEqual(Integer sortOrder) { + setSortOrder_NotEqual(sortOrder, null, null); + } + + public void setSortOrder_NotEqual(Integer sortOrder, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setSortOrder_Equal(sortOrder, eqOpLambda); + }, notOpLambda); + } + + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -1239,6 +1437,25 @@ public abstract class BsScheduledJobCF extends AbstractConditionFilter { } } + public void setTarget_NotEqual(String target) { + setTarget_NotEqual(target, null, null); + } + + public void setTarget_NotEqual(String target, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setTarget_Equal(target, eqOpLambda); + }, notOpLambda); + } + + public void setTarget_Equal(String target) { + setTarget_Term(target, null); + } + + public void setTarget_Equal(String target, ConditionOptionCall opLambda) { + setTarget_Term(target, opLambda); + } + public void setTarget_Term(String target) { setTarget_Term(target, null); } @@ -1346,6 +1563,25 @@ public abstract class BsScheduledJobCF extends AbstractConditionFilter { } } + public void setUpdatedBy_NotEqual(String updatedBy) { + setUpdatedBy_NotEqual(updatedBy, null, null); + } + + public void setUpdatedBy_NotEqual(String updatedBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedBy_Equal(updatedBy, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1453,6 +1689,25 @@ public abstract class BsScheduledJobCF extends AbstractConditionFilter { } } + public void setUpdatedTime_NotEqual(Long updatedTime) { + setUpdatedTime_NotEqual(updatedTime, null, null); + } + + public void setUpdatedTime_NotEqual(Long updatedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedTime_Equal(updatedTime, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsSearchFieldLogCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsSearchFieldLogCF.java index af5c7dcb1..f31022111 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsSearchFieldLogCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsSearchFieldLogCF.java @@ -106,6 +106,25 @@ public abstract class BsSearchFieldLogCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -213,6 +232,25 @@ public abstract class BsSearchFieldLogCF extends AbstractConditionFilter { } } + public void setName_NotEqual(String name) { + setName_NotEqual(name, null, null); + } + + public void setName_NotEqual(String name, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setName_Equal(name, eqOpLambda); + }, notOpLambda); + } + + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -320,6 +358,25 @@ public abstract class BsSearchFieldLogCF extends AbstractConditionFilter { } } + public void setSearchLogId_NotEqual(String searchLogId) { + setSearchLogId_NotEqual(searchLogId, null, null); + } + + public void setSearchLogId_NotEqual(String searchLogId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setSearchLogId_Equal(searchLogId, eqOpLambda); + }, notOpLambda); + } + + public void setSearchLogId_Equal(String searchLogId) { + setSearchLogId_Term(searchLogId, null); + } + + public void setSearchLogId_Equal(String searchLogId, ConditionOptionCall opLambda) { + setSearchLogId_Term(searchLogId, opLambda); + } + public void setSearchLogId_Term(String searchLogId) { setSearchLogId_Term(searchLogId, null); } @@ -427,6 +484,25 @@ public abstract class BsSearchFieldLogCF extends AbstractConditionFilter { } } + public void setValue_NotEqual(String value) { + setValue_NotEqual(value, null, null); + } + + public void setValue_NotEqual(String value, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setValue_Equal(value, eqOpLambda); + }, notOpLambda); + } + + public void setValue_Equal(String value) { + setValue_Term(value, null); + } + + public void setValue_Equal(String value, ConditionOptionCall opLambda) { + setValue_Term(value, opLambda); + } + public void setValue_Term(String value) { setValue_Term(value, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsSearchLogCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsSearchLogCF.java index 026c5c3ce..d0c13742f 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsSearchLogCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsSearchLogCF.java @@ -106,6 +106,25 @@ public abstract class BsSearchLogCF extends AbstractConditionFilter { } } + public void setAccessType_NotEqual(String accessType) { + setAccessType_NotEqual(accessType, null, null); + } + + public void setAccessType_NotEqual(String accessType, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setAccessType_Equal(accessType, eqOpLambda); + }, notOpLambda); + } + + public void setAccessType_Equal(String accessType) { + setAccessType_Term(accessType, null); + } + + public void setAccessType_Equal(String accessType, ConditionOptionCall opLambda) { + setAccessType_Term(accessType, opLambda); + } + public void setAccessType_Term(String accessType) { setAccessType_Term(accessType, null); } @@ -213,6 +232,25 @@ public abstract class BsSearchLogCF extends AbstractConditionFilter { } } + public void setClientIp_NotEqual(String clientIp) { + setClientIp_NotEqual(clientIp, null, null); + } + + public void setClientIp_NotEqual(String clientIp, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setClientIp_Equal(clientIp, eqOpLambda); + }, notOpLambda); + } + + public void setClientIp_Equal(String clientIp) { + setClientIp_Term(clientIp, null); + } + + public void setClientIp_Equal(String clientIp, ConditionOptionCall opLambda) { + setClientIp_Term(clientIp, opLambda); + } + public void setClientIp_Term(String clientIp) { setClientIp_Term(clientIp, null); } @@ -320,6 +358,25 @@ public abstract class BsSearchLogCF extends AbstractConditionFilter { } } + public void setHitCount_NotEqual(Long hitCount) { + setHitCount_NotEqual(hitCount, null, null); + } + + public void setHitCount_NotEqual(Long hitCount, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setHitCount_Equal(hitCount, eqOpLambda); + }, notOpLambda); + } + + public void setHitCount_Equal(Long hitCount) { + setHitCount_Term(hitCount, null); + } + + public void setHitCount_Equal(Long hitCount, ConditionOptionCall opLambda) { + setHitCount_Term(hitCount, opLambda); + } + public void setHitCount_Term(Long hitCount) { setHitCount_Term(hitCount, null); } @@ -416,6 +473,25 @@ public abstract class BsSearchLogCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -523,6 +599,25 @@ public abstract class BsSearchLogCF extends AbstractConditionFilter { } } + public void setQueryOffset_NotEqual(Integer queryOffset) { + setQueryOffset_NotEqual(queryOffset, null, null); + } + + public void setQueryOffset_NotEqual(Integer queryOffset, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setQueryOffset_Equal(queryOffset, eqOpLambda); + }, notOpLambda); + } + + public void setQueryOffset_Equal(Integer queryOffset) { + setQueryOffset_Term(queryOffset, null); + } + + public void setQueryOffset_Equal(Integer queryOffset, ConditionOptionCall opLambda) { + setQueryOffset_Term(queryOffset, opLambda); + } + public void setQueryOffset_Term(Integer queryOffset) { setQueryOffset_Term(queryOffset, null); } @@ -619,6 +714,25 @@ public abstract class BsSearchLogCF extends AbstractConditionFilter { } } + public void setQueryPageSize_NotEqual(Integer queryPageSize) { + setQueryPageSize_NotEqual(queryPageSize, null, null); + } + + public void setQueryPageSize_NotEqual(Integer queryPageSize, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setQueryPageSize_Equal(queryPageSize, eqOpLambda); + }, notOpLambda); + } + + public void setQueryPageSize_Equal(Integer queryPageSize) { + setQueryPageSize_Term(queryPageSize, null); + } + + public void setQueryPageSize_Equal(Integer queryPageSize, ConditionOptionCall opLambda) { + setQueryPageSize_Term(queryPageSize, opLambda); + } + public void setQueryPageSize_Term(Integer queryPageSize) { setQueryPageSize_Term(queryPageSize, null); } @@ -715,6 +829,25 @@ public abstract class BsSearchLogCF extends AbstractConditionFilter { } } + public void setReferer_NotEqual(String referer) { + setReferer_NotEqual(referer, null, null); + } + + public void setReferer_NotEqual(String referer, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setReferer_Equal(referer, eqOpLambda); + }, notOpLambda); + } + + public void setReferer_Equal(String referer) { + setReferer_Term(referer, null); + } + + public void setReferer_Equal(String referer, ConditionOptionCall opLambda) { + setReferer_Term(referer, opLambda); + } + public void setReferer_Term(String referer) { setReferer_Term(referer, null); } @@ -822,6 +955,25 @@ public abstract class BsSearchLogCF extends AbstractConditionFilter { } } + public void setRequestedTime_NotEqual(Long requestedTime) { + setRequestedTime_NotEqual(requestedTime, null, null); + } + + public void setRequestedTime_NotEqual(Long requestedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setRequestedTime_Equal(requestedTime, eqOpLambda); + }, notOpLambda); + } + + public void setRequestedTime_Equal(Long requestedTime) { + setRequestedTime_Term(requestedTime, null); + } + + public void setRequestedTime_Equal(Long requestedTime, ConditionOptionCall opLambda) { + setRequestedTime_Term(requestedTime, opLambda); + } + public void setRequestedTime_Term(Long requestedTime) { setRequestedTime_Term(requestedTime, null); } @@ -918,6 +1070,25 @@ public abstract class BsSearchLogCF extends AbstractConditionFilter { } } + public void setResponseTime_NotEqual(Integer responseTime) { + setResponseTime_NotEqual(responseTime, null, null); + } + + public void setResponseTime_NotEqual(Integer responseTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setResponseTime_Equal(responseTime, eqOpLambda); + }, notOpLambda); + } + + public void setResponseTime_Equal(Integer responseTime) { + setResponseTime_Term(responseTime, null); + } + + public void setResponseTime_Equal(Integer responseTime, ConditionOptionCall opLambda) { + setResponseTime_Term(responseTime, opLambda); + } + public void setResponseTime_Term(Integer responseTime) { setResponseTime_Term(responseTime, null); } @@ -1014,6 +1185,25 @@ public abstract class BsSearchLogCF extends AbstractConditionFilter { } } + public void setSearchWord_NotEqual(String searchWord) { + setSearchWord_NotEqual(searchWord, null, null); + } + + public void setSearchWord_NotEqual(String searchWord, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setSearchWord_Equal(searchWord, eqOpLambda); + }, notOpLambda); + } + + public void setSearchWord_Equal(String searchWord) { + setSearchWord_Term(searchWord, null); + } + + public void setSearchWord_Equal(String searchWord, ConditionOptionCall opLambda) { + setSearchWord_Term(searchWord, opLambda); + } + public void setSearchWord_Term(String searchWord) { setSearchWord_Term(searchWord, null); } @@ -1121,6 +1311,25 @@ public abstract class BsSearchLogCF extends AbstractConditionFilter { } } + public void setUserAgent_NotEqual(String userAgent) { + setUserAgent_NotEqual(userAgent, null, null); + } + + public void setUserAgent_NotEqual(String userAgent, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUserAgent_Equal(userAgent, eqOpLambda); + }, notOpLambda); + } + + public void setUserAgent_Equal(String userAgent) { + setUserAgent_Term(userAgent, null); + } + + public void setUserAgent_Equal(String userAgent, ConditionOptionCall opLambda) { + setUserAgent_Term(userAgent, opLambda); + } + public void setUserAgent_Term(String userAgent) { setUserAgent_Term(userAgent, null); } @@ -1228,102 +1437,151 @@ public abstract class BsSearchLogCF extends AbstractConditionFilter { } } - public void setUserId_Term(Long userId) { - setUserId_Term(userId, null); + public void setUserInfoId_NotEqual(String userInfoId) { + setUserInfoId_NotEqual(userInfoId, null, null); } - public void setUserId_Term(Long userId, ConditionOptionCall opLambda) { - TermFilterBuilder builder = regTermF("userId", userId); + public void setUserInfoId_NotEqual(String userInfoId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUserInfoId_Equal(userInfoId, eqOpLambda); + }, notOpLambda); + } + + public void setUserInfoId_Equal(String userInfoId) { + setUserInfoId_Term(userInfoId, null); + } + + public void setUserInfoId_Equal(String userInfoId, ConditionOptionCall opLambda) { + setUserInfoId_Term(userInfoId, opLambda); + } + + public void setUserInfoId_Term(String userInfoId) { + setUserInfoId_Term(userInfoId, null); + } + + public void setUserInfoId_Term(String userInfoId, ConditionOptionCall opLambda) { + TermFilterBuilder builder = regTermF("userInfoId", userInfoId); if (opLambda != null) { opLambda.callback(builder); } } - public void setUserId_Terms(Collection userIdList) { - setUserId_Terms(userIdList, null); + public void setUserInfoId_Terms(Collection userInfoIdList) { + setUserInfoId_Terms(userInfoIdList, null); } - public void setUserId_Terms(Collection userIdList, ConditionOptionCall opLambda) { - TermsFilterBuilder builder = regTermsF("userId", userIdList); + public void setUserInfoId_Terms(Collection userInfoIdList, ConditionOptionCall opLambda) { + TermsFilterBuilder builder = regTermsF("userInfoId", userInfoIdList); if (opLambda != null) { opLambda.callback(builder); } } - public void setUserId_InScope(Collection userIdList) { - setUserId_Terms(userIdList, null); + public void setUserInfoId_InScope(Collection userInfoIdList) { + setUserInfoId_Terms(userInfoIdList, null); } - public void setUserId_InScope(Collection userIdList, ConditionOptionCall opLambda) { - setUserId_Terms(userIdList, opLambda); + public void setUserInfoId_InScope(Collection userInfoIdList, ConditionOptionCall opLambda) { + setUserInfoId_Terms(userInfoIdList, opLambda); } - public void setUserId_Exists() { - setUserId_Exists(null); + public void setUserInfoId_Prefix(String userInfoId) { + setUserInfoId_Prefix(userInfoId, null); } - public void setUserId_Exists(ConditionOptionCall opLambda) { - ExistsFilterBuilder builder = regExistsF("userId"); + public void setUserInfoId_Prefix(String userInfoId, ConditionOptionCall opLambda) { + PrefixFilterBuilder builder = regPrefixF("userInfoId", userInfoId); if (opLambda != null) { opLambda.callback(builder); } } - public void setUserId_Missing() { - setUserId_Missing(null); + public void setUserInfoId_Exists() { + setUserInfoId_Exists(null); } - public void setUserId_Missing(ConditionOptionCall opLambda) { - MissingFilterBuilder builder = regMissingF("userId"); + public void setUserInfoId_Exists(ConditionOptionCall opLambda) { + ExistsFilterBuilder builder = regExistsF("userInfoId"); if (opLambda != null) { opLambda.callback(builder); } } - public void setUserId_GreaterThan(Long userId) { - setUserId_GreaterThan(userId, null); + public void setUserInfoId_Missing() { + setUserInfoId_Missing(null); } - public void setUserId_GreaterThan(Long userId, ConditionOptionCall opLambda) { - RangeFilterBuilder builder = regRangeF("userId", ConditionKey.CK_GREATER_THAN, userId); + public void setUserInfoId_Missing(ConditionOptionCall opLambda) { + MissingFilterBuilder builder = regMissingF("userInfoId"); if (opLambda != null) { opLambda.callback(builder); } } - public void setUserId_LessThan(Long userId) { - setUserId_LessThan(userId, null); + public void setUserInfoId_GreaterThan(String userInfoId) { + setUserInfoId_GreaterThan(userInfoId, null); } - public void setUserId_LessThan(Long userId, ConditionOptionCall opLambda) { - RangeFilterBuilder builder = regRangeF("userId", ConditionKey.CK_LESS_THAN, userId); + public void setUserInfoId_GreaterThan(String userInfoId, ConditionOptionCall opLambda) { + RangeFilterBuilder builder = regRangeF("userInfoId", ConditionKey.CK_GREATER_THAN, userInfoId); if (opLambda != null) { opLambda.callback(builder); } } - public void setUserId_GreaterEqual(Long userId) { - setUserId_GreaterEqual(userId, null); + public void setUserInfoId_LessThan(String userInfoId) { + setUserInfoId_LessThan(userInfoId, null); } - public void setUserId_GreaterEqual(Long userId, ConditionOptionCall opLambda) { - RangeFilterBuilder builder = regRangeF("userId", ConditionKey.CK_GREATER_EQUAL, userId); + public void setUserInfoId_LessThan(String userInfoId, ConditionOptionCall opLambda) { + RangeFilterBuilder builder = regRangeF("userInfoId", ConditionKey.CK_LESS_THAN, userInfoId); if (opLambda != null) { opLambda.callback(builder); } } - public void setUserId_LessEqual(Long userId) { - setUserId_LessEqual(userId, null); + public void setUserInfoId_GreaterEqual(String userInfoId) { + setUserInfoId_GreaterEqual(userInfoId, null); } - public void setUserId_LessEqual(Long userId, ConditionOptionCall opLambda) { - RangeFilterBuilder builder = regRangeF("userId", ConditionKey.CK_LESS_EQUAL, userId); + public void setUserInfoId_GreaterEqual(String userInfoId, ConditionOptionCall opLambda) { + RangeFilterBuilder builder = regRangeF("userInfoId", ConditionKey.CK_GREATER_EQUAL, userInfoId); if (opLambda != null) { opLambda.callback(builder); } } + public void setUserInfoId_LessEqual(String userInfoId) { + setUserInfoId_LessEqual(userInfoId, null); + } + + public void setUserInfoId_LessEqual(String userInfoId, ConditionOptionCall opLambda) { + RangeFilterBuilder builder = regRangeF("userInfoId", ConditionKey.CK_LESS_EQUAL, userInfoId); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setUserSessionId_NotEqual(String userSessionId) { + setUserSessionId_NotEqual(userSessionId, null, null); + } + + public void setUserSessionId_NotEqual(String userSessionId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUserSessionId_Equal(userSessionId, eqOpLambda); + }, notOpLambda); + } + + public void setUserSessionId_Equal(String userSessionId) { + setUserSessionId_Term(userSessionId, null); + } + + public void setUserSessionId_Equal(String userSessionId, ConditionOptionCall opLambda) { + setUserSessionId_Term(userSessionId, opLambda); + } + public void setUserSessionId_Term(String userSessionId) { setUserSessionId_Term(userSessionId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsSuggestBadWordCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsSuggestBadWordCF.java index c3e26e301..03fb9e1ed 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsSuggestBadWordCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsSuggestBadWordCF.java @@ -106,6 +106,25 @@ public abstract class BsSuggestBadWordCF extends AbstractConditionFilter { } } + public void setCreatedBy_NotEqual(String createdBy) { + setCreatedBy_NotEqual(createdBy, null, null); + } + + public void setCreatedBy_NotEqual(String createdBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedBy_Equal(createdBy, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -213,6 +232,25 @@ public abstract class BsSuggestBadWordCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -309,6 +347,25 @@ public abstract class BsSuggestBadWordCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -416,6 +473,25 @@ public abstract class BsSuggestBadWordCF extends AbstractConditionFilter { } } + public void setSuggestWord_NotEqual(String suggestWord) { + setSuggestWord_NotEqual(suggestWord, null, null); + } + + public void setSuggestWord_NotEqual(String suggestWord, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setSuggestWord_Equal(suggestWord, eqOpLambda); + }, notOpLambda); + } + + public void setSuggestWord_Equal(String suggestWord) { + setSuggestWord_Term(suggestWord, null); + } + + public void setSuggestWord_Equal(String suggestWord, ConditionOptionCall opLambda) { + setSuggestWord_Term(suggestWord, opLambda); + } + public void setSuggestWord_Term(String suggestWord) { setSuggestWord_Term(suggestWord, null); } @@ -523,6 +599,25 @@ public abstract class BsSuggestBadWordCF extends AbstractConditionFilter { } } + public void setTargetLabel_NotEqual(String targetLabel) { + setTargetLabel_NotEqual(targetLabel, null, null); + } + + public void setTargetLabel_NotEqual(String targetLabel, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setTargetLabel_Equal(targetLabel, eqOpLambda); + }, notOpLambda); + } + + public void setTargetLabel_Equal(String targetLabel) { + setTargetLabel_Term(targetLabel, null); + } + + public void setTargetLabel_Equal(String targetLabel, ConditionOptionCall opLambda) { + setTargetLabel_Term(targetLabel, opLambda); + } + public void setTargetLabel_Term(String targetLabel) { setTargetLabel_Term(targetLabel, null); } @@ -630,6 +725,25 @@ public abstract class BsSuggestBadWordCF extends AbstractConditionFilter { } } + public void setTargetRole_NotEqual(String targetRole) { + setTargetRole_NotEqual(targetRole, null, null); + } + + public void setTargetRole_NotEqual(String targetRole, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setTargetRole_Equal(targetRole, eqOpLambda); + }, notOpLambda); + } + + public void setTargetRole_Equal(String targetRole) { + setTargetRole_Term(targetRole, null); + } + + public void setTargetRole_Equal(String targetRole, ConditionOptionCall opLambda) { + setTargetRole_Term(targetRole, opLambda); + } + public void setTargetRole_Term(String targetRole) { setTargetRole_Term(targetRole, null); } @@ -737,6 +851,25 @@ public abstract class BsSuggestBadWordCF extends AbstractConditionFilter { } } + public void setUpdatedBy_NotEqual(String updatedBy) { + setUpdatedBy_NotEqual(updatedBy, null, null); + } + + public void setUpdatedBy_NotEqual(String updatedBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedBy_Equal(updatedBy, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -844,6 +977,25 @@ public abstract class BsSuggestBadWordCF extends AbstractConditionFilter { } } + public void setUpdatedTime_NotEqual(Long updatedTime) { + setUpdatedTime_NotEqual(updatedTime, null, null); + } + + public void setUpdatedTime_NotEqual(Long updatedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedTime_Equal(updatedTime, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsSuggestElevateWordCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsSuggestElevateWordCF.java index c88450e15..e57fc204a 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsSuggestElevateWordCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsSuggestElevateWordCF.java @@ -106,6 +106,25 @@ public abstract class BsSuggestElevateWordCF extends AbstractConditionFilter { } } + public void setBoost_NotEqual(Float boost) { + setBoost_NotEqual(boost, null, null); + } + + public void setBoost_NotEqual(Float boost, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setBoost_Equal(boost, eqOpLambda); + }, notOpLambda); + } + + public void setBoost_Equal(Float boost) { + setBoost_Term(boost, null); + } + + public void setBoost_Equal(Float boost, ConditionOptionCall opLambda) { + setBoost_Term(boost, opLambda); + } + public void setBoost_Term(Float boost) { setBoost_Term(boost, null); } @@ -202,6 +221,25 @@ public abstract class BsSuggestElevateWordCF extends AbstractConditionFilter { } } + public void setCreatedBy_NotEqual(String createdBy) { + setCreatedBy_NotEqual(createdBy, null, null); + } + + public void setCreatedBy_NotEqual(String createdBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedBy_Equal(createdBy, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -309,6 +347,25 @@ public abstract class BsSuggestElevateWordCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -405,6 +462,25 @@ public abstract class BsSuggestElevateWordCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -512,6 +588,25 @@ public abstract class BsSuggestElevateWordCF extends AbstractConditionFilter { } } + public void setReading_NotEqual(String reading) { + setReading_NotEqual(reading, null, null); + } + + public void setReading_NotEqual(String reading, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setReading_Equal(reading, eqOpLambda); + }, notOpLambda); + } + + public void setReading_Equal(String reading) { + setReading_Term(reading, null); + } + + public void setReading_Equal(String reading, ConditionOptionCall opLambda) { + setReading_Term(reading, opLambda); + } + public void setReading_Term(String reading) { setReading_Term(reading, null); } @@ -619,6 +714,25 @@ public abstract class BsSuggestElevateWordCF extends AbstractConditionFilter { } } + public void setSuggestWord_NotEqual(String suggestWord) { + setSuggestWord_NotEqual(suggestWord, null, null); + } + + public void setSuggestWord_NotEqual(String suggestWord, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setSuggestWord_Equal(suggestWord, eqOpLambda); + }, notOpLambda); + } + + public void setSuggestWord_Equal(String suggestWord) { + setSuggestWord_Term(suggestWord, null); + } + + public void setSuggestWord_Equal(String suggestWord, ConditionOptionCall opLambda) { + setSuggestWord_Term(suggestWord, opLambda); + } + public void setSuggestWord_Term(String suggestWord) { setSuggestWord_Term(suggestWord, null); } @@ -726,6 +840,25 @@ public abstract class BsSuggestElevateWordCF extends AbstractConditionFilter { } } + public void setTargetLabel_NotEqual(String targetLabel) { + setTargetLabel_NotEqual(targetLabel, null, null); + } + + public void setTargetLabel_NotEqual(String targetLabel, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setTargetLabel_Equal(targetLabel, eqOpLambda); + }, notOpLambda); + } + + public void setTargetLabel_Equal(String targetLabel) { + setTargetLabel_Term(targetLabel, null); + } + + public void setTargetLabel_Equal(String targetLabel, ConditionOptionCall opLambda) { + setTargetLabel_Term(targetLabel, opLambda); + } + public void setTargetLabel_Term(String targetLabel) { setTargetLabel_Term(targetLabel, null); } @@ -833,6 +966,25 @@ public abstract class BsSuggestElevateWordCF extends AbstractConditionFilter { } } + public void setTargetRole_NotEqual(String targetRole) { + setTargetRole_NotEqual(targetRole, null, null); + } + + public void setTargetRole_NotEqual(String targetRole, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setTargetRole_Equal(targetRole, eqOpLambda); + }, notOpLambda); + } + + public void setTargetRole_Equal(String targetRole) { + setTargetRole_Term(targetRole, null); + } + + public void setTargetRole_Equal(String targetRole, ConditionOptionCall opLambda) { + setTargetRole_Term(targetRole, opLambda); + } + public void setTargetRole_Term(String targetRole) { setTargetRole_Term(targetRole, null); } @@ -940,6 +1092,25 @@ public abstract class BsSuggestElevateWordCF extends AbstractConditionFilter { } } + public void setUpdatedBy_NotEqual(String updatedBy) { + setUpdatedBy_NotEqual(updatedBy, null, null); + } + + public void setUpdatedBy_NotEqual(String updatedBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedBy_Equal(updatedBy, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1047,6 +1218,25 @@ public abstract class BsSuggestElevateWordCF extends AbstractConditionFilter { } } + public void setUpdatedTime_NotEqual(Long updatedTime) { + setUpdatedTime_NotEqual(updatedTime, null, null); + } + + public void setUpdatedTime_NotEqual(Long updatedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedTime_Equal(updatedTime, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsUserInfoCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsUserInfoCF.java index 5f7a7a400..f362089d4 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsUserInfoCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsUserInfoCF.java @@ -106,6 +106,25 @@ public abstract class BsUserInfoCF extends AbstractConditionFilter { } } + public void setCode_NotEqual(String code) { + setCode_NotEqual(code, null, null); + } + + public void setCode_NotEqual(String code, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCode_Equal(code, eqOpLambda); + }, notOpLambda); + } + + public void setCode_Equal(String code) { + setCode_Term(code, null); + } + + public void setCode_Equal(String code, ConditionOptionCall opLambda) { + setCode_Term(code, opLambda); + } + public void setCode_Term(String code) { setCode_Term(code, null); } @@ -213,6 +232,25 @@ public abstract class BsUserInfoCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -309,6 +347,25 @@ public abstract class BsUserInfoCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -416,6 +473,25 @@ public abstract class BsUserInfoCF extends AbstractConditionFilter { } } + public void setUpdatedTime_NotEqual(Long updatedTime) { + setUpdatedTime_NotEqual(updatedTime, null, null); + } + + public void setUpdatedTime_NotEqual(Long updatedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedTime_Equal(updatedTime, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsWebAuthenticationCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsWebAuthenticationCF.java index b251145d1..0b6343bc9 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsWebAuthenticationCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsWebAuthenticationCF.java @@ -106,6 +106,25 @@ public abstract class BsWebAuthenticationCF extends AbstractConditionFilter { } } + public void setAuthRealm_NotEqual(String authRealm) { + setAuthRealm_NotEqual(authRealm, null, null); + } + + public void setAuthRealm_NotEqual(String authRealm, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setAuthRealm_Equal(authRealm, eqOpLambda); + }, notOpLambda); + } + + public void setAuthRealm_Equal(String authRealm) { + setAuthRealm_Term(authRealm, null); + } + + public void setAuthRealm_Equal(String authRealm, ConditionOptionCall opLambda) { + setAuthRealm_Term(authRealm, opLambda); + } + public void setAuthRealm_Term(String authRealm) { setAuthRealm_Term(authRealm, null); } @@ -213,6 +232,25 @@ public abstract class BsWebAuthenticationCF extends AbstractConditionFilter { } } + public void setCreatedBy_NotEqual(String createdBy) { + setCreatedBy_NotEqual(createdBy, null, null); + } + + public void setCreatedBy_NotEqual(String createdBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedBy_Equal(createdBy, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -320,6 +358,25 @@ public abstract class BsWebAuthenticationCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -416,6 +473,25 @@ public abstract class BsWebAuthenticationCF extends AbstractConditionFilter { } } + public void setHostname_NotEqual(String hostname) { + setHostname_NotEqual(hostname, null, null); + } + + public void setHostname_NotEqual(String hostname, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setHostname_Equal(hostname, eqOpLambda); + }, notOpLambda); + } + + public void setHostname_Equal(String hostname) { + setHostname_Term(hostname, null); + } + + public void setHostname_Equal(String hostname, ConditionOptionCall opLambda) { + setHostname_Term(hostname, opLambda); + } + public void setHostname_Term(String hostname) { setHostname_Term(hostname, null); } @@ -523,6 +599,25 @@ public abstract class BsWebAuthenticationCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -630,6 +725,25 @@ public abstract class BsWebAuthenticationCF extends AbstractConditionFilter { } } + public void setParameters_NotEqual(String parameters) { + setParameters_NotEqual(parameters, null, null); + } + + public void setParameters_NotEqual(String parameters, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setParameters_Equal(parameters, eqOpLambda); + }, notOpLambda); + } + + public void setParameters_Equal(String parameters) { + setParameters_Term(parameters, null); + } + + public void setParameters_Equal(String parameters, ConditionOptionCall opLambda) { + setParameters_Term(parameters, opLambda); + } + public void setParameters_Term(String parameters) { setParameters_Term(parameters, null); } @@ -737,6 +851,25 @@ public abstract class BsWebAuthenticationCF extends AbstractConditionFilter { } } + public void setPassword_NotEqual(String password) { + setPassword_NotEqual(password, null, null); + } + + public void setPassword_NotEqual(String password, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setPassword_Equal(password, eqOpLambda); + }, notOpLambda); + } + + public void setPassword_Equal(String password) { + setPassword_Term(password, null); + } + + public void setPassword_Equal(String password, ConditionOptionCall opLambda) { + setPassword_Term(password, opLambda); + } + public void setPassword_Term(String password) { setPassword_Term(password, null); } @@ -844,6 +977,25 @@ public abstract class BsWebAuthenticationCF extends AbstractConditionFilter { } } + public void setPort_NotEqual(Integer port) { + setPort_NotEqual(port, null, null); + } + + public void setPort_NotEqual(Integer port, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setPort_Equal(port, eqOpLambda); + }, notOpLambda); + } + + public void setPort_Equal(Integer port) { + setPort_Term(port, null); + } + + public void setPort_Equal(Integer port, ConditionOptionCall opLambda) { + setPort_Term(port, opLambda); + } + public void setPort_Term(Integer port) { setPort_Term(port, null); } @@ -940,6 +1092,25 @@ public abstract class BsWebAuthenticationCF extends AbstractConditionFilter { } } + public void setProtocolScheme_NotEqual(String protocolScheme) { + setProtocolScheme_NotEqual(protocolScheme, null, null); + } + + public void setProtocolScheme_NotEqual(String protocolScheme, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setProtocolScheme_Equal(protocolScheme, eqOpLambda); + }, notOpLambda); + } + + public void setProtocolScheme_Equal(String protocolScheme) { + setProtocolScheme_Term(protocolScheme, null); + } + + public void setProtocolScheme_Equal(String protocolScheme, ConditionOptionCall opLambda) { + setProtocolScheme_Term(protocolScheme, opLambda); + } + public void setProtocolScheme_Term(String protocolScheme) { setProtocolScheme_Term(protocolScheme, null); } @@ -1047,6 +1218,25 @@ public abstract class BsWebAuthenticationCF extends AbstractConditionFilter { } } + public void setUpdatedBy_NotEqual(String updatedBy) { + setUpdatedBy_NotEqual(updatedBy, null, null); + } + + public void setUpdatedBy_NotEqual(String updatedBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedBy_Equal(updatedBy, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1154,6 +1344,25 @@ public abstract class BsWebAuthenticationCF extends AbstractConditionFilter { } } + public void setUpdatedTime_NotEqual(Long updatedTime) { + setUpdatedTime_NotEqual(updatedTime, null, null); + } + + public void setUpdatedTime_NotEqual(Long updatedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedTime_Equal(updatedTime, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } @@ -1250,6 +1459,25 @@ public abstract class BsWebAuthenticationCF extends AbstractConditionFilter { } } + public void setUsername_NotEqual(String username) { + setUsername_NotEqual(username, null, null); + } + + public void setUsername_NotEqual(String username, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUsername_Equal(username, eqOpLambda); + }, notOpLambda); + } + + public void setUsername_Equal(String username) { + setUsername_Term(username, null); + } + + public void setUsername_Equal(String username, ConditionOptionCall opLambda) { + setUsername_Term(username, opLambda); + } + public void setUsername_Term(String username) { setUsername_Term(username, null); } @@ -1357,6 +1585,25 @@ public abstract class BsWebAuthenticationCF extends AbstractConditionFilter { } } + public void setWebConfigId_NotEqual(String webConfigId) { + setWebConfigId_NotEqual(webConfigId, null, null); + } + + public void setWebConfigId_NotEqual(String webConfigId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setWebConfigId_Equal(webConfigId, eqOpLambda); + }, notOpLambda); + } + + public void setWebConfigId_Equal(String webConfigId) { + setWebConfigId_Term(webConfigId, null); + } + + public void setWebConfigId_Equal(String webConfigId, ConditionOptionCall opLambda) { + setWebConfigId_Term(webConfigId, opLambda); + } + public void setWebConfigId_Term(String webConfigId) { setWebConfigId_Term(webConfigId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsWebConfigCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsWebConfigCF.java index bd65e3e33..4984a25b9 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsWebConfigCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsWebConfigCF.java @@ -106,6 +106,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setAvailable_NotEqual(Boolean available) { + setAvailable_NotEqual(available, null, null); + } + + public void setAvailable_NotEqual(Boolean available, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setAvailable_Equal(available, eqOpLambda); + }, notOpLambda); + } + + public void setAvailable_Equal(Boolean available) { + setAvailable_Term(available, null); + } + + public void setAvailable_Equal(Boolean available, ConditionOptionCall opLambda) { + setAvailable_Term(available, opLambda); + } + public void setAvailable_Term(Boolean available) { setAvailable_Term(available, null); } @@ -202,6 +221,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setBoost_NotEqual(Float boost) { + setBoost_NotEqual(boost, null, null); + } + + public void setBoost_NotEqual(Float boost, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setBoost_Equal(boost, eqOpLambda); + }, notOpLambda); + } + + public void setBoost_Equal(Float boost) { + setBoost_Term(boost, null); + } + + public void setBoost_Equal(Float boost, ConditionOptionCall opLambda) { + setBoost_Term(boost, opLambda); + } + public void setBoost_Term(Float boost) { setBoost_Term(boost, null); } @@ -298,6 +336,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setConfigParameter_NotEqual(String configParameter) { + setConfigParameter_NotEqual(configParameter, null, null); + } + + public void setConfigParameter_NotEqual(String configParameter, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setConfigParameter_Equal(configParameter, eqOpLambda); + }, notOpLambda); + } + + public void setConfigParameter_Equal(String configParameter) { + setConfigParameter_Term(configParameter, null); + } + + public void setConfigParameter_Equal(String configParameter, ConditionOptionCall opLambda) { + setConfigParameter_Term(configParameter, opLambda); + } + public void setConfigParameter_Term(String configParameter) { setConfigParameter_Term(configParameter, null); } @@ -405,6 +462,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setCreatedBy_NotEqual(String createdBy) { + setCreatedBy_NotEqual(createdBy, null, null); + } + + public void setCreatedBy_NotEqual(String createdBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedBy_Equal(createdBy, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -512,6 +588,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setCreatedTime_NotEqual(Long createdTime) { + setCreatedTime_NotEqual(createdTime, null, null); + } + + public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setCreatedTime_Equal(createdTime, eqOpLambda); + }, notOpLambda); + } + + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -608,6 +703,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setDepth_NotEqual(Integer depth) { + setDepth_NotEqual(depth, null, null); + } + + public void setDepth_NotEqual(Integer depth, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setDepth_Equal(depth, eqOpLambda); + }, notOpLambda); + } + + public void setDepth_Equal(Integer depth) { + setDepth_Term(depth, null); + } + + public void setDepth_Equal(Integer depth, ConditionOptionCall opLambda) { + setDepth_Term(depth, opLambda); + } + public void setDepth_Term(Integer depth) { setDepth_Term(depth, null); } @@ -704,6 +818,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setExcludedDocUrls_NotEqual(String excludedDocUrls) { + setExcludedDocUrls_NotEqual(excludedDocUrls, null, null); + } + + public void setExcludedDocUrls_NotEqual(String excludedDocUrls, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setExcludedDocUrls_Equal(excludedDocUrls, eqOpLambda); + }, notOpLambda); + } + + public void setExcludedDocUrls_Equal(String excludedDocUrls) { + setExcludedDocUrls_Term(excludedDocUrls, null); + } + + public void setExcludedDocUrls_Equal(String excludedDocUrls, ConditionOptionCall opLambda) { + setExcludedDocUrls_Term(excludedDocUrls, opLambda); + } + public void setExcludedDocUrls_Term(String excludedDocUrls) { setExcludedDocUrls_Term(excludedDocUrls, null); } @@ -811,6 +944,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setExcludedUrls_NotEqual(String excludedUrls) { + setExcludedUrls_NotEqual(excludedUrls, null, null); + } + + public void setExcludedUrls_NotEqual(String excludedUrls, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setExcludedUrls_Equal(excludedUrls, eqOpLambda); + }, notOpLambda); + } + + public void setExcludedUrls_Equal(String excludedUrls) { + setExcludedUrls_Term(excludedUrls, null); + } + + public void setExcludedUrls_Equal(String excludedUrls, ConditionOptionCall opLambda) { + setExcludedUrls_Term(excludedUrls, opLambda); + } + public void setExcludedUrls_Term(String excludedUrls) { setExcludedUrls_Term(excludedUrls, null); } @@ -918,6 +1070,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -1025,6 +1196,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setIncludedDocUrls_NotEqual(String includedDocUrls) { + setIncludedDocUrls_NotEqual(includedDocUrls, null, null); + } + + public void setIncludedDocUrls_NotEqual(String includedDocUrls, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setIncludedDocUrls_Equal(includedDocUrls, eqOpLambda); + }, notOpLambda); + } + + public void setIncludedDocUrls_Equal(String includedDocUrls) { + setIncludedDocUrls_Term(includedDocUrls, null); + } + + public void setIncludedDocUrls_Equal(String includedDocUrls, ConditionOptionCall opLambda) { + setIncludedDocUrls_Term(includedDocUrls, opLambda); + } + public void setIncludedDocUrls_Term(String includedDocUrls) { setIncludedDocUrls_Term(includedDocUrls, null); } @@ -1132,6 +1322,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setIncludedUrls_NotEqual(String includedUrls) { + setIncludedUrls_NotEqual(includedUrls, null, null); + } + + public void setIncludedUrls_NotEqual(String includedUrls, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setIncludedUrls_Equal(includedUrls, eqOpLambda); + }, notOpLambda); + } + + public void setIncludedUrls_Equal(String includedUrls) { + setIncludedUrls_Term(includedUrls, null); + } + + public void setIncludedUrls_Equal(String includedUrls, ConditionOptionCall opLambda) { + setIncludedUrls_Term(includedUrls, opLambda); + } + public void setIncludedUrls_Term(String includedUrls) { setIncludedUrls_Term(includedUrls, null); } @@ -1239,6 +1448,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setIntervalTime_NotEqual(Integer intervalTime) { + setIntervalTime_NotEqual(intervalTime, null, null); + } + + public void setIntervalTime_NotEqual(Integer intervalTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setIntervalTime_Equal(intervalTime, eqOpLambda); + }, notOpLambda); + } + + public void setIntervalTime_Equal(Integer intervalTime) { + setIntervalTime_Term(intervalTime, null); + } + + public void setIntervalTime_Equal(Integer intervalTime, ConditionOptionCall opLambda) { + setIntervalTime_Term(intervalTime, opLambda); + } + public void setIntervalTime_Term(Integer intervalTime) { setIntervalTime_Term(intervalTime, null); } @@ -1335,6 +1563,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setMaxAccessCount_NotEqual(Long maxAccessCount) { + setMaxAccessCount_NotEqual(maxAccessCount, null, null); + } + + public void setMaxAccessCount_NotEqual(Long maxAccessCount, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setMaxAccessCount_Equal(maxAccessCount, eqOpLambda); + }, notOpLambda); + } + + public void setMaxAccessCount_Equal(Long maxAccessCount) { + setMaxAccessCount_Term(maxAccessCount, null); + } + + public void setMaxAccessCount_Equal(Long maxAccessCount, ConditionOptionCall opLambda) { + setMaxAccessCount_Term(maxAccessCount, opLambda); + } + public void setMaxAccessCount_Term(Long maxAccessCount) { setMaxAccessCount_Term(maxAccessCount, null); } @@ -1431,6 +1678,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setName_NotEqual(String name) { + setName_NotEqual(name, null, null); + } + + public void setName_NotEqual(String name, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setName_Equal(name, eqOpLambda); + }, notOpLambda); + } + + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -1538,6 +1804,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setNumOfThread_NotEqual(Integer numOfThread) { + setNumOfThread_NotEqual(numOfThread, null, null); + } + + public void setNumOfThread_NotEqual(Integer numOfThread, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setNumOfThread_Equal(numOfThread, eqOpLambda); + }, notOpLambda); + } + + public void setNumOfThread_Equal(Integer numOfThread) { + setNumOfThread_Term(numOfThread, null); + } + + public void setNumOfThread_Equal(Integer numOfThread, ConditionOptionCall opLambda) { + setNumOfThread_Term(numOfThread, opLambda); + } + public void setNumOfThread_Term(Integer numOfThread) { setNumOfThread_Term(numOfThread, null); } @@ -1634,6 +1919,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setSortOrder_NotEqual(Integer sortOrder) { + setSortOrder_NotEqual(sortOrder, null, null); + } + + public void setSortOrder_NotEqual(Integer sortOrder, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setSortOrder_Equal(sortOrder, eqOpLambda); + }, notOpLambda); + } + + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -1730,6 +2034,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setUpdatedBy_NotEqual(String updatedBy) { + setUpdatedBy_NotEqual(updatedBy, null, null); + } + + public void setUpdatedBy_NotEqual(String updatedBy, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedBy_Equal(updatedBy, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1837,6 +2160,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setUpdatedTime_NotEqual(Long updatedTime) { + setUpdatedTime_NotEqual(updatedTime, null, null); + } + + public void setUpdatedTime_NotEqual(Long updatedTime, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUpdatedTime_Equal(updatedTime, eqOpLambda); + }, notOpLambda); + } + + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } @@ -1933,6 +2275,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setUrls_NotEqual(String urls) { + setUrls_NotEqual(urls, null, null); + } + + public void setUrls_NotEqual(String urls, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUrls_Equal(urls, eqOpLambda); + }, notOpLambda); + } + + public void setUrls_Equal(String urls) { + setUrls_Term(urls, null); + } + + public void setUrls_Equal(String urls, ConditionOptionCall opLambda) { + setUrls_Term(urls, opLambda); + } + public void setUrls_Term(String urls) { setUrls_Term(urls, null); } @@ -2040,6 +2401,25 @@ public abstract class BsWebConfigCF extends AbstractConditionFilter { } } + public void setUserAgent_NotEqual(String userAgent) { + setUserAgent_NotEqual(userAgent, null, null); + } + + public void setUserAgent_NotEqual(String userAgent, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setUserAgent_Equal(userAgent, eqOpLambda); + }, notOpLambda); + } + + public void setUserAgent_Equal(String userAgent) { + setUserAgent_Term(userAgent, null); + } + + public void setUserAgent_Equal(String userAgent, ConditionOptionCall opLambda) { + setUserAgent_Term(userAgent, opLambda); + } + public void setUserAgent_Term(String userAgent) { setUserAgent_Term(userAgent, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsWebConfigToLabelCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsWebConfigToLabelCF.java index 20b5742a7..a0d900f4b 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsWebConfigToLabelCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsWebConfigToLabelCF.java @@ -106,6 +106,25 @@ public abstract class BsWebConfigToLabelCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -213,6 +232,25 @@ public abstract class BsWebConfigToLabelCF extends AbstractConditionFilter { } } + public void setLabelTypeId_NotEqual(String labelTypeId) { + setLabelTypeId_NotEqual(labelTypeId, null, null); + } + + public void setLabelTypeId_NotEqual(String labelTypeId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setLabelTypeId_Equal(labelTypeId, eqOpLambda); + }, notOpLambda); + } + + public void setLabelTypeId_Equal(String labelTypeId) { + setLabelTypeId_Term(labelTypeId, null); + } + + public void setLabelTypeId_Equal(String labelTypeId, ConditionOptionCall opLambda) { + setLabelTypeId_Term(labelTypeId, opLambda); + } + public void setLabelTypeId_Term(String labelTypeId) { setLabelTypeId_Term(labelTypeId, null); } @@ -320,6 +358,25 @@ public abstract class BsWebConfigToLabelCF extends AbstractConditionFilter { } } + public void setWebConfigId_NotEqual(String webConfigId) { + setWebConfigId_NotEqual(webConfigId, null, null); + } + + public void setWebConfigId_NotEqual(String webConfigId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setWebConfigId_Equal(webConfigId, eqOpLambda); + }, notOpLambda); + } + + public void setWebConfigId_Equal(String webConfigId) { + setWebConfigId_Term(webConfigId, null); + } + + public void setWebConfigId_Equal(String webConfigId, ConditionOptionCall opLambda) { + setWebConfigId_Term(webConfigId, opLambda); + } + public void setWebConfigId_Term(String webConfigId) { setWebConfigId_Term(webConfigId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsWebConfigToRoleCF.java b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsWebConfigToRoleCF.java index 9747c4465..ce1adaea3 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsWebConfigToRoleCF.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cf/bs/BsWebConfigToRoleCF.java @@ -106,6 +106,25 @@ public abstract class BsWebConfigToRoleCF extends AbstractConditionFilter { } } + public void setId_NotEqual(String id) { + setId_NotEqual(id, null, null); + } + + public void setId_NotEqual(String id, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setId_Equal(id, eqOpLambda); + }, notOpLambda); + } + + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -213,6 +232,25 @@ public abstract class BsWebConfigToRoleCF extends AbstractConditionFilter { } } + public void setRoleTypeId_NotEqual(String roleTypeId) { + setRoleTypeId_NotEqual(roleTypeId, null, null); + } + + public void setRoleTypeId_NotEqual(String roleTypeId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setRoleTypeId_Equal(roleTypeId, eqOpLambda); + }, notOpLambda); + } + + public void setRoleTypeId_Equal(String roleTypeId) { + setRoleTypeId_Term(roleTypeId, null); + } + + public void setRoleTypeId_Equal(String roleTypeId, ConditionOptionCall opLambda) { + setRoleTypeId_Term(roleTypeId, opLambda); + } + public void setRoleTypeId_Term(String roleTypeId) { setRoleTypeId_Term(roleTypeId, null); } @@ -320,6 +358,25 @@ public abstract class BsWebConfigToRoleCF extends AbstractConditionFilter { } } + public void setWebConfigId_NotEqual(String webConfigId) { + setWebConfigId_NotEqual(webConfigId, null, null); + } + + public void setWebConfigId_NotEqual(String webConfigId, ConditionOptionCall notOpLambda, + ConditionOptionCall eqOpLambda) { + not(subCf -> { + subCf.setWebConfigId_Equal(webConfigId, eqOpLambda); + }, notOpLambda); + } + + public void setWebConfigId_Equal(String webConfigId) { + setWebConfigId_Term(webConfigId, null); + } + + public void setWebConfigId_Equal(String webConfigId, ConditionOptionCall opLambda) { + setWebConfigId_Term(webConfigId, opLambda); + } + public void setWebConfigId_Term(String webConfigId) { setWebConfigId_Term(webConfigId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsBoostDocumentRuleCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsBoostDocumentRuleCQ.java index 69e57de35..22bfeb415 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsBoostDocumentRuleCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsBoostDocumentRuleCQ.java @@ -63,6 +63,14 @@ public abstract class BsBoostDocumentRuleCQ extends AbstractConditionQuery { } } + public void setBoostExpr_Equal(String boostExpr) { + setBoostExpr_Term(boostExpr, null); + } + + public void setBoostExpr_Equal(String boostExpr, ConditionOptionCall opLambda) { + setBoostExpr_Term(boostExpr, opLambda); + } + public void setBoostExpr_Term(String boostExpr) { setBoostExpr_Term(boostExpr, null); } @@ -202,6 +210,14 @@ public abstract class BsBoostDocumentRuleCQ extends AbstractConditionQuery { return this; } + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -341,6 +357,14 @@ public abstract class BsBoostDocumentRuleCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -469,6 +493,14 @@ public abstract class BsBoostDocumentRuleCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -608,6 +640,14 @@ public abstract class BsBoostDocumentRuleCQ extends AbstractConditionQuery { return this; } + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -736,6 +776,14 @@ public abstract class BsBoostDocumentRuleCQ extends AbstractConditionQuery { return this; } + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -875,6 +923,14 @@ public abstract class BsBoostDocumentRuleCQ extends AbstractConditionQuery { return this; } + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } @@ -1003,6 +1059,14 @@ public abstract class BsBoostDocumentRuleCQ extends AbstractConditionQuery { return this; } + public void setUrlExpr_Equal(String urlExpr) { + setUrlExpr_Term(urlExpr, null); + } + + public void setUrlExpr_Equal(String urlExpr, ConditionOptionCall opLambda) { + setUrlExpr_Term(urlExpr, opLambda); + } + public void setUrlExpr_Term(String urlExpr) { setUrlExpr_Term(urlExpr, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsClickLogCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsClickLogCQ.java index 8f7d8a5d5..2e47ef929 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsClickLogCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsClickLogCQ.java @@ -62,6 +62,14 @@ public abstract class BsClickLogCQ extends AbstractConditionQuery { } } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -201,6 +209,14 @@ public abstract class BsClickLogCQ extends AbstractConditionQuery { return this; } + public void setRequestedTime_Equal(Long requestedTime) { + setRequestedTime_Term(requestedTime, null); + } + + public void setRequestedTime_Equal(Long requestedTime, ConditionOptionCall opLambda) { + setRequestedTime_Term(requestedTime, opLambda); + } + public void setRequestedTime_Term(Long requestedTime) { setRequestedTime_Term(requestedTime, null); } @@ -329,6 +345,14 @@ public abstract class BsClickLogCQ extends AbstractConditionQuery { return this; } + public void setSearchLogId_Equal(String searchLogId) { + setSearchLogId_Term(searchLogId, null); + } + + public void setSearchLogId_Equal(String searchLogId, ConditionOptionCall opLambda) { + setSearchLogId_Term(searchLogId, opLambda); + } + public void setSearchLogId_Term(String searchLogId) { setSearchLogId_Term(searchLogId, null); } @@ -468,6 +492,14 @@ public abstract class BsClickLogCQ extends AbstractConditionQuery { return this; } + public void setUrl_Equal(String url) { + setUrl_Term(url, null); + } + + public void setUrl_Equal(String url, ConditionOptionCall opLambda) { + setUrl_Term(url, opLambda); + } + public void setUrl_Term(String url) { setUrl_Term(url, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsCrawlingSessionCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsCrawlingSessionCQ.java index 14b023b3e..48fe5bc06 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsCrawlingSessionCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsCrawlingSessionCQ.java @@ -63,6 +63,14 @@ public abstract class BsCrawlingSessionCQ extends AbstractConditionQuery { } } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -191,6 +199,14 @@ public abstract class BsCrawlingSessionCQ extends AbstractConditionQuery { return this; } + public void setExpiredTime_Equal(Long expiredTime) { + setExpiredTime_Term(expiredTime, null); + } + + public void setExpiredTime_Equal(Long expiredTime, ConditionOptionCall opLambda) { + setExpiredTime_Term(expiredTime, opLambda); + } + public void setExpiredTime_Term(Long expiredTime) { setExpiredTime_Term(expiredTime, null); } @@ -319,6 +335,14 @@ public abstract class BsCrawlingSessionCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -458,6 +482,14 @@ public abstract class BsCrawlingSessionCQ extends AbstractConditionQuery { return this; } + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -597,6 +629,14 @@ public abstract class BsCrawlingSessionCQ extends AbstractConditionQuery { return this; } + public void setSessionId_Equal(String sessionId) { + setSessionId_Term(sessionId, null); + } + + public void setSessionId_Equal(String sessionId, ConditionOptionCall opLambda) { + setSessionId_Term(sessionId, opLambda); + } + public void setSessionId_Term(String sessionId) { setSessionId_Term(sessionId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsCrawlingSessionInfoCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsCrawlingSessionInfoCQ.java index 12c5ae44b..0e482e8b2 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsCrawlingSessionInfoCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsCrawlingSessionInfoCQ.java @@ -63,6 +63,14 @@ public abstract class BsCrawlingSessionInfoCQ extends AbstractConditionQuery { } } + public void setCrawlingSessionId_Equal(String crawlingSessionId) { + setCrawlingSessionId_Term(crawlingSessionId, null); + } + + public void setCrawlingSessionId_Equal(String crawlingSessionId, ConditionOptionCall opLambda) { + setCrawlingSessionId_Term(crawlingSessionId, opLambda); + } + public void setCrawlingSessionId_Term(String crawlingSessionId) { setCrawlingSessionId_Term(crawlingSessionId, null); } @@ -202,6 +210,14 @@ public abstract class BsCrawlingSessionInfoCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -330,6 +346,14 @@ public abstract class BsCrawlingSessionInfoCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -469,6 +493,14 @@ public abstract class BsCrawlingSessionInfoCQ extends AbstractConditionQuery { return this; } + public void setKey_Equal(String key) { + setKey_Term(key, null); + } + + public void setKey_Equal(String key, ConditionOptionCall opLambda) { + setKey_Term(key, opLambda); + } + public void setKey_Term(String key) { setKey_Term(key, null); } @@ -608,6 +640,14 @@ public abstract class BsCrawlingSessionInfoCQ extends AbstractConditionQuery { return this; } + public void setValue_Equal(String value) { + setValue_Term(value, null); + } + + public void setValue_Equal(String value, ConditionOptionCall opLambda) { + setValue_Term(value, opLambda); + } + public void setValue_Term(String value) { setValue_Term(value, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsDataConfigCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsDataConfigCQ.java index 3bbae2db4..ce8512578 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsDataConfigCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsDataConfigCQ.java @@ -62,6 +62,14 @@ public abstract class BsDataConfigCQ extends AbstractConditionQuery { } } + public void setAvailable_Equal(Boolean available) { + setAvailable_Term(available, null); + } + + public void setAvailable_Equal(Boolean available, ConditionOptionCall opLambda) { + setAvailable_Term(available, opLambda); + } + public void setAvailable_Term(Boolean available) { setAvailable_Term(available, null); } @@ -190,6 +198,14 @@ public abstract class BsDataConfigCQ extends AbstractConditionQuery { return this; } + public void setBoost_Equal(Float boost) { + setBoost_Term(boost, null); + } + + public void setBoost_Equal(Float boost, ConditionOptionCall opLambda) { + setBoost_Term(boost, opLambda); + } + public void setBoost_Term(Float boost) { setBoost_Term(boost, null); } @@ -318,6 +334,14 @@ public abstract class BsDataConfigCQ extends AbstractConditionQuery { return this; } + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -457,6 +481,14 @@ public abstract class BsDataConfigCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -585,6 +617,14 @@ public abstract class BsDataConfigCQ extends AbstractConditionQuery { return this; } + public void setHandlerName_Equal(String handlerName) { + setHandlerName_Term(handlerName, null); + } + + public void setHandlerName_Equal(String handlerName, ConditionOptionCall opLambda) { + setHandlerName_Term(handlerName, opLambda); + } + public void setHandlerName_Term(String handlerName) { setHandlerName_Term(handlerName, null); } @@ -724,6 +764,14 @@ public abstract class BsDataConfigCQ extends AbstractConditionQuery { return this; } + public void setHandlerParameter_Equal(String handlerParameter) { + setHandlerParameter_Term(handlerParameter, null); + } + + public void setHandlerParameter_Equal(String handlerParameter, ConditionOptionCall opLambda) { + setHandlerParameter_Term(handlerParameter, opLambda); + } + public void setHandlerParameter_Term(String handlerParameter) { setHandlerParameter_Term(handlerParameter, null); } @@ -863,6 +911,14 @@ public abstract class BsDataConfigCQ extends AbstractConditionQuery { return this; } + public void setHandlerScript_Equal(String handlerScript) { + setHandlerScript_Term(handlerScript, null); + } + + public void setHandlerScript_Equal(String handlerScript, ConditionOptionCall opLambda) { + setHandlerScript_Term(handlerScript, opLambda); + } + public void setHandlerScript_Term(String handlerScript) { setHandlerScript_Term(handlerScript, null); } @@ -1002,6 +1058,14 @@ public abstract class BsDataConfigCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -1141,6 +1205,14 @@ public abstract class BsDataConfigCQ extends AbstractConditionQuery { return this; } + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -1280,6 +1352,14 @@ public abstract class BsDataConfigCQ extends AbstractConditionQuery { return this; } + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -1408,6 +1488,14 @@ public abstract class BsDataConfigCQ extends AbstractConditionQuery { return this; } + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1547,6 +1635,14 @@ public abstract class BsDataConfigCQ extends AbstractConditionQuery { return this; } + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsDataConfigToLabelCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsDataConfigToLabelCQ.java index 3ae9f6bf1..4c37e939b 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsDataConfigToLabelCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsDataConfigToLabelCQ.java @@ -63,6 +63,14 @@ public abstract class BsDataConfigToLabelCQ extends AbstractConditionQuery { } } + public void setDataConfigId_Equal(String dataConfigId) { + setDataConfigId_Term(dataConfigId, null); + } + + public void setDataConfigId_Equal(String dataConfigId, ConditionOptionCall opLambda) { + setDataConfigId_Term(dataConfigId, opLambda); + } + public void setDataConfigId_Term(String dataConfigId) { setDataConfigId_Term(dataConfigId, null); } @@ -202,6 +210,14 @@ public abstract class BsDataConfigToLabelCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -341,6 +357,14 @@ public abstract class BsDataConfigToLabelCQ extends AbstractConditionQuery { return this; } + public void setLabelTypeId_Equal(String labelTypeId) { + setLabelTypeId_Term(labelTypeId, null); + } + + public void setLabelTypeId_Equal(String labelTypeId, ConditionOptionCall opLambda) { + setLabelTypeId_Term(labelTypeId, opLambda); + } + public void setLabelTypeId_Term(String labelTypeId) { setLabelTypeId_Term(labelTypeId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsDataConfigToRoleCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsDataConfigToRoleCQ.java index 58bc52ef6..a65d89eb9 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsDataConfigToRoleCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsDataConfigToRoleCQ.java @@ -63,6 +63,14 @@ public abstract class BsDataConfigToRoleCQ extends AbstractConditionQuery { } } + public void setDataConfigId_Equal(String dataConfigId) { + setDataConfigId_Term(dataConfigId, null); + } + + public void setDataConfigId_Equal(String dataConfigId, ConditionOptionCall opLambda) { + setDataConfigId_Term(dataConfigId, opLambda); + } + public void setDataConfigId_Term(String dataConfigId) { setDataConfigId_Term(dataConfigId, null); } @@ -202,6 +210,14 @@ public abstract class BsDataConfigToRoleCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -341,6 +357,14 @@ public abstract class BsDataConfigToRoleCQ extends AbstractConditionQuery { return this; } + public void setRoleTypeId_Equal(String roleTypeId) { + setRoleTypeId_Term(roleTypeId, null); + } + + public void setRoleTypeId_Equal(String roleTypeId, ConditionOptionCall opLambda) { + setRoleTypeId_Term(roleTypeId, opLambda); + } + public void setRoleTypeId_Term(String roleTypeId) { setRoleTypeId_Term(roleTypeId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFailureUrlCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFailureUrlCQ.java index 99d52a8be..4f38f3469 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFailureUrlCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFailureUrlCQ.java @@ -62,6 +62,14 @@ public abstract class BsFailureUrlCQ extends AbstractConditionQuery { } } + public void setConfigId_Equal(String configId) { + setConfigId_Term(configId, null); + } + + public void setConfigId_Equal(String configId, ConditionOptionCall opLambda) { + setConfigId_Term(configId, opLambda); + } + public void setConfigId_Term(String configId) { setConfigId_Term(configId, null); } @@ -201,6 +209,14 @@ public abstract class BsFailureUrlCQ extends AbstractConditionQuery { return this; } + public void setErrorCount_Equal(Integer errorCount) { + setErrorCount_Term(errorCount, null); + } + + public void setErrorCount_Equal(Integer errorCount, ConditionOptionCall opLambda) { + setErrorCount_Term(errorCount, opLambda); + } + public void setErrorCount_Term(Integer errorCount) { setErrorCount_Term(errorCount, null); } @@ -329,6 +345,14 @@ public abstract class BsFailureUrlCQ extends AbstractConditionQuery { return this; } + public void setErrorLog_Equal(String errorLog) { + setErrorLog_Term(errorLog, null); + } + + public void setErrorLog_Equal(String errorLog, ConditionOptionCall opLambda) { + setErrorLog_Term(errorLog, opLambda); + } + public void setErrorLog_Term(String errorLog) { setErrorLog_Term(errorLog, null); } @@ -468,6 +492,14 @@ public abstract class BsFailureUrlCQ extends AbstractConditionQuery { return this; } + public void setErrorName_Equal(String errorName) { + setErrorName_Term(errorName, null); + } + + public void setErrorName_Equal(String errorName, ConditionOptionCall opLambda) { + setErrorName_Term(errorName, opLambda); + } + public void setErrorName_Term(String errorName) { setErrorName_Term(errorName, null); } @@ -607,6 +639,14 @@ public abstract class BsFailureUrlCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -746,6 +786,14 @@ public abstract class BsFailureUrlCQ extends AbstractConditionQuery { return this; } + public void setLastAccessTime_Equal(Long lastAccessTime) { + setLastAccessTime_Term(lastAccessTime, null); + } + + public void setLastAccessTime_Equal(Long lastAccessTime, ConditionOptionCall opLambda) { + setLastAccessTime_Term(lastAccessTime, opLambda); + } + public void setLastAccessTime_Term(Long lastAccessTime) { setLastAccessTime_Term(lastAccessTime, null); } @@ -874,6 +922,14 @@ public abstract class BsFailureUrlCQ extends AbstractConditionQuery { return this; } + public void setThreadName_Equal(String threadName) { + setThreadName_Term(threadName, null); + } + + public void setThreadName_Equal(String threadName, ConditionOptionCall opLambda) { + setThreadName_Term(threadName, opLambda); + } + public void setThreadName_Term(String threadName) { setThreadName_Term(threadName, null); } @@ -1013,6 +1069,14 @@ public abstract class BsFailureUrlCQ extends AbstractConditionQuery { return this; } + public void setUrl_Equal(String url) { + setUrl_Term(url, null); + } + + public void setUrl_Equal(String url, ConditionOptionCall opLambda) { + setUrl_Term(url, opLambda); + } + public void setUrl_Term(String url) { setUrl_Term(url, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFavoriteLogCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFavoriteLogCQ.java index 262225563..3f7163d10 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFavoriteLogCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFavoriteLogCQ.java @@ -62,6 +62,14 @@ public abstract class BsFavoriteLogCQ extends AbstractConditionQuery { } } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -190,6 +198,14 @@ public abstract class BsFavoriteLogCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -329,6 +345,14 @@ public abstract class BsFavoriteLogCQ extends AbstractConditionQuery { return this; } + public void setUrl_Equal(String url) { + setUrl_Term(url, null); + } + + public void setUrl_Equal(String url, ConditionOptionCall opLambda) { + setUrl_Term(url, opLambda); + } + public void setUrl_Term(String url) { setUrl_Term(url, null); } @@ -468,6 +492,14 @@ public abstract class BsFavoriteLogCQ extends AbstractConditionQuery { return this; } + public void setUserInfoId_Equal(String userInfoId) { + setUserInfoId_Term(userInfoId, null); + } + + public void setUserInfoId_Equal(String userInfoId, ConditionOptionCall opLambda) { + setUserInfoId_Term(userInfoId, opLambda); + } + public void setUserInfoId_Term(String userInfoId) { setUserInfoId_Term(userInfoId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFileAuthenticationCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFileAuthenticationCQ.java index aca7fb176..7aa37d3ec 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFileAuthenticationCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFileAuthenticationCQ.java @@ -63,6 +63,14 @@ public abstract class BsFileAuthenticationCQ extends AbstractConditionQuery { } } + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -202,6 +210,14 @@ public abstract class BsFileAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -330,6 +346,14 @@ public abstract class BsFileAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setFileConfigId_Equal(String fileConfigId) { + setFileConfigId_Term(fileConfigId, null); + } + + public void setFileConfigId_Equal(String fileConfigId, ConditionOptionCall opLambda) { + setFileConfigId_Term(fileConfigId, opLambda); + } + public void setFileConfigId_Term(String fileConfigId) { setFileConfigId_Term(fileConfigId, null); } @@ -469,6 +493,14 @@ public abstract class BsFileAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setHostname_Equal(String hostname) { + setHostname_Term(hostname, null); + } + + public void setHostname_Equal(String hostname, ConditionOptionCall opLambda) { + setHostname_Term(hostname, opLambda); + } + public void setHostname_Term(String hostname) { setHostname_Term(hostname, null); } @@ -608,6 +640,14 @@ public abstract class BsFileAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -747,6 +787,14 @@ public abstract class BsFileAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setParameters_Equal(String parameters) { + setParameters_Term(parameters, null); + } + + public void setParameters_Equal(String parameters, ConditionOptionCall opLambda) { + setParameters_Term(parameters, opLambda); + } + public void setParameters_Term(String parameters) { setParameters_Term(parameters, null); } @@ -886,6 +934,14 @@ public abstract class BsFileAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setPassword_Equal(String password) { + setPassword_Term(password, null); + } + + public void setPassword_Equal(String password, ConditionOptionCall opLambda) { + setPassword_Term(password, opLambda); + } + public void setPassword_Term(String password) { setPassword_Term(password, null); } @@ -1025,6 +1081,14 @@ public abstract class BsFileAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setPort_Equal(Integer port) { + setPort_Term(port, null); + } + + public void setPort_Equal(Integer port, ConditionOptionCall opLambda) { + setPort_Term(port, opLambda); + } + public void setPort_Term(Integer port) { setPort_Term(port, null); } @@ -1153,6 +1217,14 @@ public abstract class BsFileAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setProtocolScheme_Equal(String protocolScheme) { + setProtocolScheme_Term(protocolScheme, null); + } + + public void setProtocolScheme_Equal(String protocolScheme, ConditionOptionCall opLambda) { + setProtocolScheme_Term(protocolScheme, opLambda); + } + public void setProtocolScheme_Term(String protocolScheme) { setProtocolScheme_Term(protocolScheme, null); } @@ -1292,6 +1364,14 @@ public abstract class BsFileAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1431,6 +1511,14 @@ public abstract class BsFileAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } @@ -1559,6 +1647,14 @@ public abstract class BsFileAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setUsername_Equal(String username) { + setUsername_Term(username, null); + } + + public void setUsername_Equal(String username, ConditionOptionCall opLambda) { + setUsername_Term(username, opLambda); + } + public void setUsername_Term(String username) { setUsername_Term(username, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFileConfigCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFileConfigCQ.java index ceca04cd7..310388fd6 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFileConfigCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFileConfigCQ.java @@ -62,6 +62,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { } } + public void setAvailable_Equal(Boolean available) { + setAvailable_Term(available, null); + } + + public void setAvailable_Equal(Boolean available, ConditionOptionCall opLambda) { + setAvailable_Term(available, opLambda); + } + public void setAvailable_Term(Boolean available) { setAvailable_Term(available, null); } @@ -190,6 +198,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setBoost_Equal(Float boost) { + setBoost_Term(boost, null); + } + + public void setBoost_Equal(Float boost, ConditionOptionCall opLambda) { + setBoost_Term(boost, opLambda); + } + public void setBoost_Term(Float boost) { setBoost_Term(boost, null); } @@ -318,6 +334,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setConfigParameter_Equal(String configParameter) { + setConfigParameter_Term(configParameter, null); + } + + public void setConfigParameter_Equal(String configParameter, ConditionOptionCall opLambda) { + setConfigParameter_Term(configParameter, opLambda); + } + public void setConfigParameter_Term(String configParameter) { setConfigParameter_Term(configParameter, null); } @@ -457,6 +481,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -596,6 +628,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -724,6 +764,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setDepth_Equal(Integer depth) { + setDepth_Term(depth, null); + } + + public void setDepth_Equal(Integer depth, ConditionOptionCall opLambda) { + setDepth_Term(depth, opLambda); + } + public void setDepth_Term(Integer depth) { setDepth_Term(depth, null); } @@ -852,6 +900,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setExcludedDocPaths_Equal(String excludedDocPaths) { + setExcludedDocPaths_Term(excludedDocPaths, null); + } + + public void setExcludedDocPaths_Equal(String excludedDocPaths, ConditionOptionCall opLambda) { + setExcludedDocPaths_Term(excludedDocPaths, opLambda); + } + public void setExcludedDocPaths_Term(String excludedDocPaths) { setExcludedDocPaths_Term(excludedDocPaths, null); } @@ -991,6 +1047,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setExcludedPaths_Equal(String excludedPaths) { + setExcludedPaths_Term(excludedPaths, null); + } + + public void setExcludedPaths_Equal(String excludedPaths, ConditionOptionCall opLambda) { + setExcludedPaths_Term(excludedPaths, opLambda); + } + public void setExcludedPaths_Term(String excludedPaths) { setExcludedPaths_Term(excludedPaths, null); } @@ -1130,6 +1194,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -1269,6 +1341,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setIncludedDocPaths_Equal(String includedDocPaths) { + setIncludedDocPaths_Term(includedDocPaths, null); + } + + public void setIncludedDocPaths_Equal(String includedDocPaths, ConditionOptionCall opLambda) { + setIncludedDocPaths_Term(includedDocPaths, opLambda); + } + public void setIncludedDocPaths_Term(String includedDocPaths) { setIncludedDocPaths_Term(includedDocPaths, null); } @@ -1408,6 +1488,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setIncludedPaths_Equal(String includedPaths) { + setIncludedPaths_Term(includedPaths, null); + } + + public void setIncludedPaths_Equal(String includedPaths, ConditionOptionCall opLambda) { + setIncludedPaths_Term(includedPaths, opLambda); + } + public void setIncludedPaths_Term(String includedPaths) { setIncludedPaths_Term(includedPaths, null); } @@ -1547,6 +1635,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setIntervalTime_Equal(Integer intervalTime) { + setIntervalTime_Term(intervalTime, null); + } + + public void setIntervalTime_Equal(Integer intervalTime, ConditionOptionCall opLambda) { + setIntervalTime_Term(intervalTime, opLambda); + } + public void setIntervalTime_Term(Integer intervalTime) { setIntervalTime_Term(intervalTime, null); } @@ -1675,6 +1771,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setMaxAccessCount_Equal(Long maxAccessCount) { + setMaxAccessCount_Term(maxAccessCount, null); + } + + public void setMaxAccessCount_Equal(Long maxAccessCount, ConditionOptionCall opLambda) { + setMaxAccessCount_Term(maxAccessCount, opLambda); + } + public void setMaxAccessCount_Term(Long maxAccessCount) { setMaxAccessCount_Term(maxAccessCount, null); } @@ -1803,6 +1907,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -1942,6 +2054,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setNumOfThread_Equal(Integer numOfThread) { + setNumOfThread_Term(numOfThread, null); + } + + public void setNumOfThread_Equal(Integer numOfThread, ConditionOptionCall opLambda) { + setNumOfThread_Term(numOfThread, opLambda); + } + public void setNumOfThread_Term(Integer numOfThread) { setNumOfThread_Term(numOfThread, null); } @@ -2070,6 +2190,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setPaths_Equal(String paths) { + setPaths_Term(paths, null); + } + + public void setPaths_Equal(String paths, ConditionOptionCall opLambda) { + setPaths_Term(paths, opLambda); + } + public void setPaths_Term(String paths) { setPaths_Term(paths, null); } @@ -2209,6 +2337,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -2337,6 +2473,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -2476,6 +2620,14 @@ public abstract class BsFileConfigCQ extends AbstractConditionQuery { return this; } + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFileConfigToLabelCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFileConfigToLabelCQ.java index 9edcc8f96..343661b8d 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFileConfigToLabelCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFileConfigToLabelCQ.java @@ -63,6 +63,14 @@ public abstract class BsFileConfigToLabelCQ extends AbstractConditionQuery { } } + public void setFileConfigId_Equal(String fileConfigId) { + setFileConfigId_Term(fileConfigId, null); + } + + public void setFileConfigId_Equal(String fileConfigId, ConditionOptionCall opLambda) { + setFileConfigId_Term(fileConfigId, opLambda); + } + public void setFileConfigId_Term(String fileConfigId) { setFileConfigId_Term(fileConfigId, null); } @@ -202,6 +210,14 @@ public abstract class BsFileConfigToLabelCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -341,6 +357,14 @@ public abstract class BsFileConfigToLabelCQ extends AbstractConditionQuery { return this; } + public void setLabelTypeId_Equal(String labelTypeId) { + setLabelTypeId_Term(labelTypeId, null); + } + + public void setLabelTypeId_Equal(String labelTypeId, ConditionOptionCall opLambda) { + setLabelTypeId_Term(labelTypeId, opLambda); + } + public void setLabelTypeId_Term(String labelTypeId) { setLabelTypeId_Term(labelTypeId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFileConfigToRoleCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFileConfigToRoleCQ.java index 631bb67d3..fc447f541 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFileConfigToRoleCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsFileConfigToRoleCQ.java @@ -63,6 +63,14 @@ public abstract class BsFileConfigToRoleCQ extends AbstractConditionQuery { } } + public void setFileConfigId_Equal(String fileConfigId) { + setFileConfigId_Term(fileConfigId, null); + } + + public void setFileConfigId_Equal(String fileConfigId, ConditionOptionCall opLambda) { + setFileConfigId_Term(fileConfigId, opLambda); + } + public void setFileConfigId_Term(String fileConfigId) { setFileConfigId_Term(fileConfigId, null); } @@ -202,6 +210,14 @@ public abstract class BsFileConfigToRoleCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -341,6 +357,14 @@ public abstract class BsFileConfigToRoleCQ extends AbstractConditionQuery { return this; } + public void setRoleTypeId_Equal(String roleTypeId) { + setRoleTypeId_Term(roleTypeId, null); + } + + public void setRoleTypeId_Equal(String roleTypeId, ConditionOptionCall opLambda) { + setRoleTypeId_Term(roleTypeId, opLambda); + } + public void setRoleTypeId_Term(String roleTypeId) { setRoleTypeId_Term(roleTypeId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsJobLogCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsJobLogCQ.java index 689ba0f96..2d55c8834 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsJobLogCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsJobLogCQ.java @@ -62,6 +62,14 @@ public abstract class BsJobLogCQ extends AbstractConditionQuery { } } + public void setEndTime_Equal(Long endTime) { + setEndTime_Term(endTime, null); + } + + public void setEndTime_Equal(Long endTime, ConditionOptionCall opLambda) { + setEndTime_Term(endTime, opLambda); + } + public void setEndTime_Term(Long endTime) { setEndTime_Term(endTime, null); } @@ -190,6 +198,14 @@ public abstract class BsJobLogCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -329,6 +345,14 @@ public abstract class BsJobLogCQ extends AbstractConditionQuery { return this; } + public void setJobName_Equal(String jobName) { + setJobName_Term(jobName, null); + } + + public void setJobName_Equal(String jobName, ConditionOptionCall opLambda) { + setJobName_Term(jobName, opLambda); + } + public void setJobName_Term(String jobName) { setJobName_Term(jobName, null); } @@ -468,6 +492,14 @@ public abstract class BsJobLogCQ extends AbstractConditionQuery { return this; } + public void setJobStatus_Equal(String jobStatus) { + setJobStatus_Term(jobStatus, null); + } + + public void setJobStatus_Equal(String jobStatus, ConditionOptionCall opLambda) { + setJobStatus_Term(jobStatus, opLambda); + } + public void setJobStatus_Term(String jobStatus) { setJobStatus_Term(jobStatus, null); } @@ -607,6 +639,14 @@ public abstract class BsJobLogCQ extends AbstractConditionQuery { return this; } + public void setScriptData_Equal(String scriptData) { + setScriptData_Term(scriptData, null); + } + + public void setScriptData_Equal(String scriptData, ConditionOptionCall opLambda) { + setScriptData_Term(scriptData, opLambda); + } + public void setScriptData_Term(String scriptData) { setScriptData_Term(scriptData, null); } @@ -746,6 +786,14 @@ public abstract class BsJobLogCQ extends AbstractConditionQuery { return this; } + public void setScriptResult_Equal(String scriptResult) { + setScriptResult_Term(scriptResult, null); + } + + public void setScriptResult_Equal(String scriptResult, ConditionOptionCall opLambda) { + setScriptResult_Term(scriptResult, opLambda); + } + public void setScriptResult_Term(String scriptResult) { setScriptResult_Term(scriptResult, null); } @@ -885,6 +933,14 @@ public abstract class BsJobLogCQ extends AbstractConditionQuery { return this; } + public void setScriptType_Equal(String scriptType) { + setScriptType_Term(scriptType, null); + } + + public void setScriptType_Equal(String scriptType, ConditionOptionCall opLambda) { + setScriptType_Term(scriptType, opLambda); + } + public void setScriptType_Term(String scriptType) { setScriptType_Term(scriptType, null); } @@ -1024,6 +1080,14 @@ public abstract class BsJobLogCQ extends AbstractConditionQuery { return this; } + public void setStartTime_Equal(Long startTime) { + setStartTime_Term(startTime, null); + } + + public void setStartTime_Equal(Long startTime, ConditionOptionCall opLambda) { + setStartTime_Term(startTime, opLambda); + } + public void setStartTime_Term(Long startTime) { setStartTime_Term(startTime, null); } @@ -1152,6 +1216,14 @@ public abstract class BsJobLogCQ extends AbstractConditionQuery { return this; } + public void setTarget_Equal(String target) { + setTarget_Term(target, null); + } + + public void setTarget_Equal(String target, ConditionOptionCall opLambda) { + setTarget_Term(target, opLambda); + } + public void setTarget_Term(String target) { setTarget_Term(target, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsKeyMatchCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsKeyMatchCQ.java index b9a028559..72b24c6cc 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsKeyMatchCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsKeyMatchCQ.java @@ -62,6 +62,14 @@ public abstract class BsKeyMatchCQ extends AbstractConditionQuery { } } + public void setBoost_Equal(Float boost) { + setBoost_Term(boost, null); + } + + public void setBoost_Equal(Float boost, ConditionOptionCall opLambda) { + setBoost_Term(boost, opLambda); + } + public void setBoost_Term(Float boost) { setBoost_Term(boost, null); } @@ -190,6 +198,14 @@ public abstract class BsKeyMatchCQ extends AbstractConditionQuery { return this; } + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -329,6 +345,14 @@ public abstract class BsKeyMatchCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -457,6 +481,14 @@ public abstract class BsKeyMatchCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -596,6 +628,14 @@ public abstract class BsKeyMatchCQ extends AbstractConditionQuery { return this; } + public void setMaxSize_Equal(Integer maxSize) { + setMaxSize_Term(maxSize, null); + } + + public void setMaxSize_Equal(Integer maxSize, ConditionOptionCall opLambda) { + setMaxSize_Term(maxSize, opLambda); + } + public void setMaxSize_Term(Integer maxSize) { setMaxSize_Term(maxSize, null); } @@ -724,6 +764,14 @@ public abstract class BsKeyMatchCQ extends AbstractConditionQuery { return this; } + public void setQuery_Equal(String query) { + setQuery_Term(query, null); + } + + public void setQuery_Equal(String query, ConditionOptionCall opLambda) { + setQuery_Term(query, opLambda); + } + public void setQuery_Term(String query) { setQuery_Term(query, null); } @@ -863,6 +911,14 @@ public abstract class BsKeyMatchCQ extends AbstractConditionQuery { return this; } + public void setTerm_Equal(String term) { + setTerm_Term(term, null); + } + + public void setTerm_Equal(String term, ConditionOptionCall opLambda) { + setTerm_Term(term, opLambda); + } + public void setTerm_Term(String term) { setTerm_Term(term, null); } @@ -1002,6 +1058,14 @@ public abstract class BsKeyMatchCQ extends AbstractConditionQuery { return this; } + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1141,6 +1205,14 @@ public abstract class BsKeyMatchCQ extends AbstractConditionQuery { return this; } + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsLabelToRoleCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsLabelToRoleCQ.java index 5db32c411..631870222 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsLabelToRoleCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsLabelToRoleCQ.java @@ -62,6 +62,14 @@ public abstract class BsLabelToRoleCQ extends AbstractConditionQuery { } } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -201,6 +209,14 @@ public abstract class BsLabelToRoleCQ extends AbstractConditionQuery { return this; } + public void setLabelTypeId_Equal(String labelTypeId) { + setLabelTypeId_Term(labelTypeId, null); + } + + public void setLabelTypeId_Equal(String labelTypeId, ConditionOptionCall opLambda) { + setLabelTypeId_Term(labelTypeId, opLambda); + } + public void setLabelTypeId_Term(String labelTypeId) { setLabelTypeId_Term(labelTypeId, null); } @@ -340,6 +356,14 @@ public abstract class BsLabelToRoleCQ extends AbstractConditionQuery { return this; } + public void setRoleTypeId_Equal(String roleTypeId) { + setRoleTypeId_Term(roleTypeId, null); + } + + public void setRoleTypeId_Equal(String roleTypeId, ConditionOptionCall opLambda) { + setRoleTypeId_Term(roleTypeId, opLambda); + } + public void setRoleTypeId_Term(String roleTypeId) { setRoleTypeId_Term(roleTypeId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsLabelTypeCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsLabelTypeCQ.java index bf87e7648..d3a61c114 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsLabelTypeCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsLabelTypeCQ.java @@ -62,6 +62,14 @@ public abstract class BsLabelTypeCQ extends AbstractConditionQuery { } } + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -201,6 +209,14 @@ public abstract class BsLabelTypeCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -329,6 +345,14 @@ public abstract class BsLabelTypeCQ extends AbstractConditionQuery { return this; } + public void setExcludedPaths_Equal(String excludedPaths) { + setExcludedPaths_Term(excludedPaths, null); + } + + public void setExcludedPaths_Equal(String excludedPaths, ConditionOptionCall opLambda) { + setExcludedPaths_Term(excludedPaths, opLambda); + } + public void setExcludedPaths_Term(String excludedPaths) { setExcludedPaths_Term(excludedPaths, null); } @@ -468,6 +492,14 @@ public abstract class BsLabelTypeCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -607,6 +639,14 @@ public abstract class BsLabelTypeCQ extends AbstractConditionQuery { return this; } + public void setIncludedPaths_Equal(String includedPaths) { + setIncludedPaths_Term(includedPaths, null); + } + + public void setIncludedPaths_Equal(String includedPaths, ConditionOptionCall opLambda) { + setIncludedPaths_Term(includedPaths, opLambda); + } + public void setIncludedPaths_Term(String includedPaths) { setIncludedPaths_Term(includedPaths, null); } @@ -746,6 +786,14 @@ public abstract class BsLabelTypeCQ extends AbstractConditionQuery { return this; } + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -885,6 +933,14 @@ public abstract class BsLabelTypeCQ extends AbstractConditionQuery { return this; } + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -1013,6 +1069,14 @@ public abstract class BsLabelTypeCQ extends AbstractConditionQuery { return this; } + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1152,6 +1216,14 @@ public abstract class BsLabelTypeCQ extends AbstractConditionQuery { return this; } + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } @@ -1280,6 +1352,14 @@ public abstract class BsLabelTypeCQ extends AbstractConditionQuery { return this; } + public void setValue_Equal(String value) { + setValue_Term(value, null); + } + + public void setValue_Equal(String value, ConditionOptionCall opLambda) { + setValue_Term(value, opLambda); + } + public void setValue_Term(String value) { setValue_Term(value, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsOverlappingHostCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsOverlappingHostCQ.java index e533c1c26..4c066de87 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsOverlappingHostCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsOverlappingHostCQ.java @@ -63,6 +63,14 @@ public abstract class BsOverlappingHostCQ extends AbstractConditionQuery { } } + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -202,6 +210,14 @@ public abstract class BsOverlappingHostCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -330,6 +346,14 @@ public abstract class BsOverlappingHostCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -469,6 +493,14 @@ public abstract class BsOverlappingHostCQ extends AbstractConditionQuery { return this; } + public void setOverlappingName_Equal(String overlappingName) { + setOverlappingName_Term(overlappingName, null); + } + + public void setOverlappingName_Equal(String overlappingName, ConditionOptionCall opLambda) { + setOverlappingName_Term(overlappingName, opLambda); + } + public void setOverlappingName_Term(String overlappingName) { setOverlappingName_Term(overlappingName, null); } @@ -608,6 +640,14 @@ public abstract class BsOverlappingHostCQ extends AbstractConditionQuery { return this; } + public void setRegularName_Equal(String regularName) { + setRegularName_Term(regularName, null); + } + + public void setRegularName_Equal(String regularName, ConditionOptionCall opLambda) { + setRegularName_Term(regularName, opLambda); + } + public void setRegularName_Term(String regularName) { setRegularName_Term(regularName, null); } @@ -747,6 +787,14 @@ public abstract class BsOverlappingHostCQ extends AbstractConditionQuery { return this; } + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -875,6 +923,14 @@ public abstract class BsOverlappingHostCQ extends AbstractConditionQuery { return this; } + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1014,6 +1070,14 @@ public abstract class BsOverlappingHostCQ extends AbstractConditionQuery { return this; } + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsPathMappingCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsPathMappingCQ.java index edf83326f..f1a748677 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsPathMappingCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsPathMappingCQ.java @@ -62,6 +62,14 @@ public abstract class BsPathMappingCQ extends AbstractConditionQuery { } } + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -201,6 +209,14 @@ public abstract class BsPathMappingCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -329,6 +345,14 @@ public abstract class BsPathMappingCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -468,6 +492,14 @@ public abstract class BsPathMappingCQ extends AbstractConditionQuery { return this; } + public void setProcessType_Equal(String processType) { + setProcessType_Term(processType, null); + } + + public void setProcessType_Equal(String processType, ConditionOptionCall opLambda) { + setProcessType_Term(processType, opLambda); + } + public void setProcessType_Term(String processType) { setProcessType_Term(processType, null); } @@ -607,6 +639,14 @@ public abstract class BsPathMappingCQ extends AbstractConditionQuery { return this; } + public void setRegex_Equal(String regex) { + setRegex_Term(regex, null); + } + + public void setRegex_Equal(String regex, ConditionOptionCall opLambda) { + setRegex_Term(regex, opLambda); + } + public void setRegex_Term(String regex) { setRegex_Term(regex, null); } @@ -746,6 +786,14 @@ public abstract class BsPathMappingCQ extends AbstractConditionQuery { return this; } + public void setReplacement_Equal(String replacement) { + setReplacement_Term(replacement, null); + } + + public void setReplacement_Equal(String replacement, ConditionOptionCall opLambda) { + setReplacement_Term(replacement, opLambda); + } + public void setReplacement_Term(String replacement) { setReplacement_Term(replacement, null); } @@ -885,6 +933,14 @@ public abstract class BsPathMappingCQ extends AbstractConditionQuery { return this; } + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -1013,6 +1069,14 @@ public abstract class BsPathMappingCQ extends AbstractConditionQuery { return this; } + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1152,6 +1216,14 @@ public abstract class BsPathMappingCQ extends AbstractConditionQuery { return this; } + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsRequestHeaderCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsRequestHeaderCQ.java index 48b5af56a..dd8170b41 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsRequestHeaderCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsRequestHeaderCQ.java @@ -62,6 +62,14 @@ public abstract class BsRequestHeaderCQ extends AbstractConditionQuery { } } + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -201,6 +209,14 @@ public abstract class BsRequestHeaderCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -329,6 +345,14 @@ public abstract class BsRequestHeaderCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -468,6 +492,14 @@ public abstract class BsRequestHeaderCQ extends AbstractConditionQuery { return this; } + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -607,6 +639,14 @@ public abstract class BsRequestHeaderCQ extends AbstractConditionQuery { return this; } + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -746,6 +786,14 @@ public abstract class BsRequestHeaderCQ extends AbstractConditionQuery { return this; } + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } @@ -874,6 +922,14 @@ public abstract class BsRequestHeaderCQ extends AbstractConditionQuery { return this; } + public void setValue_Equal(String value) { + setValue_Term(value, null); + } + + public void setValue_Equal(String value, ConditionOptionCall opLambda) { + setValue_Term(value, opLambda); + } + public void setValue_Term(String value) { setValue_Term(value, null); } @@ -1013,6 +1069,14 @@ public abstract class BsRequestHeaderCQ extends AbstractConditionQuery { return this; } + public void setWebConfigId_Equal(String webConfigId) { + setWebConfigId_Term(webConfigId, null); + } + + public void setWebConfigId_Equal(String webConfigId, ConditionOptionCall opLambda) { + setWebConfigId_Term(webConfigId, opLambda); + } + public void setWebConfigId_Term(String webConfigId) { setWebConfigId_Term(webConfigId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsRoleTypeCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsRoleTypeCQ.java index 8c49efe43..a56b33a90 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsRoleTypeCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsRoleTypeCQ.java @@ -62,6 +62,14 @@ public abstract class BsRoleTypeCQ extends AbstractConditionQuery { } } + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -201,6 +209,14 @@ public abstract class BsRoleTypeCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -329,6 +345,14 @@ public abstract class BsRoleTypeCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -468,6 +492,14 @@ public abstract class BsRoleTypeCQ extends AbstractConditionQuery { return this; } + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -607,6 +639,14 @@ public abstract class BsRoleTypeCQ extends AbstractConditionQuery { return this; } + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -735,6 +775,14 @@ public abstract class BsRoleTypeCQ extends AbstractConditionQuery { return this; } + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -874,6 +922,14 @@ public abstract class BsRoleTypeCQ extends AbstractConditionQuery { return this; } + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } @@ -1002,6 +1058,14 @@ public abstract class BsRoleTypeCQ extends AbstractConditionQuery { return this; } + public void setValue_Equal(String value) { + setValue_Term(value, null); + } + + public void setValue_Equal(String value, ConditionOptionCall opLambda) { + setValue_Term(value, opLambda); + } + public void setValue_Term(String value) { setValue_Term(value, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsScheduledJobCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsScheduledJobCQ.java index 1c7694773..97c718bc4 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsScheduledJobCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsScheduledJobCQ.java @@ -62,6 +62,14 @@ public abstract class BsScheduledJobCQ extends AbstractConditionQuery { } } + public void setAvailable_Equal(Boolean available) { + setAvailable_Term(available, null); + } + + public void setAvailable_Equal(Boolean available, ConditionOptionCall opLambda) { + setAvailable_Term(available, opLambda); + } + public void setAvailable_Term(Boolean available) { setAvailable_Term(available, null); } @@ -190,129 +198,126 @@ public abstract class BsScheduledJobCQ extends AbstractConditionQuery { return this; } - public void setCrawler_Term(String crawler) { + public void setCrawler_Equal(Boolean crawler) { setCrawler_Term(crawler, null); } - public void setCrawler_Term(String crawler, ConditionOptionCall opLambda) { + public void setCrawler_Equal(Boolean crawler, ConditionOptionCall opLambda) { + setCrawler_Term(crawler, opLambda); + } + + public void setCrawler_Term(Boolean crawler) { + setCrawler_Term(crawler, null); + } + + public void setCrawler_Term(Boolean crawler, ConditionOptionCall opLambda) { TermQueryBuilder builder = regTermQ("crawler", crawler); if (opLambda != null) { opLambda.callback(builder); } } - public void setCrawler_Terms(Collection crawlerList) { + public void setCrawler_Terms(Collection crawlerList) { setCrawler_Terms(crawlerList, null); } - public void setCrawler_Terms(Collection crawlerList, ConditionOptionCall opLambda) { + public void setCrawler_Terms(Collection crawlerList, ConditionOptionCall opLambda) { TermsQueryBuilder builder = regTermsQ("crawler", crawlerList); if (opLambda != null) { opLambda.callback(builder); } } - public void setCrawler_InScope(Collection crawlerList) { + public void setCrawler_InScope(Collection crawlerList) { setCrawler_Terms(crawlerList, null); } - public void setCrawler_InScope(Collection crawlerList, ConditionOptionCall opLambda) { + public void setCrawler_InScope(Collection crawlerList, ConditionOptionCall opLambda) { setCrawler_Terms(crawlerList, opLambda); } - public void setCrawler_Match(String crawler) { + public void setCrawler_Match(Boolean crawler) { setCrawler_Match(crawler, null); } - public void setCrawler_Match(String crawler, ConditionOptionCall opLambda) { + public void setCrawler_Match(Boolean crawler, ConditionOptionCall opLambda) { MatchQueryBuilder builder = regMatchQ("crawler", crawler); if (opLambda != null) { opLambda.callback(builder); } } - public void setCrawler_MatchPhrase(String crawler) { + public void setCrawler_MatchPhrase(Boolean crawler) { setCrawler_MatchPhrase(crawler, null); } - public void setCrawler_MatchPhrase(String crawler, ConditionOptionCall opLambda) { + public void setCrawler_MatchPhrase(Boolean crawler, ConditionOptionCall opLambda) { MatchQueryBuilder builder = regMatchPhraseQ("crawler", crawler); if (opLambda != null) { opLambda.callback(builder); } } - public void setCrawler_MatchPhrasePrefix(String crawler) { + public void setCrawler_MatchPhrasePrefix(Boolean crawler) { setCrawler_MatchPhrasePrefix(crawler, null); } - public void setCrawler_MatchPhrasePrefix(String crawler, ConditionOptionCall opLambda) { + public void setCrawler_MatchPhrasePrefix(Boolean crawler, ConditionOptionCall opLambda) { MatchQueryBuilder builder = regMatchPhrasePrefixQ("crawler", crawler); if (opLambda != null) { opLambda.callback(builder); } } - public void setCrawler_Fuzzy(String crawler) { + public void setCrawler_Fuzzy(Boolean crawler) { setCrawler_Fuzzy(crawler, null); } - public void setCrawler_Fuzzy(String crawler, ConditionOptionCall opLambda) { + public void setCrawler_Fuzzy(Boolean crawler, ConditionOptionCall opLambda) { FuzzyQueryBuilder builder = regFuzzyQ("crawler", crawler); if (opLambda != null) { opLambda.callback(builder); } } - public void setCrawler_Prefix(String crawler) { - setCrawler_Prefix(crawler, null); - } - - public void setCrawler_Prefix(String crawler, ConditionOptionCall opLambda) { - PrefixQueryBuilder builder = regPrefixQ("crawler", crawler); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setCrawler_GreaterThan(String crawler) { + public void setCrawler_GreaterThan(Boolean crawler) { setCrawler_GreaterThan(crawler, null); } - public void setCrawler_GreaterThan(String crawler, ConditionOptionCall opLambda) { + public void setCrawler_GreaterThan(Boolean crawler, ConditionOptionCall opLambda) { RangeQueryBuilder builder = regRangeQ("crawler", ConditionKey.CK_GREATER_THAN, crawler); if (opLambda != null) { opLambda.callback(builder); } } - public void setCrawler_LessThan(String crawler) { + public void setCrawler_LessThan(Boolean crawler) { setCrawler_LessThan(crawler, null); } - public void setCrawler_LessThan(String crawler, ConditionOptionCall opLambda) { + public void setCrawler_LessThan(Boolean crawler, ConditionOptionCall opLambda) { RangeQueryBuilder builder = regRangeQ("crawler", ConditionKey.CK_LESS_THAN, crawler); if (opLambda != null) { opLambda.callback(builder); } } - public void setCrawler_GreaterEqual(String crawler) { + public void setCrawler_GreaterEqual(Boolean crawler) { setCrawler_GreaterEqual(crawler, null); } - public void setCrawler_GreaterEqual(String crawler, ConditionOptionCall opLambda) { + public void setCrawler_GreaterEqual(Boolean crawler, ConditionOptionCall opLambda) { RangeQueryBuilder builder = regRangeQ("crawler", ConditionKey.CK_GREATER_EQUAL, crawler); if (opLambda != null) { opLambda.callback(builder); } } - public void setCrawler_LessEqual(String crawler) { + public void setCrawler_LessEqual(Boolean crawler) { setCrawler_LessEqual(crawler, null); } - public void setCrawler_LessEqual(String crawler, ConditionOptionCall opLambda) { + public void setCrawler_LessEqual(Boolean crawler, ConditionOptionCall opLambda) { RangeQueryBuilder builder = regRangeQ("crawler", ConditionKey.CK_LESS_EQUAL, crawler); if (opLambda != null) { opLambda.callback(builder); @@ -329,6 +334,14 @@ public abstract class BsScheduledJobCQ extends AbstractConditionQuery { return this; } + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -468,6 +481,14 @@ public abstract class BsScheduledJobCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -596,6 +617,14 @@ public abstract class BsScheduledJobCQ extends AbstractConditionQuery { return this; } + public void setCronExpression_Equal(String cronExpression) { + setCronExpression_Term(cronExpression, null); + } + + public void setCronExpression_Equal(String cronExpression, ConditionOptionCall opLambda) { + setCronExpression_Term(cronExpression, opLambda); + } + public void setCronExpression_Term(String cronExpression) { setCronExpression_Term(cronExpression, null); } @@ -735,6 +764,14 @@ public abstract class BsScheduledJobCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -874,6 +911,14 @@ public abstract class BsScheduledJobCQ extends AbstractConditionQuery { return this; } + public void setJobLogging_Equal(Boolean jobLogging) { + setJobLogging_Term(jobLogging, null); + } + + public void setJobLogging_Equal(Boolean jobLogging, ConditionOptionCall opLambda) { + setJobLogging_Term(jobLogging, opLambda); + } + public void setJobLogging_Term(Boolean jobLogging) { setJobLogging_Term(jobLogging, null); } @@ -1002,6 +1047,14 @@ public abstract class BsScheduledJobCQ extends AbstractConditionQuery { return this; } + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -1141,6 +1194,14 @@ public abstract class BsScheduledJobCQ extends AbstractConditionQuery { return this; } + public void setScriptData_Equal(String scriptData) { + setScriptData_Term(scriptData, null); + } + + public void setScriptData_Equal(String scriptData, ConditionOptionCall opLambda) { + setScriptData_Term(scriptData, opLambda); + } + public void setScriptData_Term(String scriptData) { setScriptData_Term(scriptData, null); } @@ -1280,6 +1341,14 @@ public abstract class BsScheduledJobCQ extends AbstractConditionQuery { return this; } + public void setScriptType_Equal(String scriptType) { + setScriptType_Term(scriptType, null); + } + + public void setScriptType_Equal(String scriptType, ConditionOptionCall opLambda) { + setScriptType_Term(scriptType, opLambda); + } + public void setScriptType_Term(String scriptType) { setScriptType_Term(scriptType, null); } @@ -1419,6 +1488,14 @@ public abstract class BsScheduledJobCQ extends AbstractConditionQuery { return this; } + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -1547,6 +1624,14 @@ public abstract class BsScheduledJobCQ extends AbstractConditionQuery { return this; } + public void setTarget_Equal(String target) { + setTarget_Term(target, null); + } + + public void setTarget_Equal(String target, ConditionOptionCall opLambda) { + setTarget_Term(target, opLambda); + } + public void setTarget_Term(String target) { setTarget_Term(target, null); } @@ -1686,6 +1771,14 @@ public abstract class BsScheduledJobCQ extends AbstractConditionQuery { return this; } + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1825,6 +1918,14 @@ public abstract class BsScheduledJobCQ extends AbstractConditionQuery { return this; } + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsSearchFieldLogCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsSearchFieldLogCQ.java index 242c651e2..e507f1dbc 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsSearchFieldLogCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsSearchFieldLogCQ.java @@ -62,6 +62,14 @@ public abstract class BsSearchFieldLogCQ extends AbstractConditionQuery { } } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -201,6 +209,14 @@ public abstract class BsSearchFieldLogCQ extends AbstractConditionQuery { return this; } + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -340,6 +356,14 @@ public abstract class BsSearchFieldLogCQ extends AbstractConditionQuery { return this; } + public void setSearchLogId_Equal(String searchLogId) { + setSearchLogId_Term(searchLogId, null); + } + + public void setSearchLogId_Equal(String searchLogId, ConditionOptionCall opLambda) { + setSearchLogId_Term(searchLogId, opLambda); + } + public void setSearchLogId_Term(String searchLogId) { setSearchLogId_Term(searchLogId, null); } @@ -479,6 +503,14 @@ public abstract class BsSearchFieldLogCQ extends AbstractConditionQuery { return this; } + public void setValue_Equal(String value) { + setValue_Term(value, null); + } + + public void setValue_Equal(String value, ConditionOptionCall opLambda) { + setValue_Term(value, opLambda); + } + public void setValue_Term(String value) { setValue_Term(value, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsSearchLogCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsSearchLogCQ.java index 0e45a8687..065d791f9 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsSearchLogCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsSearchLogCQ.java @@ -62,6 +62,14 @@ public abstract class BsSearchLogCQ extends AbstractConditionQuery { } } + public void setAccessType_Equal(String accessType) { + setAccessType_Term(accessType, null); + } + + public void setAccessType_Equal(String accessType, ConditionOptionCall opLambda) { + setAccessType_Term(accessType, opLambda); + } + public void setAccessType_Term(String accessType) { setAccessType_Term(accessType, null); } @@ -201,6 +209,14 @@ public abstract class BsSearchLogCQ extends AbstractConditionQuery { return this; } + public void setClientIp_Equal(String clientIp) { + setClientIp_Term(clientIp, null); + } + + public void setClientIp_Equal(String clientIp, ConditionOptionCall opLambda) { + setClientIp_Term(clientIp, opLambda); + } + public void setClientIp_Term(String clientIp) { setClientIp_Term(clientIp, null); } @@ -340,6 +356,14 @@ public abstract class BsSearchLogCQ extends AbstractConditionQuery { return this; } + public void setHitCount_Equal(Long hitCount) { + setHitCount_Term(hitCount, null); + } + + public void setHitCount_Equal(Long hitCount, ConditionOptionCall opLambda) { + setHitCount_Term(hitCount, opLambda); + } + public void setHitCount_Term(Long hitCount) { setHitCount_Term(hitCount, null); } @@ -468,6 +492,14 @@ public abstract class BsSearchLogCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -607,6 +639,14 @@ public abstract class BsSearchLogCQ extends AbstractConditionQuery { return this; } + public void setQueryOffset_Equal(Integer queryOffset) { + setQueryOffset_Term(queryOffset, null); + } + + public void setQueryOffset_Equal(Integer queryOffset, ConditionOptionCall opLambda) { + setQueryOffset_Term(queryOffset, opLambda); + } + public void setQueryOffset_Term(Integer queryOffset) { setQueryOffset_Term(queryOffset, null); } @@ -735,6 +775,14 @@ public abstract class BsSearchLogCQ extends AbstractConditionQuery { return this; } + public void setQueryPageSize_Equal(Integer queryPageSize) { + setQueryPageSize_Term(queryPageSize, null); + } + + public void setQueryPageSize_Equal(Integer queryPageSize, ConditionOptionCall opLambda) { + setQueryPageSize_Term(queryPageSize, opLambda); + } + public void setQueryPageSize_Term(Integer queryPageSize) { setQueryPageSize_Term(queryPageSize, null); } @@ -863,6 +911,14 @@ public abstract class BsSearchLogCQ extends AbstractConditionQuery { return this; } + public void setReferer_Equal(String referer) { + setReferer_Term(referer, null); + } + + public void setReferer_Equal(String referer, ConditionOptionCall opLambda) { + setReferer_Term(referer, opLambda); + } + public void setReferer_Term(String referer) { setReferer_Term(referer, null); } @@ -1002,6 +1058,14 @@ public abstract class BsSearchLogCQ extends AbstractConditionQuery { return this; } + public void setRequestedTime_Equal(Long requestedTime) { + setRequestedTime_Term(requestedTime, null); + } + + public void setRequestedTime_Equal(Long requestedTime, ConditionOptionCall opLambda) { + setRequestedTime_Term(requestedTime, opLambda); + } + public void setRequestedTime_Term(Long requestedTime) { setRequestedTime_Term(requestedTime, null); } @@ -1130,6 +1194,14 @@ public abstract class BsSearchLogCQ extends AbstractConditionQuery { return this; } + public void setResponseTime_Equal(Integer responseTime) { + setResponseTime_Term(responseTime, null); + } + + public void setResponseTime_Equal(Integer responseTime, ConditionOptionCall opLambda) { + setResponseTime_Term(responseTime, opLambda); + } + public void setResponseTime_Term(Integer responseTime) { setResponseTime_Term(responseTime, null); } @@ -1258,6 +1330,14 @@ public abstract class BsSearchLogCQ extends AbstractConditionQuery { return this; } + public void setSearchWord_Equal(String searchWord) { + setSearchWord_Term(searchWord, null); + } + + public void setSearchWord_Equal(String searchWord, ConditionOptionCall opLambda) { + setSearchWord_Term(searchWord, opLambda); + } + public void setSearchWord_Term(String searchWord) { setSearchWord_Term(searchWord, null); } @@ -1397,6 +1477,14 @@ public abstract class BsSearchLogCQ extends AbstractConditionQuery { return this; } + public void setUserAgent_Equal(String userAgent) { + setUserAgent_Term(userAgent, null); + } + + public void setUserAgent_Equal(String userAgent, ConditionOptionCall opLambda) { + setUserAgent_Term(userAgent, opLambda); + } + public void setUserAgent_Term(String userAgent) { setUserAgent_Term(userAgent, null); } @@ -1536,134 +1624,161 @@ public abstract class BsSearchLogCQ extends AbstractConditionQuery { return this; } - public void setUserId_Term(Long userId) { - setUserId_Term(userId, null); + public void setUserInfoId_Equal(String userInfoId) { + setUserInfoId_Term(userInfoId, null); } - public void setUserId_Term(Long userId, ConditionOptionCall opLambda) { - TermQueryBuilder builder = regTermQ("userId", userId); + public void setUserInfoId_Equal(String userInfoId, ConditionOptionCall opLambda) { + setUserInfoId_Term(userInfoId, opLambda); + } + + public void setUserInfoId_Term(String userInfoId) { + setUserInfoId_Term(userInfoId, null); + } + + public void setUserInfoId_Term(String userInfoId, ConditionOptionCall opLambda) { + TermQueryBuilder builder = regTermQ("userInfoId", userInfoId); if (opLambda != null) { opLambda.callback(builder); } } - public void setUserId_Terms(Collection userIdList) { - setUserId_Terms(userIdList, null); + public void setUserInfoId_Terms(Collection userInfoIdList) { + setUserInfoId_Terms(userInfoIdList, null); } - public void setUserId_Terms(Collection userIdList, ConditionOptionCall opLambda) { - TermsQueryBuilder builder = regTermsQ("userId", userIdList); + public void setUserInfoId_Terms(Collection userInfoIdList, ConditionOptionCall opLambda) { + TermsQueryBuilder builder = regTermsQ("userInfoId", userInfoIdList); if (opLambda != null) { opLambda.callback(builder); } } - public void setUserId_InScope(Collection userIdList) { - setUserId_Terms(userIdList, null); + public void setUserInfoId_InScope(Collection userInfoIdList) { + setUserInfoId_Terms(userInfoIdList, null); } - public void setUserId_InScope(Collection userIdList, ConditionOptionCall opLambda) { - setUserId_Terms(userIdList, opLambda); + public void setUserInfoId_InScope(Collection userInfoIdList, ConditionOptionCall opLambda) { + setUserInfoId_Terms(userInfoIdList, opLambda); } - public void setUserId_Match(Long userId) { - setUserId_Match(userId, null); + public void setUserInfoId_Match(String userInfoId) { + setUserInfoId_Match(userInfoId, null); } - public void setUserId_Match(Long userId, ConditionOptionCall opLambda) { - MatchQueryBuilder builder = regMatchQ("userId", userId); + public void setUserInfoId_Match(String userInfoId, ConditionOptionCall opLambda) { + MatchQueryBuilder builder = regMatchQ("userInfoId", userInfoId); if (opLambda != null) { opLambda.callback(builder); } } - public void setUserId_MatchPhrase(Long userId) { - setUserId_MatchPhrase(userId, null); + public void setUserInfoId_MatchPhrase(String userInfoId) { + setUserInfoId_MatchPhrase(userInfoId, null); } - public void setUserId_MatchPhrase(Long userId, ConditionOptionCall opLambda) { - MatchQueryBuilder builder = regMatchPhraseQ("userId", userId); + public void setUserInfoId_MatchPhrase(String userInfoId, ConditionOptionCall opLambda) { + MatchQueryBuilder builder = regMatchPhraseQ("userInfoId", userInfoId); if (opLambda != null) { opLambda.callback(builder); } } - public void setUserId_MatchPhrasePrefix(Long userId) { - setUserId_MatchPhrasePrefix(userId, null); + public void setUserInfoId_MatchPhrasePrefix(String userInfoId) { + setUserInfoId_MatchPhrasePrefix(userInfoId, null); } - public void setUserId_MatchPhrasePrefix(Long userId, ConditionOptionCall opLambda) { - MatchQueryBuilder builder = regMatchPhrasePrefixQ("userId", userId); + public void setUserInfoId_MatchPhrasePrefix(String userInfoId, ConditionOptionCall opLambda) { + MatchQueryBuilder builder = regMatchPhrasePrefixQ("userInfoId", userInfoId); if (opLambda != null) { opLambda.callback(builder); } } - public void setUserId_Fuzzy(Long userId) { - setUserId_Fuzzy(userId, null); + public void setUserInfoId_Fuzzy(String userInfoId) { + setUserInfoId_Fuzzy(userInfoId, null); } - public void setUserId_Fuzzy(Long userId, ConditionOptionCall opLambda) { - FuzzyQueryBuilder builder = regFuzzyQ("userId", userId); + public void setUserInfoId_Fuzzy(String userInfoId, ConditionOptionCall opLambda) { + FuzzyQueryBuilder builder = regFuzzyQ("userInfoId", userInfoId); if (opLambda != null) { opLambda.callback(builder); } } - public void setUserId_GreaterThan(Long userId) { - setUserId_GreaterThan(userId, null); + public void setUserInfoId_Prefix(String userInfoId) { + setUserInfoId_Prefix(userInfoId, null); } - public void setUserId_GreaterThan(Long userId, ConditionOptionCall opLambda) { - RangeQueryBuilder builder = regRangeQ("userId", ConditionKey.CK_GREATER_THAN, userId); + public void setUserInfoId_Prefix(String userInfoId, ConditionOptionCall opLambda) { + PrefixQueryBuilder builder = regPrefixQ("userInfoId", userInfoId); if (opLambda != null) { opLambda.callback(builder); } } - public void setUserId_LessThan(Long userId) { - setUserId_LessThan(userId, null); + public void setUserInfoId_GreaterThan(String userInfoId) { + setUserInfoId_GreaterThan(userInfoId, null); } - public void setUserId_LessThan(Long userId, ConditionOptionCall opLambda) { - RangeQueryBuilder builder = regRangeQ("userId", ConditionKey.CK_LESS_THAN, userId); + public void setUserInfoId_GreaterThan(String userInfoId, ConditionOptionCall opLambda) { + RangeQueryBuilder builder = regRangeQ("userInfoId", ConditionKey.CK_GREATER_THAN, userInfoId); if (opLambda != null) { opLambda.callback(builder); } } - public void setUserId_GreaterEqual(Long userId) { - setUserId_GreaterEqual(userId, null); + public void setUserInfoId_LessThan(String userInfoId) { + setUserInfoId_LessThan(userInfoId, null); } - public void setUserId_GreaterEqual(Long userId, ConditionOptionCall opLambda) { - RangeQueryBuilder builder = regRangeQ("userId", ConditionKey.CK_GREATER_EQUAL, userId); + public void setUserInfoId_LessThan(String userInfoId, ConditionOptionCall opLambda) { + RangeQueryBuilder builder = regRangeQ("userInfoId", ConditionKey.CK_LESS_THAN, userInfoId); if (opLambda != null) { opLambda.callback(builder); } } - public void setUserId_LessEqual(Long userId) { - setUserId_LessEqual(userId, null); + public void setUserInfoId_GreaterEqual(String userInfoId) { + setUserInfoId_GreaterEqual(userInfoId, null); } - public void setUserId_LessEqual(Long userId, ConditionOptionCall opLambda) { - RangeQueryBuilder builder = regRangeQ("userId", ConditionKey.CK_LESS_EQUAL, userId); + public void setUserInfoId_GreaterEqual(String userInfoId, ConditionOptionCall opLambda) { + RangeQueryBuilder builder = regRangeQ("userInfoId", ConditionKey.CK_GREATER_EQUAL, userInfoId); if (opLambda != null) { opLambda.callback(builder); } } - public BsSearchLogCQ addOrderBy_UserId_Asc() { - regOBA("userId"); + public void setUserInfoId_LessEqual(String userInfoId) { + setUserInfoId_LessEqual(userInfoId, null); + } + + public void setUserInfoId_LessEqual(String userInfoId, ConditionOptionCall opLambda) { + RangeQueryBuilder builder = regRangeQ("userInfoId", ConditionKey.CK_LESS_EQUAL, userInfoId); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public BsSearchLogCQ addOrderBy_UserInfoId_Asc() { + regOBA("userInfoId"); return this; } - public BsSearchLogCQ addOrderBy_UserId_Desc() { - regOBD("userId"); + public BsSearchLogCQ addOrderBy_UserInfoId_Desc() { + regOBD("userInfoId"); return this; } + public void setUserSessionId_Equal(String userSessionId) { + setUserSessionId_Term(userSessionId, null); + } + + public void setUserSessionId_Equal(String userSessionId, ConditionOptionCall opLambda) { + setUserSessionId_Term(userSessionId, opLambda); + } + public void setUserSessionId_Term(String userSessionId) { setUserSessionId_Term(userSessionId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsSuggestBadWordCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsSuggestBadWordCQ.java index a23f9b736..1a11e0d16 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsSuggestBadWordCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsSuggestBadWordCQ.java @@ -62,6 +62,14 @@ public abstract class BsSuggestBadWordCQ extends AbstractConditionQuery { } } + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -201,6 +209,14 @@ public abstract class BsSuggestBadWordCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -329,6 +345,14 @@ public abstract class BsSuggestBadWordCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -468,6 +492,14 @@ public abstract class BsSuggestBadWordCQ extends AbstractConditionQuery { return this; } + public void setSuggestWord_Equal(String suggestWord) { + setSuggestWord_Term(suggestWord, null); + } + + public void setSuggestWord_Equal(String suggestWord, ConditionOptionCall opLambda) { + setSuggestWord_Term(suggestWord, opLambda); + } + public void setSuggestWord_Term(String suggestWord) { setSuggestWord_Term(suggestWord, null); } @@ -607,6 +639,14 @@ public abstract class BsSuggestBadWordCQ extends AbstractConditionQuery { return this; } + public void setTargetLabel_Equal(String targetLabel) { + setTargetLabel_Term(targetLabel, null); + } + + public void setTargetLabel_Equal(String targetLabel, ConditionOptionCall opLambda) { + setTargetLabel_Term(targetLabel, opLambda); + } + public void setTargetLabel_Term(String targetLabel) { setTargetLabel_Term(targetLabel, null); } @@ -746,6 +786,14 @@ public abstract class BsSuggestBadWordCQ extends AbstractConditionQuery { return this; } + public void setTargetRole_Equal(String targetRole) { + setTargetRole_Term(targetRole, null); + } + + public void setTargetRole_Equal(String targetRole, ConditionOptionCall opLambda) { + setTargetRole_Term(targetRole, opLambda); + } + public void setTargetRole_Term(String targetRole) { setTargetRole_Term(targetRole, null); } @@ -885,6 +933,14 @@ public abstract class BsSuggestBadWordCQ extends AbstractConditionQuery { return this; } + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1024,6 +1080,14 @@ public abstract class BsSuggestBadWordCQ extends AbstractConditionQuery { return this; } + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsSuggestElevateWordCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsSuggestElevateWordCQ.java index a1cad6a79..6d81e7d8f 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsSuggestElevateWordCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsSuggestElevateWordCQ.java @@ -63,6 +63,14 @@ public abstract class BsSuggestElevateWordCQ extends AbstractConditionQuery { } } + public void setBoost_Equal(Float boost) { + setBoost_Term(boost, null); + } + + public void setBoost_Equal(Float boost, ConditionOptionCall opLambda) { + setBoost_Term(boost, opLambda); + } + public void setBoost_Term(Float boost) { setBoost_Term(boost, null); } @@ -191,6 +199,14 @@ public abstract class BsSuggestElevateWordCQ extends AbstractConditionQuery { return this; } + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -330,6 +346,14 @@ public abstract class BsSuggestElevateWordCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -458,6 +482,14 @@ public abstract class BsSuggestElevateWordCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -597,6 +629,14 @@ public abstract class BsSuggestElevateWordCQ extends AbstractConditionQuery { return this; } + public void setReading_Equal(String reading) { + setReading_Term(reading, null); + } + + public void setReading_Equal(String reading, ConditionOptionCall opLambda) { + setReading_Term(reading, opLambda); + } + public void setReading_Term(String reading) { setReading_Term(reading, null); } @@ -736,6 +776,14 @@ public abstract class BsSuggestElevateWordCQ extends AbstractConditionQuery { return this; } + public void setSuggestWord_Equal(String suggestWord) { + setSuggestWord_Term(suggestWord, null); + } + + public void setSuggestWord_Equal(String suggestWord, ConditionOptionCall opLambda) { + setSuggestWord_Term(suggestWord, opLambda); + } + public void setSuggestWord_Term(String suggestWord) { setSuggestWord_Term(suggestWord, null); } @@ -875,6 +923,14 @@ public abstract class BsSuggestElevateWordCQ extends AbstractConditionQuery { return this; } + public void setTargetLabel_Equal(String targetLabel) { + setTargetLabel_Term(targetLabel, null); + } + + public void setTargetLabel_Equal(String targetLabel, ConditionOptionCall opLambda) { + setTargetLabel_Term(targetLabel, opLambda); + } + public void setTargetLabel_Term(String targetLabel) { setTargetLabel_Term(targetLabel, null); } @@ -1014,6 +1070,14 @@ public abstract class BsSuggestElevateWordCQ extends AbstractConditionQuery { return this; } + public void setTargetRole_Equal(String targetRole) { + setTargetRole_Term(targetRole, null); + } + + public void setTargetRole_Equal(String targetRole, ConditionOptionCall opLambda) { + setTargetRole_Term(targetRole, opLambda); + } + public void setTargetRole_Term(String targetRole) { setTargetRole_Term(targetRole, null); } @@ -1153,6 +1217,14 @@ public abstract class BsSuggestElevateWordCQ extends AbstractConditionQuery { return this; } + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1292,6 +1364,14 @@ public abstract class BsSuggestElevateWordCQ extends AbstractConditionQuery { return this; } + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsUserInfoCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsUserInfoCQ.java index aafa4e831..8d0ca942c 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsUserInfoCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsUserInfoCQ.java @@ -62,6 +62,14 @@ public abstract class BsUserInfoCQ extends AbstractConditionQuery { } } + public void setCode_Equal(String code) { + setCode_Term(code, null); + } + + public void setCode_Equal(String code, ConditionOptionCall opLambda) { + setCode_Term(code, opLambda); + } + public void setCode_Term(String code) { setCode_Term(code, null); } @@ -201,6 +209,14 @@ public abstract class BsUserInfoCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -329,6 +345,14 @@ public abstract class BsUserInfoCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -468,6 +492,14 @@ public abstract class BsUserInfoCQ extends AbstractConditionQuery { return this; } + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsWebAuthenticationCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsWebAuthenticationCQ.java index ca5bacd57..a8bcb2780 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsWebAuthenticationCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsWebAuthenticationCQ.java @@ -63,6 +63,14 @@ public abstract class BsWebAuthenticationCQ extends AbstractConditionQuery { } } + public void setAuthRealm_Equal(String authRealm) { + setAuthRealm_Term(authRealm, null); + } + + public void setAuthRealm_Equal(String authRealm, ConditionOptionCall opLambda) { + setAuthRealm_Term(authRealm, opLambda); + } + public void setAuthRealm_Term(String authRealm) { setAuthRealm_Term(authRealm, null); } @@ -202,6 +210,14 @@ public abstract class BsWebAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -341,6 +357,14 @@ public abstract class BsWebAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -469,6 +493,14 @@ public abstract class BsWebAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setHostname_Equal(String hostname) { + setHostname_Term(hostname, null); + } + + public void setHostname_Equal(String hostname, ConditionOptionCall opLambda) { + setHostname_Term(hostname, opLambda); + } + public void setHostname_Term(String hostname) { setHostname_Term(hostname, null); } @@ -608,6 +640,14 @@ public abstract class BsWebAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -747,6 +787,14 @@ public abstract class BsWebAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setParameters_Equal(String parameters) { + setParameters_Term(parameters, null); + } + + public void setParameters_Equal(String parameters, ConditionOptionCall opLambda) { + setParameters_Term(parameters, opLambda); + } + public void setParameters_Term(String parameters) { setParameters_Term(parameters, null); } @@ -886,6 +934,14 @@ public abstract class BsWebAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setPassword_Equal(String password) { + setPassword_Term(password, null); + } + + public void setPassword_Equal(String password, ConditionOptionCall opLambda) { + setPassword_Term(password, opLambda); + } + public void setPassword_Term(String password) { setPassword_Term(password, null); } @@ -1025,6 +1081,14 @@ public abstract class BsWebAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setPort_Equal(Integer port) { + setPort_Term(port, null); + } + + public void setPort_Equal(Integer port, ConditionOptionCall opLambda) { + setPort_Term(port, opLambda); + } + public void setPort_Term(Integer port) { setPort_Term(port, null); } @@ -1153,6 +1217,14 @@ public abstract class BsWebAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setProtocolScheme_Equal(String protocolScheme) { + setProtocolScheme_Term(protocolScheme, null); + } + + public void setProtocolScheme_Equal(String protocolScheme, ConditionOptionCall opLambda) { + setProtocolScheme_Term(protocolScheme, opLambda); + } + public void setProtocolScheme_Term(String protocolScheme) { setProtocolScheme_Term(protocolScheme, null); } @@ -1292,6 +1364,14 @@ public abstract class BsWebAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -1431,6 +1511,14 @@ public abstract class BsWebAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } @@ -1559,6 +1647,14 @@ public abstract class BsWebAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setUsername_Equal(String username) { + setUsername_Term(username, null); + } + + public void setUsername_Equal(String username, ConditionOptionCall opLambda) { + setUsername_Term(username, opLambda); + } + public void setUsername_Term(String username) { setUsername_Term(username, null); } @@ -1698,6 +1794,14 @@ public abstract class BsWebAuthenticationCQ extends AbstractConditionQuery { return this; } + public void setWebConfigId_Equal(String webConfigId) { + setWebConfigId_Term(webConfigId, null); + } + + public void setWebConfigId_Equal(String webConfigId, ConditionOptionCall opLambda) { + setWebConfigId_Term(webConfigId, opLambda); + } + public void setWebConfigId_Term(String webConfigId) { setWebConfigId_Term(webConfigId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsWebConfigCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsWebConfigCQ.java index a729412be..a9d499cbb 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsWebConfigCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsWebConfigCQ.java @@ -62,6 +62,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { } } + public void setAvailable_Equal(Boolean available) { + setAvailable_Term(available, null); + } + + public void setAvailable_Equal(Boolean available, ConditionOptionCall opLambda) { + setAvailable_Term(available, opLambda); + } + public void setAvailable_Term(Boolean available) { setAvailable_Term(available, null); } @@ -190,6 +198,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setBoost_Equal(Float boost) { + setBoost_Term(boost, null); + } + + public void setBoost_Equal(Float boost, ConditionOptionCall opLambda) { + setBoost_Term(boost, opLambda); + } + public void setBoost_Term(Float boost) { setBoost_Term(boost, null); } @@ -318,6 +334,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setConfigParameter_Equal(String configParameter) { + setConfigParameter_Term(configParameter, null); + } + + public void setConfigParameter_Equal(String configParameter, ConditionOptionCall opLambda) { + setConfigParameter_Term(configParameter, opLambda); + } + public void setConfigParameter_Term(String configParameter) { setConfigParameter_Term(configParameter, null); } @@ -457,6 +481,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setCreatedBy_Equal(String createdBy) { + setCreatedBy_Term(createdBy, null); + } + + public void setCreatedBy_Equal(String createdBy, ConditionOptionCall opLambda) { + setCreatedBy_Term(createdBy, opLambda); + } + public void setCreatedBy_Term(String createdBy) { setCreatedBy_Term(createdBy, null); } @@ -596,6 +628,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setCreatedTime_Equal(Long createdTime) { + setCreatedTime_Term(createdTime, null); + } + + public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall opLambda) { + setCreatedTime_Term(createdTime, opLambda); + } + public void setCreatedTime_Term(Long createdTime) { setCreatedTime_Term(createdTime, null); } @@ -724,6 +764,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setDepth_Equal(Integer depth) { + setDepth_Term(depth, null); + } + + public void setDepth_Equal(Integer depth, ConditionOptionCall opLambda) { + setDepth_Term(depth, opLambda); + } + public void setDepth_Term(Integer depth) { setDepth_Term(depth, null); } @@ -852,6 +900,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setExcludedDocUrls_Equal(String excludedDocUrls) { + setExcludedDocUrls_Term(excludedDocUrls, null); + } + + public void setExcludedDocUrls_Equal(String excludedDocUrls, ConditionOptionCall opLambda) { + setExcludedDocUrls_Term(excludedDocUrls, opLambda); + } + public void setExcludedDocUrls_Term(String excludedDocUrls) { setExcludedDocUrls_Term(excludedDocUrls, null); } @@ -991,6 +1047,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setExcludedUrls_Equal(String excludedUrls) { + setExcludedUrls_Term(excludedUrls, null); + } + + public void setExcludedUrls_Equal(String excludedUrls, ConditionOptionCall opLambda) { + setExcludedUrls_Term(excludedUrls, opLambda); + } + public void setExcludedUrls_Term(String excludedUrls) { setExcludedUrls_Term(excludedUrls, null); } @@ -1130,6 +1194,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -1269,6 +1341,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setIncludedDocUrls_Equal(String includedDocUrls) { + setIncludedDocUrls_Term(includedDocUrls, null); + } + + public void setIncludedDocUrls_Equal(String includedDocUrls, ConditionOptionCall opLambda) { + setIncludedDocUrls_Term(includedDocUrls, opLambda); + } + public void setIncludedDocUrls_Term(String includedDocUrls) { setIncludedDocUrls_Term(includedDocUrls, null); } @@ -1408,6 +1488,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setIncludedUrls_Equal(String includedUrls) { + setIncludedUrls_Term(includedUrls, null); + } + + public void setIncludedUrls_Equal(String includedUrls, ConditionOptionCall opLambda) { + setIncludedUrls_Term(includedUrls, opLambda); + } + public void setIncludedUrls_Term(String includedUrls) { setIncludedUrls_Term(includedUrls, null); } @@ -1547,6 +1635,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setIntervalTime_Equal(Integer intervalTime) { + setIntervalTime_Term(intervalTime, null); + } + + public void setIntervalTime_Equal(Integer intervalTime, ConditionOptionCall opLambda) { + setIntervalTime_Term(intervalTime, opLambda); + } + public void setIntervalTime_Term(Integer intervalTime) { setIntervalTime_Term(intervalTime, null); } @@ -1675,6 +1771,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setMaxAccessCount_Equal(Long maxAccessCount) { + setMaxAccessCount_Term(maxAccessCount, null); + } + + public void setMaxAccessCount_Equal(Long maxAccessCount, ConditionOptionCall opLambda) { + setMaxAccessCount_Term(maxAccessCount, opLambda); + } + public void setMaxAccessCount_Term(Long maxAccessCount) { setMaxAccessCount_Term(maxAccessCount, null); } @@ -1803,6 +1907,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setName_Equal(String name) { + setName_Term(name, null); + } + + public void setName_Equal(String name, ConditionOptionCall opLambda) { + setName_Term(name, opLambda); + } + public void setName_Term(String name) { setName_Term(name, null); } @@ -1942,6 +2054,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setNumOfThread_Equal(Integer numOfThread) { + setNumOfThread_Term(numOfThread, null); + } + + public void setNumOfThread_Equal(Integer numOfThread, ConditionOptionCall opLambda) { + setNumOfThread_Term(numOfThread, opLambda); + } + public void setNumOfThread_Term(Integer numOfThread) { setNumOfThread_Term(numOfThread, null); } @@ -2070,6 +2190,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setSortOrder_Equal(Integer sortOrder) { + setSortOrder_Term(sortOrder, null); + } + + public void setSortOrder_Equal(Integer sortOrder, ConditionOptionCall opLambda) { + setSortOrder_Term(sortOrder, opLambda); + } + public void setSortOrder_Term(Integer sortOrder) { setSortOrder_Term(sortOrder, null); } @@ -2198,6 +2326,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setUpdatedBy_Equal(String updatedBy) { + setUpdatedBy_Term(updatedBy, null); + } + + public void setUpdatedBy_Equal(String updatedBy, ConditionOptionCall opLambda) { + setUpdatedBy_Term(updatedBy, opLambda); + } + public void setUpdatedBy_Term(String updatedBy) { setUpdatedBy_Term(updatedBy, null); } @@ -2337,6 +2473,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setUpdatedTime_Equal(Long updatedTime) { + setUpdatedTime_Term(updatedTime, null); + } + + public void setUpdatedTime_Equal(Long updatedTime, ConditionOptionCall opLambda) { + setUpdatedTime_Term(updatedTime, opLambda); + } + public void setUpdatedTime_Term(Long updatedTime) { setUpdatedTime_Term(updatedTime, null); } @@ -2465,6 +2609,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setUrls_Equal(String urls) { + setUrls_Term(urls, null); + } + + public void setUrls_Equal(String urls, ConditionOptionCall opLambda) { + setUrls_Term(urls, opLambda); + } + public void setUrls_Term(String urls) { setUrls_Term(urls, null); } @@ -2604,6 +2756,14 @@ public abstract class BsWebConfigCQ extends AbstractConditionQuery { return this; } + public void setUserAgent_Equal(String userAgent) { + setUserAgent_Term(userAgent, null); + } + + public void setUserAgent_Equal(String userAgent, ConditionOptionCall opLambda) { + setUserAgent_Term(userAgent, opLambda); + } + public void setUserAgent_Term(String userAgent) { setUserAgent_Term(userAgent, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsWebConfigToLabelCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsWebConfigToLabelCQ.java index 33d4c24d8..fff4867ef 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsWebConfigToLabelCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsWebConfigToLabelCQ.java @@ -63,6 +63,14 @@ public abstract class BsWebConfigToLabelCQ extends AbstractConditionQuery { } } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -202,6 +210,14 @@ public abstract class BsWebConfigToLabelCQ extends AbstractConditionQuery { return this; } + public void setLabelTypeId_Equal(String labelTypeId) { + setLabelTypeId_Term(labelTypeId, null); + } + + public void setLabelTypeId_Equal(String labelTypeId, ConditionOptionCall opLambda) { + setLabelTypeId_Term(labelTypeId, opLambda); + } + public void setLabelTypeId_Term(String labelTypeId) { setLabelTypeId_Term(labelTypeId, null); } @@ -341,6 +357,14 @@ public abstract class BsWebConfigToLabelCQ extends AbstractConditionQuery { return this; } + public void setWebConfigId_Equal(String webConfigId) { + setWebConfigId_Term(webConfigId, null); + } + + public void setWebConfigId_Equal(String webConfigId, ConditionOptionCall opLambda) { + setWebConfigId_Term(webConfigId, opLambda); + } + public void setWebConfigId_Term(String webConfigId) { setWebConfigId_Term(webConfigId, null); } diff --git a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsWebConfigToRoleCQ.java b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsWebConfigToRoleCQ.java index 5699663ee..bdc2aee2f 100644 --- a/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsWebConfigToRoleCQ.java +++ b/src/main/java/org/codelibs/fess/es/cbean/cq/bs/BsWebConfigToRoleCQ.java @@ -63,6 +63,14 @@ public abstract class BsWebConfigToRoleCQ extends AbstractConditionQuery { } } + public void setId_Equal(String id) { + setId_Term(id, null); + } + + public void setId_Equal(String id, ConditionOptionCall opLambda) { + setId_Term(id, opLambda); + } + public void setId_Term(String id) { setId_Term(id, null); } @@ -202,6 +210,14 @@ public abstract class BsWebConfigToRoleCQ extends AbstractConditionQuery { return this; } + public void setRoleTypeId_Equal(String roleTypeId) { + setRoleTypeId_Term(roleTypeId, null); + } + + public void setRoleTypeId_Equal(String roleTypeId, ConditionOptionCall opLambda) { + setRoleTypeId_Term(roleTypeId, opLambda); + } + public void setRoleTypeId_Term(String roleTypeId) { setRoleTypeId_Term(roleTypeId, null); } @@ -341,6 +357,14 @@ public abstract class BsWebConfigToRoleCQ extends AbstractConditionQuery { return this; } + public void setWebConfigId_Equal(String webConfigId) { + setWebConfigId_Term(webConfigId, null); + } + + public void setWebConfigId_Equal(String webConfigId, ConditionOptionCall opLambda) { + setWebConfigId_Term(webConfigId, opLambda); + } + public void setWebConfigId_Term(String webConfigId) { setWebConfigId_Term(webConfigId, null); } diff --git a/src/main/java/org/codelibs/fess/es/exbhv/SuggestElevateWordBhv.java b/src/main/java/org/codelibs/fess/es/exbhv/SuggestElevateWordBhv.java index b003f4db8..92ea54746 100644 --- a/src/main/java/org/codelibs/fess/es/exbhv/SuggestElevateWordBhv.java +++ b/src/main/java/org/codelibs/fess/es/exbhv/SuggestElevateWordBhv.java @@ -6,5 +6,4 @@ import org.codelibs.fess.es.bsbhv.BsSuggestElevateWordBhv; * @author FreeGen */ public class SuggestElevateWordBhv extends BsSuggestElevateWordBhv { - } diff --git a/src/main/java/org/codelibs/fess/es/exentity/BoostDocumentRule.java b/src/main/java/org/codelibs/fess/es/exentity/BoostDocumentRule.java index f97573e6b..5e262f07b 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/BoostDocumentRule.java +++ b/src/main/java/org/codelibs/fess/es/exentity/BoostDocumentRule.java @@ -9,10 +9,12 @@ public class BoostDocumentRule extends BsBoostDocumentRule { private static final long serialVersionUID = 1L; + @Override public String getId() { return asDocMeta().id(); } + @Override public void setId(String id) { asDocMeta().id(id); } diff --git a/src/main/java/org/codelibs/fess/es/exentity/ClickLog.java b/src/main/java/org/codelibs/fess/es/exentity/ClickLog.java index 087f7d3e8..6e8a47219 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/ClickLog.java +++ b/src/main/java/org/codelibs/fess/es/exentity/ClickLog.java @@ -1,6 +1,13 @@ package org.codelibs.fess.es.exentity; +import java.text.SimpleDateFormat; +import java.util.Date; + +import org.codelibs.fess.Constants; import org.codelibs.fess.es.bsentity.BsClickLog; +import org.codelibs.fess.es.exbhv.SearchLogBhv; +import org.codelibs.fess.util.ComponentUtil; +import org.dbflute.optional.OptionalEntity; /** * @author FreeGen @@ -8,4 +15,83 @@ import org.codelibs.fess.es.bsentity.BsClickLog; public class ClickLog extends BsClickLog { private static final long serialVersionUID = 1L; + + private long queryRequestedTime; + + private String userSessionId; + + private String docId; + + private long clickCount; + + private OptionalEntity searchLog; + + public OptionalEntity getSearchLog() { + if (searchLog == null) { + final SearchLogBhv searchLogBhv = ComponentUtil.getComponent(SearchLogBhv.class); + searchLog = searchLogBhv.selectEntity(cb -> { + cb.query().docMeta().setId_Equal(getSearchLogId()); + }); + } + return searchLog; + } + + public String getUserSessionId() { + return userSessionId; + } + + public void setUserSessionId(final String userSessionId) { + this.userSessionId = userSessionId; + } + + public long getQueryRequestedTime() { + return queryRequestedTime; + } + + public void setQueryRequestedTime(final long queryRequestedTime) { + this.queryRequestedTime = queryRequestedTime; + } + + public String getRequestedTimeForList() { + final SimpleDateFormat sdf = new SimpleDateFormat(Constants.DEFAULT_DATETIME_FORMAT); + if (getRequestedTime() != null) { + return sdf.format(new Date(getRequestedTime())); + } + return null; + } + + public String getDocId() { + return docId; + } + + public void setDocId(final String docId) { + this.docId = docId; + } + + public long getClickCount() { + return clickCount; + } + + public void setClickCount(final long clickCount) { + this.clickCount = clickCount; + } + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } + } diff --git a/src/main/java/org/codelibs/fess/db/exentity/CrawlingConfig.java b/src/main/java/org/codelibs/fess/es/exentity/CrawlingConfig.java similarity index 56% rename from src/main/java/org/codelibs/fess/db/exentity/CrawlingConfig.java rename to src/main/java/org/codelibs/fess/es/exentity/CrawlingConfig.java index ceef721a2..f678a99b4 100644 --- a/src/main/java/org/codelibs/fess/db/exentity/CrawlingConfig.java +++ b/src/main/java/org/codelibs/fess/es/exentity/CrawlingConfig.java @@ -1,20 +1,4 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.db.exentity; +package org.codelibs.fess.es.exentity; import java.util.Map; @@ -22,7 +6,7 @@ import org.codelibs.robot.client.S2RobotClientFactory; public interface CrawlingConfig { - Long getId(); + String getId(); String getName(); @@ -53,7 +37,7 @@ public interface CrawlingConfig { return typePrefix; } - public String getConfigId(final Long id) { + public String getConfigId(final String id) { if (id == null) { return null; } diff --git a/src/main/java/org/codelibs/fess/es/exentity/CrawlingSession.java b/src/main/java/org/codelibs/fess/es/exentity/CrawlingSession.java index 7a5663381..cfc087b15 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/CrawlingSession.java +++ b/src/main/java/org/codelibs/fess/es/exentity/CrawlingSession.java @@ -8,4 +8,29 @@ import org.codelibs.fess.es.bsentity.BsCrawlingSession; public class CrawlingSession extends BsCrawlingSession { private static final long serialVersionUID = 1L; + + public CrawlingSession() { + } + + public CrawlingSession(final String sessionId) { + setSessionId(sessionId); + } + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/CrawlingSessionInfo.java b/src/main/java/org/codelibs/fess/es/exentity/CrawlingSessionInfo.java index fa95a4553..3b07695e9 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/CrawlingSessionInfo.java +++ b/src/main/java/org/codelibs/fess/es/exentity/CrawlingSessionInfo.java @@ -1,6 +1,13 @@ package org.codelibs.fess.es.exentity; +import java.util.Locale; + import org.codelibs.fess.es.bsentity.BsCrawlingSessionInfo; +import org.codelibs.fess.es.exbhv.CrawlingSessionBhv; +import org.codelibs.fess.util.ComponentUtil; +import org.dbflute.optional.OptionalEntity; +import org.seasar.struts.util.MessageResourcesUtil; +import org.seasar.struts.util.RequestUtil; /** * @author FreeGen @@ -8,4 +15,44 @@ import org.codelibs.fess.es.bsentity.BsCrawlingSessionInfo; public class CrawlingSessionInfo extends BsCrawlingSessionInfo { private static final long serialVersionUID = 1L; + + private OptionalEntity crawlingSession; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } + + public OptionalEntity getCrawlingSession() { + if (crawlingSession != null) { + final CrawlingSessionBhv crawlingSessionBhv = ComponentUtil.getComponent(CrawlingSessionBhv.class); + crawlingSession = crawlingSessionBhv.selectEntity(cb -> { + cb.query().docMeta().setId_Equal(getCrawlingSessionId()); + }); + } + return crawlingSession; + } + + public String getKeyMsg() { + final Locale locale = RequestUtil.getRequest().getLocale(); + final String message = MessageResourcesUtil.getMessage(locale, "labels.crawling_session_" + getKey()); + if (message == null || message.startsWith("???")) { + return getKey(); + } + return message; + } + } diff --git a/src/main/java/org/codelibs/fess/es/exentity/DataConfig.java b/src/main/java/org/codelibs/fess/es/exentity/DataConfig.java index f383d04a0..f130b9257 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/DataConfig.java +++ b/src/main/java/org/codelibs/fess/es/exentity/DataConfig.java @@ -1,11 +1,381 @@ package org.codelibs.fess.es.exentity; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Pattern; + +import org.apache.http.auth.AuthScheme; +import org.apache.http.auth.AuthScope; +import org.apache.http.auth.Credentials; +import org.apache.http.auth.NTCredentials; +import org.apache.http.auth.UsernamePasswordCredentials; +import org.apache.http.impl.auth.BasicScheme; +import org.apache.http.impl.auth.DigestScheme; +import org.apache.http.impl.auth.NTLMScheme; +import org.codelibs.core.lang.StringUtil; +import org.codelibs.fess.Constants; import org.codelibs.fess.es.bsentity.BsDataConfig; +import org.codelibs.fess.es.exbhv.FileConfigToLabelBhv; +import org.codelibs.fess.es.exbhv.FileConfigToRoleBhv; +import org.codelibs.fess.es.exbhv.LabelTypeBhv; +import org.codelibs.fess.es.exbhv.RoleTypeBhv; +import org.codelibs.fess.util.ComponentUtil; +import org.codelibs.fess.util.ParameterUtil; +import org.codelibs.robot.client.S2RobotClientFactory; +import org.codelibs.robot.client.http.Authentication; +import org.codelibs.robot.client.http.HcHttpClient; +import org.codelibs.robot.client.http.impl.AuthenticationImpl; +import org.codelibs.robot.client.http.ntlm.JcifsEngine; +import org.codelibs.robot.client.smb.SmbAuthentication; +import org.codelibs.robot.client.smb.SmbClient; +import org.dbflute.cbean.result.ListResultBean; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author FreeGen */ -public class DataConfig extends BsDataConfig { +public class DataConfig extends BsDataConfig implements CrawlingConfig { private static final long serialVersionUID = 1L; + + private static final Logger logger = LoggerFactory.getLogger(DataConfig.class); + + private static final String S2ROBOT_WEB_HEADER_PREFIX = "s2robot.web.header."; + + private static final String S2ROBOT_WEB_AUTH = "s2robot.web.auth"; + + private static final String S2ROBOT_USERAGENT = "s2robot.useragent"; + + private static final String S2ROBOT_PARAM_PREFIX = "s2robot.param."; + + private static final Object S2ROBOT_FILE_AUTH = "s2robot.file.auth"; + + private String[] labelTypeIds; + + private String[] roleTypeIds; + + protected Pattern[] includedDocPathPatterns; + + protected Pattern[] excludedDocPathPatterns; + + private Map handlerParameterMap; + + private Map handlerScriptMap; + + private List labelTypeList; + + private List roleTypeList; + + public DataConfig() { + super(); + setBoost(1.0f); + } + + public String[] getLabelTypeIds() { + if (labelTypeIds == null) { + return StringUtil.EMPTY_STRINGS; + } + return labelTypeIds; + } + + public void setLabelTypeIds(final String[] labelTypeIds) { + this.labelTypeIds = labelTypeIds; + } + + public List getLabelTypeList() { + if (labelTypeList == null) { + synchronized (this) { + if (labelTypeList == null) { + final FileConfigToLabelBhv fileConfigToLabelBhv = ComponentUtil.getComponent(FileConfigToLabelBhv.class); + final ListResultBean mappingList = fileConfigToLabelBhv.selectList(cb -> { + cb.query().setFileConfigId_Equal(getId()); + cb.specify().columnLabelTypeId(); + }); + final List labelIdList = new ArrayList<>(); + for (final FileConfigToLabel mapping : mappingList) { + labelIdList.add(mapping.getLabelTypeId()); + } + final LabelTypeBhv labelTypeBhv = ComponentUtil.getComponent(LabelTypeBhv.class); + labelTypeList = labelTypeBhv.selectList(cb -> { + cb.query().setId_InScope(labelIdList); + cb.query().addOrderBy_SortOrder_Asc(); + }); + } + } + } + return labelTypeList; + } + + @Override + public String[] getLabelTypeValues() { + final List list = getLabelTypeList(); + final List labelValueList = new ArrayList<>(list.size()); + for (final LabelType labelType : list) { + labelValueList.add(labelType.getValue()); + } + return labelValueList.toArray(new String[labelValueList.size()]); + } + + public String[] getRoleTypeIds() { + if (roleTypeIds == null) { + return StringUtil.EMPTY_STRINGS; + } + return roleTypeIds; + } + + public void setRoleTypeIds(final String[] roleTypeIds) { + this.roleTypeIds = roleTypeIds; + } + + public List getRoleTypeList() { + if (roleTypeList == null) { + synchronized (this) { + if (roleTypeList == null) { + final FileConfigToRoleBhv fileConfigToRoleBhv = ComponentUtil.getComponent(FileConfigToRoleBhv.class); + final ListResultBean mappingList = fileConfigToRoleBhv.selectList(cb -> { + cb.query().setFileConfigId_Equal(getId()); + cb.specify().columnRoleTypeId(); + }); + final List roleIdList = new ArrayList<>(); + for (final FileConfigToRole mapping : mappingList) { + roleIdList.add(mapping.getRoleTypeId()); + } + final RoleTypeBhv roleTypeBhv = ComponentUtil.getComponent(RoleTypeBhv.class); + roleTypeList = roleTypeBhv.selectList(cb -> { + cb.query().setId_InScope(roleIdList); + cb.query().addOrderBy_SortOrder_Asc(); + }); + } + } + } + return roleTypeList; + } + + @Override + public String[] getRoleTypeValues() { + final List list = getRoleTypeList(); + final List roleValueList = new ArrayList<>(list.size()); + for (final RoleType roleType : list) { + roleValueList.add(roleType.getValue()); + } + return roleValueList.toArray(new String[roleValueList.size()]); + } + + @Override + public String getDocumentBoost() { + return Float.valueOf(getBoost().floatValue()).toString(); + } + + public String getBoostValue() { + if (boost != null) { + return boost.toString(); + } + return null; + } + + public void setBoostValue(final String value) { + if (value != null) { + try { + boost = Float.parseFloat(value); + } catch (final Exception e) {} + } + } + + @Override + public String getIndexingTarget(final String input) { + // always return true + return Constants.TRUE; + } + + @Override + public String getConfigId() { + return ConfigType.DATA.getConfigId(getId()); + } + + public Map getHandlerParameterMap() { + if (handlerParameterMap == null) { + handlerParameterMap = ParameterUtil.parse(getHandlerParameter()); + } + return handlerParameterMap; + } + + public Map getHandlerScriptMap() { + if (handlerScriptMap == null) { + handlerScriptMap = ParameterUtil.parse(getHandlerScript()); + } + return handlerScriptMap; + } + + @Override + public void initializeClientFactory(final S2RobotClientFactory robotClientFactory) { + final Map paramMap = getHandlerParameterMap(); + + final Map factoryParamMap = new HashMap(); + robotClientFactory.setInitParameterMap(factoryParamMap); + + // parameters + for (final Map.Entry entry : paramMap.entrySet()) { + final String key = entry.getKey(); + if (key.startsWith(S2ROBOT_PARAM_PREFIX)) { + factoryParamMap.put(key.substring(S2ROBOT_PARAM_PREFIX.length()), entry.getValue()); + } + } + + // user agent + final String userAgent = paramMap.get(S2ROBOT_USERAGENT); + if (StringUtil.isNotBlank(userAgent)) { + factoryParamMap.put(HcHttpClient.USER_AGENT_PROPERTY, userAgent); + } + + // web auth + final String webAuthStr = paramMap.get(S2ROBOT_WEB_AUTH); + if (StringUtil.isNotBlank(webAuthStr)) { + final String[] webAuthNames = webAuthStr.split(","); + final List basicAuthList = new ArrayList(); + for (final String webAuthName : webAuthNames) { + final String scheme = paramMap.get(S2ROBOT_WEB_AUTH + "." + webAuthName + ".scheme"); + final String hostname = paramMap.get(S2ROBOT_WEB_AUTH + "." + webAuthName + ".host"); + final String port = paramMap.get(S2ROBOT_WEB_AUTH + "." + webAuthName + ".port"); + final String realm = paramMap.get(S2ROBOT_WEB_AUTH + "." + webAuthName + ".realm"); + final String username = paramMap.get(S2ROBOT_WEB_AUTH + "." + webAuthName + ".username"); + final String password = paramMap.get(S2ROBOT_WEB_AUTH + "." + webAuthName + ".password"); + + if (StringUtil.isEmpty(username)) { + logger.warn("username is empty. webAuth:" + webAuthName); + continue; + } + + AuthScheme authScheme = null; + if (Constants.BASIC.equals(scheme)) { + authScheme = new BasicScheme(); + } else if (Constants.DIGEST.equals(scheme)) { + authScheme = new DigestScheme(); + } else if (Constants.NTLM.equals(scheme)) { + authScheme = new NTLMScheme(new JcifsEngine()); + } + + AuthScope authScope; + if (StringUtil.isBlank(hostname)) { + authScope = AuthScope.ANY; + } else { + int p = AuthScope.ANY_PORT; + if (StringUtil.isNotBlank(port)) { + try { + p = Integer.parseInt(port); + } catch (final NumberFormatException e) { + logger.warn("Failed to parse " + port, e); + } + } + + String r = realm; + if (StringUtil.isBlank(realm)) { + r = AuthScope.ANY_REALM; + } + + String s = scheme; + if (StringUtil.isBlank(scheme) || Constants.NTLM.equals(scheme)) { + s = AuthScope.ANY_SCHEME; + } + authScope = new AuthScope(hostname, p, r, s); + } + + Credentials credentials; + if (Constants.NTLM.equals(scheme)) { + final String workstation = paramMap.get(S2ROBOT_WEB_AUTH + "." + webAuthName + ".workstation"); + final String domain = paramMap.get(S2ROBOT_WEB_AUTH + "." + webAuthName + ".domain"); + credentials = + new NTCredentials(username, password == null ? StringUtil.EMPTY : password, + workstation == null ? StringUtil.EMPTY : workstation, domain == null ? StringUtil.EMPTY : domain); + } else { + credentials = new UsernamePasswordCredentials(username, password == null ? StringUtil.EMPTY : password); + } + + basicAuthList.add(new AuthenticationImpl(authScope, credentials, authScheme)); + } + factoryParamMap.put(HcHttpClient.BASIC_AUTHENTICATIONS_PROPERTY, + basicAuthList.toArray(new Authentication[basicAuthList.size()])); + } + + // request header + final List rhList = new ArrayList(); + int count = 1; + String headerName = paramMap.get(S2ROBOT_WEB_HEADER_PREFIX + count + ".name"); + while (StringUtil.isNotBlank(headerName)) { + final String headerValue = paramMap.get(S2ROBOT_WEB_HEADER_PREFIX + count + ".value"); + rhList.add(new org.codelibs.robot.client.http.RequestHeader(headerName, headerValue)); + count++; + headerName = paramMap.get(S2ROBOT_WEB_HEADER_PREFIX + count + ".name"); + } + if (!rhList.isEmpty()) { + factoryParamMap.put(HcHttpClient.REQUERT_HEADERS_PROPERTY, + rhList.toArray(new org.codelibs.robot.client.http.RequestHeader[rhList.size()])); + } + + // file auth + final String fileAuthStr = paramMap.get(S2ROBOT_FILE_AUTH); + if (StringUtil.isNotBlank(fileAuthStr)) { + final String[] fileAuthNames = fileAuthStr.split(","); + final List smbAuthList = new ArrayList(); + for (final String fileAuthName : fileAuthNames) { + final String scheme = paramMap.get(S2ROBOT_FILE_AUTH + "." + fileAuthName + ".scheme"); + if (Constants.SAMBA.equals(scheme)) { + final String domain = paramMap.get(S2ROBOT_FILE_AUTH + "." + fileAuthName + ".domain"); + final String hostname = paramMap.get(S2ROBOT_FILE_AUTH + "." + fileAuthName + ".host"); + final String port = paramMap.get(S2ROBOT_FILE_AUTH + "." + fileAuthName + ".port"); + final String username = paramMap.get(S2ROBOT_FILE_AUTH + "." + fileAuthName + ".username"); + final String password = paramMap.get(S2ROBOT_FILE_AUTH + "." + fileAuthName + ".password"); + + if (StringUtil.isEmpty(username)) { + logger.warn("username is empty. fileAuth:" + fileAuthName); + continue; + } + + final SmbAuthentication smbAuth = new SmbAuthentication(); + smbAuth.setDomain(domain == null ? StringUtil.EMPTY : domain); + smbAuth.setServer(hostname); + if (StringUtil.isNotBlank(port)) { + try { + smbAuth.setPort(Integer.parseInt(port)); + } catch (final NumberFormatException e) { + logger.warn("Failed to parse " + port, e); + } + } + smbAuth.setUsername(username); + smbAuth.setPassword(password == null ? StringUtil.EMPTY : password); + smbAuthList.add(smbAuth); + } + } + if (!smbAuthList.isEmpty()) { + factoryParamMap.put(SmbClient.SMB_AUTHENTICATIONS_PROPERTY, smbAuthList.toArray(new SmbAuthentication[smbAuthList.size()])); + } + } + + } + + @Override + public Map getConfigParameterMap(final ConfigName name) { + return Collections.emptyMap(); + } + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/DataConfigToLabel.java b/src/main/java/org/codelibs/fess/es/exentity/DataConfigToLabel.java index 6803a6969..4a54549d9 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/DataConfigToLabel.java +++ b/src/main/java/org/codelibs/fess/es/exentity/DataConfigToLabel.java @@ -8,4 +8,22 @@ import org.codelibs.fess.es.bsentity.BsDataConfigToLabel; public class DataConfigToLabel extends BsDataConfigToLabel { private static final long serialVersionUID = 1L; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/DataConfigToRole.java b/src/main/java/org/codelibs/fess/es/exentity/DataConfigToRole.java index a3533d8ce..160ec1b5d 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/DataConfigToRole.java +++ b/src/main/java/org/codelibs/fess/es/exentity/DataConfigToRole.java @@ -8,4 +8,22 @@ import org.codelibs.fess.es.bsentity.BsDataConfigToRole; public class DataConfigToRole extends BsDataConfigToRole { private static final long serialVersionUID = 1L; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/FailureUrl.java b/src/main/java/org/codelibs/fess/es/exentity/FailureUrl.java index 90c78314f..c970c28b1 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/FailureUrl.java +++ b/src/main/java/org/codelibs/fess/es/exentity/FailureUrl.java @@ -8,4 +8,22 @@ import org.codelibs.fess.es.bsentity.BsFailureUrl; public class FailureUrl extends BsFailureUrl { private static final long serialVersionUID = 1L; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/FavoriteLog.java b/src/main/java/org/codelibs/fess/es/exentity/FavoriteLog.java index 44d3dbf5e..10c17fcc8 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/FavoriteLog.java +++ b/src/main/java/org/codelibs/fess/es/exentity/FavoriteLog.java @@ -8,4 +8,22 @@ import org.codelibs.fess.es.bsentity.BsFavoriteLog; public class FavoriteLog extends BsFavoriteLog { private static final long serialVersionUID = 1L; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/FileAuthentication.java b/src/main/java/org/codelibs/fess/es/exentity/FileAuthentication.java index bbb8db22d..c339197dc 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/FileAuthentication.java +++ b/src/main/java/org/codelibs/fess/es/exentity/FileAuthentication.java @@ -8,4 +8,22 @@ import org.codelibs.fess.es.bsentity.BsFileAuthentication; public class FileAuthentication extends BsFileAuthentication { private static final long serialVersionUID = 1L; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/FileConfig.java b/src/main/java/org/codelibs/fess/es/exentity/FileConfig.java index c7a216675..b9e939163 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/FileConfig.java +++ b/src/main/java/org/codelibs/fess/es/exentity/FileConfig.java @@ -1,11 +1,293 @@ package org.codelibs.fess.es.exentity; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Pattern; + +import org.codelibs.core.lang.StringUtil; +import org.codelibs.fess.Constants; import org.codelibs.fess.es.bsentity.BsFileConfig; +import org.codelibs.fess.es.exbhv.FileConfigToLabelBhv; +import org.codelibs.fess.es.exbhv.FileConfigToRoleBhv; +import org.codelibs.fess.es.exbhv.LabelTypeBhv; +import org.codelibs.fess.es.exbhv.RoleTypeBhv; +import org.codelibs.fess.helper.SystemHelper; +import org.codelibs.fess.service.FileAuthenticationService; +import org.codelibs.fess.util.ComponentUtil; +import org.codelibs.fess.util.ParameterUtil; +import org.codelibs.robot.client.S2RobotClientFactory; +import org.codelibs.robot.client.smb.SmbAuthentication; +import org.codelibs.robot.client.smb.SmbClient; +import org.dbflute.cbean.result.ListResultBean; +import org.seasar.framework.container.SingletonS2Container; /** * @author FreeGen */ -public class FileConfig extends BsFileConfig { +public class FileConfig extends BsFileConfig implements CrawlingConfig { private static final long serialVersionUID = 1L; + + private String[] labelTypeIds; + + private String[] roleTypeIds; + + protected volatile Pattern[] includedDocPathPatterns; + + protected volatile Pattern[] excludedDocPathPatterns; + + protected volatile Map> configParameterMap; + + private List labelTypeList; + + private List roleTypeList; + + public FileConfig() { + super(); + setBoost(1.0f); + } + + public String[] getLabelTypeIds() { + if (labelTypeIds == null) { + return StringUtil.EMPTY_STRINGS; + } + return labelTypeIds; + } + + public void setLabelTypeIds(final String[] labelTypeIds) { + this.labelTypeIds = labelTypeIds; + } + + public List getLabelTypeList() { + if (labelTypeList == null) { + synchronized (this) { + if (labelTypeList == null) { + final FileConfigToLabelBhv fileConfigToLabelBhv = ComponentUtil.getComponent(FileConfigToLabelBhv.class); + final ListResultBean mappingList = fileConfigToLabelBhv.selectList(cb -> { + cb.query().setFileConfigId_Equal(getId()); + cb.specify().columnLabelTypeId(); + }); + final List labelIdList = new ArrayList<>(); + for (final FileConfigToLabel mapping : mappingList) { + labelIdList.add(mapping.getLabelTypeId()); + } + final LabelTypeBhv labelTypeBhv = ComponentUtil.getComponent(LabelTypeBhv.class); + labelTypeList = labelTypeBhv.selectList(cb -> { + cb.query().setId_InScope(labelIdList); + cb.query().addOrderBy_SortOrder_Asc(); + }); + } + } + } + return labelTypeList; + } + + @Override + public String[] getLabelTypeValues() { + final List list = getLabelTypeList(); + final List labelValueList = new ArrayList<>(list.size()); + for (final LabelType labelType : list) { + labelValueList.add(labelType.getValue()); + } + return labelValueList.toArray(new String[labelValueList.size()]); + } + + public String[] getRoleTypeIds() { + if (roleTypeIds == null) { + return StringUtil.EMPTY_STRINGS; + } + return roleTypeIds; + } + + public void setRoleTypeIds(final String[] roleTypeIds) { + this.roleTypeIds = roleTypeIds; + } + + public List getRoleTypeList() { + if (roleTypeList == null) { + synchronized (this) { + if (roleTypeList == null) { + final FileConfigToRoleBhv fileConfigToRoleBhv = ComponentUtil.getComponent(FileConfigToRoleBhv.class); + final ListResultBean mappingList = fileConfigToRoleBhv.selectList(cb -> { + cb.query().setFileConfigId_Equal(getId()); + cb.specify().columnRoleTypeId(); + }); + final List roleIdList = new ArrayList<>(); + for (final FileConfigToRole mapping : mappingList) { + roleIdList.add(mapping.getRoleTypeId()); + } + final RoleTypeBhv roleTypeBhv = ComponentUtil.getComponent(RoleTypeBhv.class); + roleTypeList = roleTypeBhv.selectList(cb -> { + cb.query().setId_InScope(roleIdList); + cb.query().addOrderBy_SortOrder_Asc(); + }); + } + } + } + return roleTypeList; + } + + @Override + public String[] getRoleTypeValues() { + final List list = getRoleTypeList(); + final List roleValueList = new ArrayList<>(list.size()); + for (final RoleType roleType : list) { + roleValueList.add(roleType.getValue()); + } + return roleValueList.toArray(new String[roleValueList.size()]); + } + + @Override + public String getDocumentBoost() { + return Float.valueOf(getBoost().floatValue()).toString(); + } + + @Override + public String getIndexingTarget(final String input) { + if (includedDocPathPatterns == null || excludedDocPathPatterns == null) { + initDocPathPattern(); + } + + if (includedDocPathPatterns.length == 0 && excludedDocPathPatterns.length == 0) { + return Constants.TRUE; + } + + for (final Pattern pattern : includedDocPathPatterns) { + if (pattern.matcher(input).matches()) { + return Constants.TRUE; + } + } + + for (final Pattern pattern : excludedDocPathPatterns) { + if (pattern.matcher(input).matches()) { + return Constants.FALSE; + } + } + + return Constants.TRUE; + + } + + protected synchronized void initDocPathPattern() { + final SystemHelper systemHelper = ComponentUtil.getSystemHelper(); + + if (includedDocPathPatterns == null) { + if (StringUtil.isNotBlank(getIncludedDocPaths())) { + final List pathPatterList = new ArrayList(); + final String[] paths = getIncludedDocPaths().split("[\r\n]"); + for (final String u : paths) { + if (StringUtil.isNotBlank(u) && !u.trim().startsWith("#")) { + pathPatterList.add(Pattern.compile(systemHelper.encodeUrlFilter(u.trim()))); + } + } + includedDocPathPatterns = pathPatterList.toArray(new Pattern[pathPatterList.size()]); + } else { + includedDocPathPatterns = new Pattern[0]; + } + } + + if (excludedDocPathPatterns == null) { + if (StringUtil.isNotBlank(getExcludedDocPaths())) { + final List pathPatterList = new ArrayList(); + final String[] paths = getExcludedDocPaths().split("[\r\n]"); + for (final String u : paths) { + if (StringUtil.isNotBlank(u) && !u.trim().startsWith("#")) { + pathPatterList.add(Pattern.compile(systemHelper.encodeUrlFilter(u.trim()))); + } + } + excludedDocPathPatterns = pathPatterList.toArray(new Pattern[pathPatterList.size()]); + } else if (includedDocPathPatterns.length > 0) { + excludedDocPathPatterns = new Pattern[] { Pattern.compile(".*") }; + } else { + excludedDocPathPatterns = new Pattern[0]; + } + } + } + + public String getBoostValue() { + if (boost != null) { + return boost.toString(); + } + return null; + } + + public void setBoostValue(final String value) { + if (value != null) { + try { + boost = Float.parseFloat(value); + } catch (final Exception e) {} + } + } + + @Override + public String getConfigId() { + return ConfigType.FILE.getConfigId(getId()); + } + + @Override + public void initializeClientFactory(final S2RobotClientFactory clientFactory) { + final FileAuthenticationService fileAuthenticationService = SingletonS2Container.getComponent(FileAuthenticationService.class); + + // Parameters + final Map paramMap = new HashMap(); + clientFactory.setInitParameterMap(paramMap); + + final Map clientConfigMap = getConfigParameterMap(ConfigName.CLIENT); + if (clientConfigMap != null) { + paramMap.putAll(clientConfigMap); + } + + // auth params + final List fileAuthList = fileAuthenticationService.getFileAuthenticationList(getId()); + final List smbAuthList = new ArrayList(); + for (final FileAuthentication fileAuth : fileAuthList) { + if (Constants.SAMBA.equals(fileAuth.getProtocolScheme())) { + final SmbAuthentication smbAuth = new SmbAuthentication(); + final Map map = ParameterUtil.parse(fileAuth.getParameters()); + final String domain = map.get("domain"); + smbAuth.setDomain(domain == null ? StringUtil.EMPTY : domain); + smbAuth.setServer(fileAuth.getHostname()); + smbAuth.setPort(fileAuth.getPort()); + smbAuth.setUsername(fileAuth.getUsername()); + smbAuth.setPassword(fileAuth.getPassword()); + smbAuthList.add(smbAuth); + } + } + paramMap.put(SmbClient.SMB_AUTHENTICATIONS_PROPERTY, smbAuthList.toArray(new SmbAuthentication[smbAuthList.size()])); + + } + + @Override + public Map getConfigParameterMap(final ConfigName name) { + if (configParameterMap == null) { + configParameterMap = ParameterUtil.createConfigParameterMap(getConfigParameter()); + } + + final Map configMap = configParameterMap.get(name); + if (configMap == null) { + return Collections.emptyMap(); + } + return configMap; + } + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/FileConfigToLabel.java b/src/main/java/org/codelibs/fess/es/exentity/FileConfigToLabel.java index 64b0d396a..22ff4bb5c 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/FileConfigToLabel.java +++ b/src/main/java/org/codelibs/fess/es/exentity/FileConfigToLabel.java @@ -8,4 +8,22 @@ import org.codelibs.fess.es.bsentity.BsFileConfigToLabel; public class FileConfigToLabel extends BsFileConfigToLabel { private static final long serialVersionUID = 1L; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/FileConfigToRole.java b/src/main/java/org/codelibs/fess/es/exentity/FileConfigToRole.java index 53c19fd4b..d87d8d832 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/FileConfigToRole.java +++ b/src/main/java/org/codelibs/fess/es/exentity/FileConfigToRole.java @@ -8,4 +8,22 @@ import org.codelibs.fess.es.bsentity.BsFileConfigToRole; public class FileConfigToRole extends BsFileConfigToRole { private static final long serialVersionUID = 1L; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/JobLog.java b/src/main/java/org/codelibs/fess/es/exentity/JobLog.java index 41b9d4ad8..17c8c7ed2 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/JobLog.java +++ b/src/main/java/org/codelibs/fess/es/exentity/JobLog.java @@ -1,6 +1,8 @@ package org.codelibs.fess.es.exentity; +import org.codelibs.fess.Constants; import org.codelibs.fess.es.bsentity.BsJobLog; +import org.codelibs.fess.util.ComponentUtil; /** * @author FreeGen @@ -8,4 +10,41 @@ import org.codelibs.fess.es.bsentity.BsJobLog; public class JobLog extends BsJobLog { private static final long serialVersionUID = 1L; + + private ScheduledJob scheduledJob; + + public JobLog() { + } + + public JobLog(final ScheduledJob scheduledJob) { + this.scheduledJob = scheduledJob; + setJobName(scheduledJob.getName()); + setScriptType(scheduledJob.getScriptType()); + setScriptData(scheduledJob.getScriptData()); + setTarget(scheduledJob.getTarget()); + setStartTime(ComponentUtil.getSystemHelper().getCurrentTimeAsLong()); + setJobStatus(Constants.RUNNING); + } + + public ScheduledJob getScheduledJob() { + return scheduledJob; + } + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/KeyMatch.java b/src/main/java/org/codelibs/fess/es/exentity/KeyMatch.java index f3c641fbf..96999c0be 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/KeyMatch.java +++ b/src/main/java/org/codelibs/fess/es/exentity/KeyMatch.java @@ -9,10 +9,12 @@ public class KeyMatch extends BsKeyMatch { private static final long serialVersionUID = 1L; + @Override public String getId() { return asDocMeta().id(); } + @Override public void setId(String id) { asDocMeta().id(id); } diff --git a/src/main/java/org/codelibs/fess/es/exentity/LabelToRole.java b/src/main/java/org/codelibs/fess/es/exentity/LabelToRole.java index 643312389..de2f54a35 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/LabelToRole.java +++ b/src/main/java/org/codelibs/fess/es/exentity/LabelToRole.java @@ -8,4 +8,22 @@ import org.codelibs.fess.es.bsentity.BsLabelToRole; public class LabelToRole extends BsLabelToRole { private static final long serialVersionUID = 1L; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/LabelType.java b/src/main/java/org/codelibs/fess/es/exentity/LabelType.java index 96c7b1499..c4371c4c9 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/LabelType.java +++ b/src/main/java/org/codelibs/fess/es/exentity/LabelType.java @@ -1,6 +1,14 @@ package org.codelibs.fess.es.exentity; +import java.util.ArrayList; +import java.util.List; + +import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.es.bsentity.BsLabelType; +import org.codelibs.fess.es.exbhv.LabelToRoleBhv; +import org.codelibs.fess.es.exbhv.RoleTypeBhv; +import org.codelibs.fess.util.ComponentUtil; +import org.dbflute.cbean.result.ListResultBean; /** * @author FreeGen @@ -8,4 +16,69 @@ import org.codelibs.fess.es.bsentity.BsLabelType; public class LabelType extends BsLabelType { private static final long serialVersionUID = 1L; + private String[] roleTypeIds; + + private List roleTypeList; + + public String[] getRoleTypeIds() { + if (roleTypeIds == null) { + return StringUtil.EMPTY_STRINGS; + } + return roleTypeIds; + } + + public void setRoleTypeIds(final String[] roleTypeIds) { + this.roleTypeIds = roleTypeIds; + } + + public List getRoleTypeList() { + if (roleTypeList == null) { + synchronized (this) { + if (roleTypeList == null) { + final LabelToRoleBhv labelToRoleBhv = ComponentUtil.getComponent(LabelToRoleBhv.class); + final ListResultBean mappingList = labelToRoleBhv.selectList(cb -> { + cb.query().setLabelTypeId_Equal(getId()); + cb.specify().columnRoleTypeId(); + }); + final List roleIdList = new ArrayList<>(); + for (final LabelToRole mapping : mappingList) { + roleIdList.add(mapping.getRoleTypeId()); + } + final RoleTypeBhv roleTypeBhv = ComponentUtil.getComponent(RoleTypeBhv.class); + roleTypeList = roleTypeBhv.selectList(cb -> { + cb.query().setId_InScope(roleIdList); + cb.query().addOrderBy_SortOrder_Asc(); + }); + } + } + } + return roleTypeList; + } + + public List getRoleValueList() { + final List list = getRoleTypeList(); + final List roleValueList = new ArrayList<>(list.size()); + for (final RoleType roleType : list) { + roleValueList.add(roleType.getValue()); + } + return roleValueList; + } + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/OverlappingHost.java b/src/main/java/org/codelibs/fess/es/exentity/OverlappingHost.java index 46ca9d88f..fa1074a88 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/OverlappingHost.java +++ b/src/main/java/org/codelibs/fess/es/exentity/OverlappingHost.java @@ -9,10 +9,12 @@ public class OverlappingHost extends BsOverlappingHost { private static final long serialVersionUID = 1L; + @Override public String getId() { return asDocMeta().id(); } + @Override public void setId(String id) { asDocMeta().id(id); } diff --git a/src/main/java/org/codelibs/fess/es/exentity/PathMapping.java b/src/main/java/org/codelibs/fess/es/exentity/PathMapping.java index e0a69953a..e16a848e5 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/PathMapping.java +++ b/src/main/java/org/codelibs/fess/es/exentity/PathMapping.java @@ -14,10 +14,12 @@ public class PathMapping extends BsPathMapping { private Pattern regexPattern; + @Override public String getId() { return asDocMeta().id(); } + @Override public void setId(String id) { asDocMeta().id(id); } diff --git a/src/main/java/org/codelibs/fess/es/exentity/RequestHeader.java b/src/main/java/org/codelibs/fess/es/exentity/RequestHeader.java index df34ec530..00c33bd5b 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/RequestHeader.java +++ b/src/main/java/org/codelibs/fess/es/exentity/RequestHeader.java @@ -9,10 +9,12 @@ public class RequestHeader extends BsRequestHeader { private static final long serialVersionUID = 1L; + @Override public String getId() { return asDocMeta().id(); } + @Override public void setId(String id) { asDocMeta().id(id); } @@ -24,4 +26,8 @@ public class RequestHeader extends BsRequestHeader { public void setVersionNo(Long version) { asDocMeta().version(version); } + + public org.codelibs.robot.client.http.RequestHeader getS2RobotRequestHeader() { + return new org.codelibs.robot.client.http.RequestHeader(getName(), getValue()); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/RoleType.java b/src/main/java/org/codelibs/fess/es/exentity/RoleType.java index 1f7b4ec74..02a4e3033 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/RoleType.java +++ b/src/main/java/org/codelibs/fess/es/exentity/RoleType.java @@ -8,4 +8,22 @@ import org.codelibs.fess.es.bsentity.BsRoleType; public class RoleType extends BsRoleType { private static final long serialVersionUID = 1L; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/ScheduledJob.java b/src/main/java/org/codelibs/fess/es/exentity/ScheduledJob.java index 55cc22e0d..72caa9290 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/ScheduledJob.java +++ b/src/main/java/org/codelibs/fess/es/exentity/ScheduledJob.java @@ -1,6 +1,9 @@ package org.codelibs.fess.es.exentity; +import org.codelibs.fess.Constants; import org.codelibs.fess.es.bsentity.BsScheduledJob; +import org.codelibs.fess.job.TriggeredJob; +import org.codelibs.fess.util.ComponentUtil; /** * @author FreeGen @@ -8,4 +11,43 @@ import org.codelibs.fess.es.bsentity.BsScheduledJob; public class ScheduledJob extends BsScheduledJob { private static final long serialVersionUID = 1L; + + public boolean isLoggingEnabled() { + return Constants.T.equals(getJobLogging()); + } + + public boolean isCrawlerJob() { + return Constants.T.equals(getCrawler()); + } + + public boolean isEnabled() { + return Constants.T.equals(getAvailable()); + } + + public boolean isRunning() { + return ComponentUtil.getJobHelper().getJobExecutoer(getId()) != null; + } + + public void start() { + final ScheduledJob scheduledJob = this; + new Thread(() -> new TriggeredJob().execute(scheduledJob)).start(); + } + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/SearchFieldLog.java b/src/main/java/org/codelibs/fess/es/exentity/SearchFieldLog.java index 6c4586ab0..822d42604 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/SearchFieldLog.java +++ b/src/main/java/org/codelibs/fess/es/exentity/SearchFieldLog.java @@ -8,4 +8,22 @@ import org.codelibs.fess.es.bsentity.BsSearchFieldLog; public class SearchFieldLog extends BsSearchFieldLog { private static final long serialVersionUID = 1L; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/SearchLog.java b/src/main/java/org/codelibs/fess/es/exentity/SearchLog.java index e3f16726f..dd643fa93 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/SearchLog.java +++ b/src/main/java/org/codelibs/fess/es/exentity/SearchLog.java @@ -1,6 +1,17 @@ package org.codelibs.fess.es.exentity; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.List; + +import org.codelibs.core.lang.StringUtil; +import org.codelibs.fess.Constants; import org.codelibs.fess.es.bsentity.BsSearchLog; +import org.codelibs.fess.es.exbhv.ClickLogBhv; +import org.codelibs.fess.es.exbhv.SearchFieldLogBhv; +import org.codelibs.fess.es.exbhv.UserInfoBhv; +import org.codelibs.fess.util.ComponentUtil; +import org.dbflute.optional.OptionalEntity; /** * @author FreeGen @@ -8,4 +19,96 @@ import org.codelibs.fess.es.bsentity.BsSearchLog; public class SearchLog extends BsSearchLog { private static final long serialVersionUID = 1L; + + private List clickLogList; + + private List searchFieldLogList; + + private OptionalEntity userInfo; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } + + public void setClickLogList(List clickLogList) { + this.clickLogList = clickLogList; + + } + + public String getRequestedTimeForList() { + final SimpleDateFormat sdf = new SimpleDateFormat(Constants.DEFAULT_DATETIME_FORMAT); + if (getRequestedTime() != null) { + return sdf.format(getRequestedTime()); + } + return null; + } + + public void addSearchFieldLogValue(final String name, final String value) { + if (StringUtil.isNotBlank(name) && StringUtil.isNotBlank(value)) { + final SearchFieldLog fieldLog = new SearchFieldLog(); + fieldLog.setName(name); + fieldLog.setValue(value); + if (searchFieldLogList == null) { + searchFieldLogList = new ArrayList<>(); + } + searchFieldLogList.add(fieldLog); + } + } + + public void setSearchQuery(final String query) { + addSearchFieldLogValue(Constants.SEARCH_FIELD_LOG_SEARCH_QUERY, query); + } + + public void setSolrQuery(final String solrQuery) { + addSearchFieldLogValue(Constants.SEARCH_FIELD_LOG_SOLR_QUERY, solrQuery); + } + + public OptionalEntity getUserInfo() { + if (userInfo == null) { + final UserInfoBhv userInfoBhv = ComponentUtil.getComponent(UserInfoBhv.class); + userInfo = userInfoBhv.selectEntity(cb -> { + cb.query().docMeta().setId_Equal(getUserInfoId()); + }); + } + return userInfo; + } + + public void setUserInfo(OptionalEntity userInfo) { + this.userInfo = userInfo; + } + + public List getClickLogList() { + if (clickLogList == null) { + final ClickLogBhv clickLogBhv = ComponentUtil.getComponent(ClickLogBhv.class); + clickLogList = clickLogBhv.selectList(cb -> { + cb.query().setSearchLogId_Equal(getId()); + }); + } + return clickLogList; + } + + public List getSearchFieldLogList() { + if (searchFieldLogList == null) { + final SearchFieldLogBhv searchFieldLogBhv = ComponentUtil.getComponent(SearchFieldLogBhv.class); + searchFieldLogList = searchFieldLogBhv.selectList(cb -> { + cb.query().setSearchLogId_Equal(getId()); + }); + } + return searchFieldLogList; + } + } diff --git a/src/main/java/org/codelibs/fess/es/exentity/SuggestBadWord.java b/src/main/java/org/codelibs/fess/es/exentity/SuggestBadWord.java index f8afd7c9f..599cc8311 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/SuggestBadWord.java +++ b/src/main/java/org/codelibs/fess/es/exentity/SuggestBadWord.java @@ -8,4 +8,22 @@ import org.codelibs.fess.es.bsentity.BsSuggestBadWord; public class SuggestBadWord extends BsSuggestBadWord { private static final long serialVersionUID = 1L; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/SuggestElevateWord.java b/src/main/java/org/codelibs/fess/es/exentity/SuggestElevateWord.java index fd384fdf6..3cbd3d226 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/SuggestElevateWord.java +++ b/src/main/java/org/codelibs/fess/es/exentity/SuggestElevateWord.java @@ -8,4 +8,22 @@ import org.codelibs.fess.es.bsentity.BsSuggestElevateWord; public class SuggestElevateWord extends BsSuggestElevateWord { private static final long serialVersionUID = 1L; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/UserInfo.java b/src/main/java/org/codelibs/fess/es/exentity/UserInfo.java index dc99a6f7c..6fdae1e01 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/UserInfo.java +++ b/src/main/java/org/codelibs/fess/es/exentity/UserInfo.java @@ -8,4 +8,22 @@ import org.codelibs.fess.es.bsentity.BsUserInfo; public class UserInfo extends BsUserInfo { private static final long serialVersionUID = 1L; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/WebAuthentication.java b/src/main/java/org/codelibs/fess/es/exentity/WebAuthentication.java index f808ef463..be68dc6b0 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/WebAuthentication.java +++ b/src/main/java/org/codelibs/fess/es/exentity/WebAuthentication.java @@ -1,6 +1,25 @@ package org.codelibs.fess.es.exentity; +import java.util.Map; + +import org.apache.http.auth.AuthScheme; +import org.apache.http.auth.AuthScope; +import org.apache.http.auth.Credentials; +import org.apache.http.auth.NTCredentials; +import org.apache.http.auth.UsernamePasswordCredentials; +import org.apache.http.impl.auth.BasicScheme; +import org.apache.http.impl.auth.DigestScheme; +import org.apache.http.impl.auth.NTLMScheme; +import org.codelibs.core.lang.StringUtil; +import org.codelibs.fess.Constants; import org.codelibs.fess.es.bsentity.BsWebAuthentication; +import org.codelibs.fess.service.WebConfigService; +import org.codelibs.fess.util.ComponentUtil; +import org.codelibs.fess.util.ParameterUtil; +import org.codelibs.robot.RobotSystemException; +import org.codelibs.robot.client.http.Authentication; +import org.codelibs.robot.client.http.impl.AuthenticationImpl; +import org.codelibs.robot.client.http.ntlm.JcifsEngine; /** * @author FreeGen @@ -8,4 +27,87 @@ import org.codelibs.fess.es.bsentity.BsWebAuthentication; public class WebAuthentication extends BsWebAuthentication { private static final long serialVersionUID = 1L; + private WebConfig webConfig; + + public Authentication getAuthentication() { + return new AuthenticationImpl(getAuthScope(), getCredentials(), getAuthScheme()); + } + + private AuthScheme getAuthScheme() { + if (Constants.BASIC.equals(getProtocolScheme())) { + return new BasicScheme(); + } else if (Constants.DIGEST.equals(getProtocolScheme())) { + return new DigestScheme(); + } else if (Constants.NTLM.equals(getProtocolScheme())) { + return new NTLMScheme(new JcifsEngine()); + } + return null; + } + + private AuthScope getAuthScope() { + if (StringUtil.isBlank(getHostname())) { + return AuthScope.ANY; + } + + int p; + if (getPort() == null) { + p = AuthScope.ANY_PORT; + } else { + p = getPort().intValue(); + } + + String r = getAuthRealm(); + if (StringUtil.isBlank(r)) { + r = AuthScope.ANY_REALM; + } + + String s = getProtocolScheme(); + if (StringUtil.isBlank(s) || Constants.NTLM.equals(s)) { + s = AuthScope.ANY_SCHEME; + } + + return new AuthScope(getHostname(), p, r, s); + } + + private Credentials getCredentials() { + if (StringUtil.isEmpty(getUsername())) { + throw new RobotSystemException("username is empty."); + } + + if (Constants.NTLM.equals(getProtocolScheme())) { + final Map parameterMap = ParameterUtil.parse(getParameters()); + final String workstation = parameterMap.get("workstation"); + final String domain = parameterMap.get("domain"); + return new NTCredentials(getUsername(), getPassword(), workstation == null ? StringUtil.EMPTY : workstation, + domain == null ? StringUtil.EMPTY : domain); + } + + return new UsernamePasswordCredentials(getUsername(), getPassword() == null ? StringUtil.EMPTY : getPassword()); + } + + public WebConfig getWebConfig() { + if (webConfig == null) { + final WebConfigService webConfigService = ComponentUtil.getComponent(WebConfigService.class); + webConfig = webConfigService.getWebConfig(getWebConfigId()); + } + return webConfig; + } + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/WebConfig.java b/src/main/java/org/codelibs/fess/es/exentity/WebConfig.java index 110cd9f92..ec0014bc0 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/WebConfig.java +++ b/src/main/java/org/codelibs/fess/es/exentity/WebConfig.java @@ -1,11 +1,300 @@ package org.codelibs.fess.es.exentity; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Pattern; + +import org.codelibs.core.lang.StringUtil; +import org.codelibs.fess.Constants; import org.codelibs.fess.es.bsentity.BsWebConfig; +import org.codelibs.fess.es.exbhv.LabelTypeBhv; +import org.codelibs.fess.es.exbhv.RoleTypeBhv; +import org.codelibs.fess.es.exbhv.WebConfigToLabelBhv; +import org.codelibs.fess.es.exbhv.WebConfigToRoleBhv; +import org.codelibs.fess.service.RequestHeaderService; +import org.codelibs.fess.service.WebAuthenticationService; +import org.codelibs.fess.util.ComponentUtil; +import org.codelibs.fess.util.ParameterUtil; +import org.codelibs.robot.client.S2RobotClientFactory; +import org.codelibs.robot.client.http.Authentication; +import org.codelibs.robot.client.http.HcHttpClient; +import org.dbflute.cbean.result.ListResultBean; +import org.seasar.framework.container.SingletonS2Container; /** * @author FreeGen */ -public class WebConfig extends BsWebConfig { +public class WebConfig extends BsWebConfig implements CrawlingConfig { private static final long serialVersionUID = 1L; + + private String[] labelTypeIds; + + private String[] roleTypeIds; + + protected volatile Pattern[] includedDocUrlPatterns; + + protected volatile Pattern[] excludedDocUrlPatterns; + + protected volatile Map> configParameterMap; + + private List labelTypeList; + + private List roleTypeList; + + public WebConfig() { + super(); + setBoost(1.0f); + } + + /* (non-Javadoc) + * @see org.codelibs.fess.db.exentity.CrawlingConfig#getLabelTypeIds() + */ + public String[] getLabelTypeIds() { + if (labelTypeIds == null) { + return StringUtil.EMPTY_STRINGS; + } + return labelTypeIds; + } + + public void setLabelTypeIds(final String[] labelTypeIds) { + this.labelTypeIds = labelTypeIds; + } + + public List getLabelTypeList() { + if (labelTypeList == null) { + synchronized (this) { + if (labelTypeList == null) { + final WebConfigToLabelBhv webConfigToLabelBhv = ComponentUtil.getComponent(WebConfigToLabelBhv.class); + final ListResultBean mappingList = webConfigToLabelBhv.selectList(cb -> { + cb.query().setWebConfigId_Equal(getId()); + cb.specify().columnLabelTypeId(); + }); + final List labelIdList = new ArrayList<>(); + for (final WebConfigToLabel mapping : mappingList) { + labelIdList.add(mapping.getLabelTypeId()); + } + final LabelTypeBhv labelTypeBhv = ComponentUtil.getComponent(LabelTypeBhv.class); + labelTypeList = labelTypeBhv.selectList(cb -> { + cb.query().setId_InScope(labelIdList); + cb.query().addOrderBy_SortOrder_Asc(); + }); + } + } + } + return labelTypeList; + } + + @Override + public String[] getLabelTypeValues() { + final List list = getLabelTypeList(); + final List labelValueList = new ArrayList<>(list.size()); + for (final LabelType labelType : list) { + labelValueList.add(labelType.getValue()); + } + return labelValueList.toArray(new String[labelValueList.size()]); + } + + /* (non-Javadoc) + * @see org.codelibs.fess.db.exentity.CrawlingConfig#getRoleTypeIds() + */ + public String[] getRoleTypeIds() { + if (roleTypeIds == null) { + return StringUtil.EMPTY_STRINGS; + } + return roleTypeIds; + } + + public void setRoleTypeIds(final String[] roleTypeIds) { + this.roleTypeIds = roleTypeIds; + } + + public List getRoleTypeList() { + if (roleTypeList == null) { + synchronized (this) { + if (roleTypeList == null) { + final WebConfigToRoleBhv webConfigToRoleBhv = ComponentUtil.getComponent(WebConfigToRoleBhv.class); + final ListResultBean mappingList = webConfigToRoleBhv.selectList(cb -> { + cb.query().setWebConfigId_Equal(getId()); + cb.specify().columnRoleTypeId(); + }); + final List roleIdList = new ArrayList<>(); + for (final WebConfigToRole mapping : mappingList) { + roleIdList.add(mapping.getRoleTypeId()); + } + final RoleTypeBhv roleTypeBhv = ComponentUtil.getComponent(RoleTypeBhv.class); + roleTypeList = roleTypeBhv.selectList(cb -> { + cb.query().setId_InScope(roleIdList); + cb.query().addOrderBy_SortOrder_Asc(); + }); + } + } + } + return roleTypeList; + } + + @Override + public String[] getRoleTypeValues() { + final List list = getRoleTypeList(); + final List roleValueList = new ArrayList<>(list.size()); + for (final RoleType roleType : list) { + roleValueList.add(roleType.getValue()); + } + return roleValueList.toArray(new String[roleValueList.size()]); + } + + @Override + public String getDocumentBoost() { + return Float.valueOf(getBoost().floatValue()).toString(); + } + + @Override + public String getIndexingTarget(final String input) { + if (includedDocUrlPatterns == null || excludedDocUrlPatterns == null) { + initDocUrlPattern(); + } + + if (includedDocUrlPatterns.length == 0 && excludedDocUrlPatterns.length == 0) { + return Constants.TRUE; + } + + for (final Pattern pattern : includedDocUrlPatterns) { + if (pattern.matcher(input).matches()) { + return Constants.TRUE; + } + } + + for (final Pattern pattern : excludedDocUrlPatterns) { + if (pattern.matcher(input).matches()) { + return Constants.FALSE; + } + } + + return Constants.TRUE; + } + + protected synchronized void initDocUrlPattern() { + + if (includedDocUrlPatterns == null) { + if (StringUtil.isNotBlank(getIncludedDocUrls())) { + final List urlPatterList = new ArrayList(); + final String[] urls = getIncludedDocUrls().split("[\r\n]"); + for (final String u : urls) { + if (StringUtil.isNotBlank(u) && !u.trim().startsWith("#")) { + urlPatterList.add(Pattern.compile(u.trim())); + } + } + includedDocUrlPatterns = urlPatterList.toArray(new Pattern[urlPatterList.size()]); + } else { + includedDocUrlPatterns = new Pattern[0]; + } + } + + if (excludedDocUrlPatterns == null) { + if (StringUtil.isNotBlank(getExcludedDocUrls())) { + final List urlPatterList = new ArrayList(); + final String[] urls = getExcludedDocUrls().split("[\r\n]"); + for (final String u : urls) { + if (StringUtil.isNotBlank(u) && !u.trim().startsWith("#")) { + urlPatterList.add(Pattern.compile(u.trim())); + } + } + excludedDocUrlPatterns = urlPatterList.toArray(new Pattern[urlPatterList.size()]); + } else if (includedDocUrlPatterns.length > 0) { + excludedDocUrlPatterns = new Pattern[] { Pattern.compile(".*") }; + } else { + excludedDocUrlPatterns = new Pattern[0]; + } + } + } + + public String getBoostValue() { + if (boost != null) { + return boost.toString(); + } + return null; + } + + public void setBoostValue(final String value) { + if (value != null) { + try { + boost = Float.parseFloat(value); + } catch (final Exception e) {} + } + } + + @Override + public String getConfigId() { + return ConfigType.WEB.getConfigId(getId()); + } + + @Override + public void initializeClientFactory(final S2RobotClientFactory clientFactory) { + final WebAuthenticationService webAuthenticationService = SingletonS2Container.getComponent(WebAuthenticationService.class); + final RequestHeaderService requestHeaderService = SingletonS2Container.getComponent(RequestHeaderService.class); + + // HttpClient Parameters + final Map paramMap = new HashMap(); + clientFactory.setInitParameterMap(paramMap); + + final Map clientConfigMap = getConfigParameterMap(ConfigName.CLIENT); + if (clientConfigMap != null) { + paramMap.putAll(clientConfigMap); + } + + final String userAgent = getUserAgent(); + if (StringUtil.isNotBlank(userAgent)) { + paramMap.put(HcHttpClient.USER_AGENT_PROPERTY, userAgent); + } + + final List webAuthList = webAuthenticationService.getWebAuthenticationList(getId()); + final List basicAuthList = new ArrayList(); + for (final WebAuthentication webAuth : webAuthList) { + basicAuthList.add(webAuth.getAuthentication()); + } + paramMap.put(HcHttpClient.BASIC_AUTHENTICATIONS_PROPERTY, basicAuthList.toArray(new Authentication[basicAuthList.size()])); + + // request header + final List requestHeaderList = requestHeaderService.getRequestHeaderList(getId()); + final List rhList = new ArrayList(); + for (final RequestHeader requestHeader : requestHeaderList) { + rhList.add(requestHeader.getS2RobotRequestHeader()); + } + paramMap.put(HcHttpClient.REQUERT_HEADERS_PROPERTY, rhList.toArray(new org.codelibs.robot.client.http.RequestHeader[rhList.size()])); + + } + + @Override + public Map getConfigParameterMap(final ConfigName name) { + if (configParameterMap == null) { + configParameterMap = ParameterUtil.createConfigParameterMap(getConfigParameter()); + } + + final Map configMap = configParameterMap.get(name); + if (configMap == null) { + return Collections.emptyMap(); + } + return configMap; + } + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/WebConfigToLabel.java b/src/main/java/org/codelibs/fess/es/exentity/WebConfigToLabel.java index 1f220fbe1..2b3fade3a 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/WebConfigToLabel.java +++ b/src/main/java/org/codelibs/fess/es/exentity/WebConfigToLabel.java @@ -8,4 +8,22 @@ import org.codelibs.fess.es.bsentity.BsWebConfigToLabel; public class WebConfigToLabel extends BsWebConfigToLabel { private static final long serialVersionUID = 1L; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/es/exentity/WebConfigToRole.java b/src/main/java/org/codelibs/fess/es/exentity/WebConfigToRole.java index a39f3a292..c5ee3978d 100644 --- a/src/main/java/org/codelibs/fess/es/exentity/WebConfigToRole.java +++ b/src/main/java/org/codelibs/fess/es/exentity/WebConfigToRole.java @@ -8,4 +8,22 @@ import org.codelibs.fess.es.bsentity.BsWebConfigToRole; public class WebConfigToRole extends BsWebConfigToRole { private static final long serialVersionUID = 1L; + + @Override + public String getId() { + return asDocMeta().id(); + } + + @Override + public void setId(String id) { + asDocMeta().id(id); + } + + public Long getVersionNo() { + return asDocMeta().version(); + } + + public void setVersionNo(Long version) { + asDocMeta().version(version); + } } diff --git a/src/main/java/org/codelibs/fess/exec/Crawler.java b/src/main/java/org/codelibs/fess/exec/Crawler.java index eeb340dc0..70057cdaf 100644 --- a/src/main/java/org/codelibs/fess/exec/Crawler.java +++ b/src/main/java/org/codelibs/fess/exec/Crawler.java @@ -38,7 +38,6 @@ import org.codelibs.core.lang.StringUtil; import org.codelibs.core.misc.DynamicProperties; import org.codelibs.fess.Constants; import org.codelibs.fess.client.FessEsClient; -import org.codelibs.fess.db.allcommon.CDef; import org.codelibs.fess.helper.CrawlingSessionHelper; import org.codelibs.fess.helper.DataIndexHelper; import org.codelibs.fess.helper.DatabaseHelper; @@ -141,7 +140,7 @@ public class Crawler implements Serializable { // noghing } - protected List getWebConfigIdList() { + protected List getWebConfigIdList() { if (StringUtil.isNotBlank(webConfigIds)) { final String[] values = webConfigIds.split(","); return createConfigIdList(values); @@ -149,7 +148,7 @@ public class Crawler implements Serializable { return null; } - protected List getFileConfigIdList() { + protected List getFileConfigIdList() { if (StringUtil.isNotBlank(fileConfigIds)) { final String[] values = fileConfigIds.split(","); return createConfigIdList(values); @@ -157,7 +156,7 @@ public class Crawler implements Serializable { return null; } - protected List getDataConfigIdList() { + protected List getDataConfigIdList() { if (StringUtil.isNotBlank(dataConfigIds)) { final String[] values = dataConfigIds.split(","); return createConfigIdList(values); @@ -165,13 +164,10 @@ public class Crawler implements Serializable { return null; } - private static List createConfigIdList(final String[] values) { - final List idList = new ArrayList(); + private static List createConfigIdList(final String[] values) { + final List idList = new ArrayList<>(); for (final String value : values) { - final long id = Long.valueOf(value); - if (id > 0) { - idList.add(id); - } + idList.add(value); } return idList; } @@ -376,12 +372,12 @@ public class Crawler implements Serializable { } // delete expired sessions - crawlingSessionService - .deleteSessionIdsBefore(options.sessionId, options.name, ComponentUtil.getSystemHelper().getCurrentTime()); + crawlingSessionService.deleteSessionIdsBefore(options.sessionId, options.name, ComponentUtil.getSystemHelper() + .getCurrentTimeAsLong()); - final List webConfigIdList = options.getWebConfigIdList(); - final List fileConfigIdList = options.getFileConfigIdList(); - final List dataConfigIdList = options.getDataConfigIdList(); + final List webConfigIdList = options.getWebConfigIdList(); + final List fileConfigIdList = options.getFileConfigIdList(); + final List dataConfigIdList = options.getDataConfigIdList(); final boolean runAll = webConfigIdList == null && fileConfigIdList == null && dataConfigIdList == null; Thread webFsCrawlerThread = null; @@ -434,7 +430,7 @@ public class Crawler implements Serializable { return Constants.EXIT_FAIL; } finally { pathMappingHelper.removePathMappingList(options.sessionId); - crawlingSessionHelper.putToInfoMap(Constants.CRAWLER_STATUS, completed ? Constants.T : Constants.F); + crawlingSessionHelper.putToInfoMap(Constants.CRAWLER_STATUS, completed ? Constants.T.toString() : Constants.F.toString()); writeTimeToSessionInfo(crawlingSessionHelper, Constants.CRAWLER_END_TIME); crawlingSessionHelper.putToInfoMap(Constants.CRAWLER_EXEC_TIME, Long.toString(System.currentTimeMillis() - totalTime)); diff --git a/src/main/java/org/codelibs/fess/helper/CrawlingConfigHelper.java b/src/main/java/org/codelibs/fess/helper/CrawlingConfigHelper.java index f75b5bfdf..a2debb371 100644 --- a/src/main/java/org/codelibs/fess/helper/CrawlingConfigHelper.java +++ b/src/main/java/org/codelibs/fess/helper/CrawlingConfigHelper.java @@ -32,12 +32,12 @@ import javax.servlet.http.HttpServletResponse; import org.apache.commons.io.IOUtils; import org.codelibs.fess.Constants; import org.codelibs.fess.FessSystemException; -import org.codelibs.fess.db.exentity.CrawlingConfig; -import org.codelibs.fess.db.exentity.CrawlingConfig.ConfigType; +import org.codelibs.fess.es.exentity.CrawlingConfig; +import org.codelibs.fess.es.exentity.CrawlingConfig.ConfigType; import org.codelibs.fess.helper.UserAgentHelper.UserAgentType; -import org.codelibs.fess.service.DataCrawlingConfigService; -import org.codelibs.fess.service.FileCrawlingConfigService; -import org.codelibs.fess.service.WebCrawlingConfigService; +import org.codelibs.fess.service.DataConfigService; +import org.codelibs.fess.service.FileConfigService; +import org.codelibs.fess.service.WebConfigService; import org.codelibs.fess.util.ComponentUtil; import org.codelibs.robot.builder.RequestDataBuilder; import org.codelibs.robot.client.S2RobotClient; @@ -75,17 +75,11 @@ public class CrawlingConfigHelper implements Serializable { return null; } - protected Long getId(final String configId) { + protected String getId(final String configId) { if (configId == null || configId.length() < 2) { return null; } - try { - final String idStr = configId.substring(1); - return Long.parseLong(idStr); - } catch (final NumberFormatException e) { - // ignore - } - return null; + return configId.substring(1); } public CrawlingConfig getCrawlingConfig(final String configId) { @@ -93,20 +87,20 @@ public class CrawlingConfigHelper implements Serializable { if (configType == null) { return null; } - final Long id = getId(configId); + final String id = getId(configId); if (id == null) { return null; } switch (configType) { case WEB: - final WebCrawlingConfigService webCrawlingConfigService = SingletonS2Container.getComponent(WebCrawlingConfigService.class); - return webCrawlingConfigService.getWebCrawlingConfig(id); + final WebConfigService webConfigService = SingletonS2Container.getComponent(WebConfigService.class); + return webConfigService.getWebConfig(id); case FILE: - final FileCrawlingConfigService fileCrawlingConfigService = SingletonS2Container.getComponent(FileCrawlingConfigService.class); - return fileCrawlingConfigService.getFileCrawlingConfig(id); + final FileConfigService fileConfigService = SingletonS2Container.getComponent(FileConfigService.class); + return fileConfigService.getFileConfig(id); case DATA: - final DataCrawlingConfigService dataCrawlingConfigService = SingletonS2Container.getComponent(DataCrawlingConfigService.class); - return dataCrawlingConfigService.getDataCrawlingConfig(id); + final DataConfigService dataConfigService = SingletonS2Container.getComponent(DataConfigService.class); + return dataConfigService.getDataConfig(id); default: return null; } @@ -146,14 +140,14 @@ public class CrawlingConfigHelper implements Serializable { logger.debug("configType: " + configType + ", configId: " + configId); } if (ConfigType.WEB == configType) { - final WebCrawlingConfigService webCrawlingConfigService = SingletonS2Container.getComponent(WebCrawlingConfigService.class); - config = webCrawlingConfigService.getWebCrawlingConfig(getId(configId)); + final WebConfigService webConfigService = SingletonS2Container.getComponent(WebConfigService.class); + config = webConfigService.getWebConfig(getId(configId)); } else if (ConfigType.FILE == configType) { - final FileCrawlingConfigService fileCrawlingConfigService = SingletonS2Container.getComponent(FileCrawlingConfigService.class); - config = fileCrawlingConfigService.getFileCrawlingConfig(getId(configId)); + final FileConfigService fileConfigService = SingletonS2Container.getComponent(FileConfigService.class); + config = fileConfigService.getFileConfig(getId(configId)); } else if (ConfigType.DATA == configType) { - final DataCrawlingConfigService dataCrawlingConfigService = SingletonS2Container.getComponent(DataCrawlingConfigService.class); - config = dataCrawlingConfigService.getDataCrawlingConfig(getId(configId)); + final DataConfigService dataConfigService = SingletonS2Container.getComponent(DataConfigService.class); + config = dataConfigService.getDataConfig(getId(configId)); } if (config == null) { throw new FessSystemException("No crawlingConfig: " + configIdObj); diff --git a/src/main/java/org/codelibs/fess/helper/CrawlingSessionHelper.java b/src/main/java/org/codelibs/fess/helper/CrawlingSessionHelper.java index e2eff2eb9..e02613975 100644 --- a/src/main/java/org/codelibs/fess/helper/CrawlingSessionHelper.java +++ b/src/main/java/org/codelibs/fess/helper/CrawlingSessionHelper.java @@ -17,7 +17,6 @@ package org.codelibs.fess.helper; import java.io.Serializable; -import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -29,8 +28,8 @@ import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.Constants; import org.codelibs.fess.FessSystemException; import org.codelibs.fess.client.FessEsClient; -import org.codelibs.fess.db.exentity.CrawlingSession; -import org.codelibs.fess.db.exentity.CrawlingSessionInfo; +import org.codelibs.fess.es.exentity.CrawlingSession; +import org.codelibs.fess.es.exentity.CrawlingSessionInfo; import org.codelibs.fess.service.CrawlingSessionService; import org.codelibs.fess.util.ComponentUtil; import org.elasticsearch.index.query.QueryBuilders; @@ -52,7 +51,7 @@ public class CrawlingSessionHelper implements Serializable { protected Map infoMap; - protected LocalDateTime documentExpires; + protected Long documentExpires; private final int maxSessionIdsInList = 100; @@ -113,7 +112,7 @@ public class CrawlingSessionHelper implements Serializable { crawlingSession.setName(Constants.CRAWLING_SESSION_SYSTEM_NAME); } if (dayForCleanup >= 0) { - final LocalDateTime expires = getExpiredTime(dayForCleanup); + final long expires = getExpiredTime(dayForCleanup); crawlingSession.setExpiredTime(expires); documentExpires = expires; } @@ -125,13 +124,13 @@ public class CrawlingSessionHelper implements Serializable { } - public LocalDateTime getDocumentExpires() { + public Long getDocumentExpires() { return documentExpires; } - protected LocalDateTime getExpiredTime(final int days) { - final LocalDateTime now = ComponentUtil.getSystemHelper().getCurrentTime(); - return now.plusDays(days); + protected long getExpiredTime(final int days) { + final long now = ComponentUtil.getSystemHelper().getCurrentTimeAsLong(); + return now + days * Constants.ONE_DAY_IN_MILLIS; } public Map getInfoMap(final String sessionId) { diff --git a/src/main/java/org/codelibs/fess/helper/DataIndexHelper.java b/src/main/java/org/codelibs/fess/helper/DataIndexHelper.java index 6d5483449..7cf8acb20 100644 --- a/src/main/java/org/codelibs/fess/helper/DataIndexHelper.java +++ b/src/main/java/org/codelibs/fess/helper/DataIndexHelper.java @@ -28,11 +28,11 @@ import javax.annotation.Resource; import org.codelibs.core.lang.StringUtil; import org.codelibs.core.misc.DynamicProperties; import org.codelibs.fess.Constants; -import org.codelibs.fess.db.exentity.DataCrawlingConfig; import org.codelibs.fess.ds.DataStore; import org.codelibs.fess.ds.DataStoreFactory; import org.codelibs.fess.ds.IndexUpdateCallback; -import org.codelibs.fess.service.DataCrawlingConfigService; +import org.codelibs.fess.es.exentity.DataConfig; +import org.codelibs.fess.service.DataConfigService; import org.codelibs.fess.util.ComponentUtil; import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilders; @@ -52,7 +52,7 @@ public class DataIndexHelper implements Serializable { protected DynamicProperties crawlerProperties; @Resource - public DataCrawlingConfigService dataCrawlingConfigService; + public DataConfigService dataConfigService; @Resource protected CrawlingConfigHelper crawlingConfigHelper; @@ -64,7 +64,7 @@ public class DataIndexHelper implements Serializable { private final List dataCrawlingThreadList = Collections.synchronizedList(new ArrayList()); public void crawl(final String sessionId) { - final List configList = dataCrawlingConfigService.getAllDataCrawlingConfigList(); + final List configList = dataConfigService.getAllDataConfigList(); if (configList.isEmpty()) { // nothing @@ -77,8 +77,8 @@ public class DataIndexHelper implements Serializable { doCrawl(sessionId, configList); } - public void crawl(final String sessionId, final List configIdList) { - final List configList = dataCrawlingConfigService.getDataCrawlingConfigListByIds(configIdList); + public void crawl(final String sessionId, final List configIdList) { + final List configList = dataConfigService.getDataConfigListByIds(configIdList); if (configList.isEmpty()) { // nothing @@ -91,7 +91,7 @@ public class DataIndexHelper implements Serializable { doCrawl(sessionId, configList); } - protected void doCrawl(final String sessionId, final List configList) { + protected void doCrawl(final String sessionId, final List configList) { int multiprocessCrawlingCount = 5; final String value = crawlerProperties.getProperty(Constants.CRAWLING_THREAD_COUNT_PROPERTY, "5"); try { @@ -108,14 +108,14 @@ public class DataIndexHelper implements Serializable { final Map initParamMap = new HashMap(); dataCrawlingThreadList.clear(); final List dataCrawlingThreadStatusList = new ArrayList(); - for (final DataCrawlingConfig dataCrawlingConfig : configList) { - final String sid = crawlingConfigHelper.store(sessionId, dataCrawlingConfig); + for (final DataConfig dataConfig : configList) { + final String sid = crawlingConfigHelper.store(sessionId, dataConfig); sessionIdList.add(sid); initParamMap.put(Constants.SESSION_ID, sessionId); initParamMap.put(Constants.CRAWLING_SESSION_ID, sid); - final DataCrawlingThread dataCrawlingThread = new DataCrawlingThread(dataCrawlingConfig, indexUpdateCallback, initParamMap); + final DataCrawlingThread dataCrawlingThread = new DataCrawlingThread(dataConfig, indexUpdateCallback, initParamMap); dataCrawlingThread.setPriority(crawlerPriority); dataCrawlingThread.setName(sid); dataCrawlingThread.setDaemon(true); @@ -204,7 +204,7 @@ public class DataIndexHelper implements Serializable { protected static class DataCrawlingThread extends Thread { - private final DataCrawlingConfig dataCrawlingConfig; + private final DataConfig dataConfig; private final IndexUpdateCallback indexUpdateCallback; @@ -216,9 +216,9 @@ public class DataIndexHelper implements Serializable { private DataStore dataStore; - protected DataCrawlingThread(final DataCrawlingConfig dataCrawlingConfig, final IndexUpdateCallback indexUpdateCallback, + protected DataCrawlingThread(final DataConfig dataConfig, final IndexUpdateCallback indexUpdateCallback, final Map initParamMap) { - this.dataCrawlingConfig = dataCrawlingConfig; + this.dataConfig = dataConfig; this.indexUpdateCallback = indexUpdateCallback; this.initParamMap = initParamMap; } @@ -227,14 +227,14 @@ public class DataIndexHelper implements Serializable { public void run() { running = true; final DataStoreFactory dataStoreFactory = ComponentUtil.getDataStoreFactory(); - dataStore = dataStoreFactory.getDataStore(dataCrawlingConfig.getHandlerName()); + dataStore = dataStoreFactory.getDataStore(dataConfig.getHandlerName()); if (dataStore == null) { - logger.error("DataStore(" + dataCrawlingConfig.getHandlerName() + ") is not found."); + logger.error("DataStore(" + dataConfig.getHandlerName() + ") is not found."); } else { try { - dataStore.store(dataCrawlingConfig, indexUpdateCallback, initParamMap); + dataStore.store(dataConfig, indexUpdateCallback, initParamMap); } catch (final Exception e) { - logger.error("Failed to process a data crawling: " + dataCrawlingConfig.getName(), e); + logger.error("Failed to process a data crawling: " + dataConfig.getName(), e); } finally { indexUpdateCallback.commit(); deleteOldDocs(); @@ -250,17 +250,17 @@ public class DataIndexHelper implements Serializable { } final String sessionId = initParamMap.get(Constants.SESSION_ID); if (StringUtil.isBlank(sessionId)) { - logger.warn("Invalid sessionId at " + dataCrawlingConfig); + logger.warn("Invalid sessionId at " + dataConfig); return; } final FieldHelper fieldHelper = ComponentUtil.getFieldHelper(); final QueryBuilder queryBuilder = - QueryBuilders.boolQuery().must(QueryBuilders.termQuery(fieldHelper.configIdField, dataCrawlingConfig.getConfigId())) + QueryBuilders.boolQuery().must(QueryBuilders.termQuery(fieldHelper.configIdField, dataConfig.getConfigId())) .mustNot(QueryBuilders.termQuery(fieldHelper.segmentField, sessionId)); try { ComponentUtil.getElasticsearchClient().deleteByQuery(fieldHelper.docIndex, fieldHelper.docType, queryBuilder); } catch (final Exception e) { - logger.error("Could not delete old docs at " + dataCrawlingConfig, e); + logger.error("Could not delete old docs at " + dataConfig, e); } } diff --git a/src/main/java/org/codelibs/fess/helper/HotSearchWordHelper.java b/src/main/java/org/codelibs/fess/helper/HotSearchWordHelper.java index 69f70920d..adbcffbe8 100644 --- a/src/main/java/org/codelibs/fess/helper/HotSearchWordHelper.java +++ b/src/main/java/org/codelibs/fess/helper/HotSearchWordHelper.java @@ -16,7 +16,6 @@ package org.codelibs.fess.helper; -import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -25,9 +24,8 @@ import java.util.regex.Pattern; import javax.annotation.Resource; -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.db.exbhv.SearchLogBhv; -import org.codelibs.fess.db.exbhv.pmbean.HotSearchWordPmb; +import org.codelibs.fess.Constants; +import org.codelibs.fess.es.exbhv.SearchLogBhv; import org.codelibs.fess.util.ComponentUtil; import org.seasar.framework.container.annotation.tiger.InitMethod; @@ -44,42 +42,18 @@ public class HotSearchWordHelper { @InitMethod public void init() { - final LocalDateTime now = ComponentUtil.getSystemHelper().getCurrentTime(); - cacheMap.put(Range.ONE_DAY, getHotSearchWordListByFromDate(now.minusDays(1))); - cacheMap.put(Range.ONE_WEEK, getHotSearchWordListByFromDate(now.minusWeeks(1))); - cacheMap.put(Range.ONE_MONTH, getHotSearchWordListByFromDate(now.minusMonths(1))); - cacheMap.put(Range.ONE_YEAR, getHotSearchWordListByFromDate(now.minusYears(1))); + final long now = ComponentUtil.getSystemHelper().getCurrentTimeAsLong(); + cacheMap.put(Range.ONE_DAY, getHotSearchWordListByFromDate(now - Constants.ONE_DAY_IN_MILLIS)); + cacheMap.put(Range.ONE_WEEK, getHotSearchWordListByFromDate(now - Constants.ONE_DAY_IN_MILLIS * 7)); + cacheMap.put(Range.ONE_MONTH, getHotSearchWordListByFromDate(now - Constants.ONE_DAY_IN_MILLIS * 30)); + cacheMap.put(Range.ONE_YEAR, getHotSearchWordListByFromDate(now - Constants.ONE_DAY_IN_MILLIS * 365)); cacheMap.put(Range.ENTIRE, getHotSearchWordListByFromDate(null)); } - protected List getHotSearchWordListByFromDate(final LocalDateTime fromDate) { - final HotSearchWordPmb pmb = new HotSearchWordPmb(); - - if (fromDate != null) { - pmb.setFromRequestedTime(fromDate); - } - + protected List getHotSearchWordListByFromDate(final Long fromDate) { final List wordList = new ArrayList(); - searchLogBhv.outsideSql().selectCursor(pmb, rs -> { - while (rs.next()) { - final String word = rs.getString("name"); - if (StringUtil.isBlank(word)) { - continue; - } - if (excludedWordPattern != null) { - if (!excludedWordPattern.matcher(word).matches()) { - wordList.add(word); - } - } else { - wordList.add(word); - } - if (wordList.size() >= size) { - break; - } - } - return null; - }); + // TODO return wordList; } @@ -97,7 +71,7 @@ public class HotSearchWordHelper { private final long time; private Range(final long t) { - time = t * 24L * 60L * 60L * 1000L; + time = t * Constants.ONE_DAY_IN_MILLIS; } public long getTime() { diff --git a/src/main/java/org/codelibs/fess/helper/JobHelper.java b/src/main/java/org/codelibs/fess/helper/JobHelper.java index c0de0b4c4..daf0ead69 100644 --- a/src/main/java/org/codelibs/fess/helper/JobHelper.java +++ b/src/main/java/org/codelibs/fess/helper/JobHelper.java @@ -36,7 +36,7 @@ public class JobHelper { private final ConcurrentHashMap runningProcessMap = new ConcurrentHashMap<>(); - private final ConcurrentHashMap runningJobExecutorMap = new ConcurrentHashMap<>(); + private final ConcurrentHashMap runningJobExecutorMap = new ConcurrentHashMap<>(); @DestroyMethod public void destroy() { @@ -113,15 +113,15 @@ public class JobHelper { return runningProcessMap.keySet(); } - public JobExecutor startJobExecutoer(final Long id, final JobExecutor jobExecutor) { + public JobExecutor startJobExecutoer(final String id, final JobExecutor jobExecutor) { return runningJobExecutorMap.putIfAbsent(id, jobExecutor); } - public void finishJobExecutoer(final Long id) { + public void finishJobExecutoer(final String id) { runningJobExecutorMap.remove(id); } - public JobExecutor getJobExecutoer(final Long id) { + public JobExecutor getJobExecutoer(final String id) { return runningJobExecutorMap.get(id); } } diff --git a/src/main/java/org/codelibs/fess/helper/LabelTypeHelper.java b/src/main/java/org/codelibs/fess/helper/LabelTypeHelper.java index f64b1b653..d8eb57073 100644 --- a/src/main/java/org/codelibs/fess/helper/LabelTypeHelper.java +++ b/src/main/java/org/codelibs/fess/helper/LabelTypeHelper.java @@ -30,7 +30,7 @@ import javax.annotation.Resource; import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.Constants; -import org.codelibs.fess.db.exentity.LabelType; +import org.codelibs.fess.es.exentity.LabelType; import org.codelibs.fess.service.LabelTypeService; import org.seasar.framework.container.SingletonS2Container; import org.seasar.framework.container.annotation.tiger.InitMethod; diff --git a/src/main/java/org/codelibs/fess/helper/RobotLogHelper.java b/src/main/java/org/codelibs/fess/helper/RobotLogHelper.java index 093181534..4b453f116 100644 --- a/src/main/java/org/codelibs/fess/helper/RobotLogHelper.java +++ b/src/main/java/org/codelibs/fess/helper/RobotLogHelper.java @@ -16,7 +16,7 @@ package org.codelibs.fess.helper; -import org.codelibs.fess.db.exentity.CrawlingConfig; +import org.codelibs.fess.es.exentity.CrawlingConfig; import org.codelibs.fess.service.FailureUrlService; import org.codelibs.fess.util.ComponentUtil; import org.codelibs.robot.RobotMultipleCrawlAccessException; diff --git a/src/main/java/org/codelibs/fess/helper/SearchLogHelper.java b/src/main/java/org/codelibs/fess/helper/SearchLogHelper.java index 4638608ac..5e49f1bb1 100644 --- a/src/main/java/org/codelibs/fess/helper/SearchLogHelper.java +++ b/src/main/java/org/codelibs/fess/helper/SearchLogHelper.java @@ -23,15 +23,9 @@ import java.util.concurrent.ConcurrentLinkedQueue; import javax.annotation.Resource; import org.codelibs.core.misc.DynamicProperties; -import org.codelibs.fess.db.exbhv.ClickLogBhv; -import org.codelibs.fess.db.exbhv.FavoriteLogBhv; -import org.codelibs.fess.db.exbhv.pmbean.FavoriteUrlCountPmb; -import org.codelibs.fess.db.exentity.ClickLog; -import org.codelibs.fess.db.exentity.SearchLog; -import org.codelibs.fess.db.exentity.customize.FavoriteUrlCount; +import org.codelibs.fess.es.exentity.ClickLog; +import org.codelibs.fess.es.exentity.SearchLog; import org.codelibs.robot.util.LruHashMap; -import org.dbflute.cbean.result.ListResultBean; -import org.seasar.framework.container.SingletonS2Container; import org.seasar.framework.container.annotation.tiger.InitMethod; public abstract class SearchLogHelper { @@ -79,26 +73,21 @@ public abstract class SearchLogHelper { } public int getClickCount(final String url) { - final ClickLogBhv clickLogBhv = SingletonS2Container.getComponent(ClickLogBhv.class); - return clickLogBhv.selectCount(cb -> { - cb.query().setUrl_Equal(url); - }); + // TODO + return 0; } public long getFavoriteCount(final String url) { - final FavoriteLogBhv favoriteLogBhv = SingletonS2Container.getComponent(FavoriteLogBhv.class); - final FavoriteUrlCountPmb pmb = new FavoriteUrlCountPmb(); - pmb.setUrl(url); - final ListResultBean list = favoriteLogBhv.outsideSql().selectList(pmb); - - long count = 0; - if (!list.isEmpty()) { - count = list.get(0).getCnt().longValue(); - } - return count; + // TODO + return 0; } protected abstract void processSearchLogQueue(Queue queue); protected abstract void processClickLogQueue(Queue queue); + + public boolean addfavoriteLog(String userCode, String favoriteUrl) { + // TODO Auto-generated method stub + return false; + } } diff --git a/src/main/java/org/codelibs/fess/helper/SuggestHelper.java b/src/main/java/org/codelibs/fess/helper/SuggestHelper.java index 0e2adbaaf..476094a3a 100644 --- a/src/main/java/org/codelibs/fess/helper/SuggestHelper.java +++ b/src/main/java/org/codelibs/fess/helper/SuggestHelper.java @@ -25,9 +25,9 @@ import java.util.Set; import javax.annotation.Resource; import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.db.exbhv.SuggestBadWordBhv; -import org.codelibs.fess.db.exbhv.SuggestElevateWordBhv; -import org.codelibs.fess.db.exentity.SuggestBadWord; +import org.codelibs.fess.es.exbhv.SuggestBadWordBhv; +import org.codelibs.fess.es.exbhv.SuggestElevateWordBhv; +import org.codelibs.fess.es.exentity.SuggestBadWord; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -129,7 +129,7 @@ public class SuggestHelper { public void deleteAllBadWord() { final List list = suggestBadWordBhv.selectList(cb -> { - cb.query().setDeletedBy_IsNull(); + cb.query().matchAll(); }); final Set badWords = new HashSet(); for (final SuggestBadWord suggestBadWord : list) { @@ -144,7 +144,7 @@ public class SuggestHelper { public void updateSolrBadwordFile() { suggestBadWordBhv.selectList(cb -> { - cb.query().setDeletedBy_IsNull(); + cb.query().matchAll(); }); final File dir = new File(System.getProperty("catalina.home").replace("Â¥", "/") + "/" + badwordFileDir); diff --git a/src/main/java/org/codelibs/fess/helper/SystemHelper.java b/src/main/java/org/codelibs/fess/helper/SystemHelper.java index c2bbee73f..a5ac6f9ce 100644 --- a/src/main/java/org/codelibs/fess/helper/SystemHelper.java +++ b/src/main/java/org/codelibs/fess/helper/SystemHelper.java @@ -37,7 +37,7 @@ import org.apache.commons.lang.LocaleUtils; import org.apache.commons.lang.StringUtils; import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.Constants; -import org.codelibs.fess.db.exentity.RoleType; +import org.codelibs.fess.es.exentity.RoleType; import org.codelibs.fess.service.RoleTypeService; import org.codelibs.robot.util.CharUtil; import org.seasar.framework.container.SingletonS2Container; diff --git a/src/main/java/org/codelibs/fess/helper/WebFsIndexHelper.java b/src/main/java/org/codelibs/fess/helper/WebFsIndexHelper.java index f894170dc..8f0ebd8bc 100644 --- a/src/main/java/org/codelibs/fess/helper/WebFsIndexHelper.java +++ b/src/main/java/org/codelibs/fess/helper/WebFsIndexHelper.java @@ -26,15 +26,15 @@ import javax.annotation.Resource; import org.codelibs.core.lang.StringUtil; import org.codelibs.core.misc.DynamicProperties; import org.codelibs.fess.Constants; -import org.codelibs.fess.db.exentity.FileCrawlingConfig; -import org.codelibs.fess.db.exentity.WebCrawlingConfig; import org.codelibs.fess.es.exentity.BoostDocumentRule; +import org.codelibs.fess.es.exentity.FileConfig; +import org.codelibs.fess.es.exentity.WebConfig; import org.codelibs.fess.interval.FessIntervalController; import org.codelibs.fess.service.BoostDocumentRuleService; import org.codelibs.fess.service.FailureUrlService; import org.codelibs.fess.service.FileAuthenticationService; -import org.codelibs.fess.service.FileCrawlingConfigService; -import org.codelibs.fess.service.WebCrawlingConfigService; +import org.codelibs.fess.service.FileConfigService; +import org.codelibs.fess.service.WebConfigService; import org.codelibs.fess.solr.IndexUpdater; import org.codelibs.fess.util.ComponentUtil; import org.codelibs.robot.S2Robot; @@ -56,10 +56,10 @@ public class WebFsIndexHelper implements Serializable { protected DynamicProperties crawlerProperties; @Resource - public WebCrawlingConfigService webCrawlingConfigService; + public WebConfigService webConfigService; @Resource - protected FileCrawlingConfigService fileCrawlingConfigService; + protected FileConfigService fileConfigService; @Resource protected FileAuthenticationService fileAuthenticationService; @@ -86,8 +86,8 @@ public class WebFsIndexHelper implements Serializable { // needed? @Deprecated public void crawl(final String sessionId) { - final List webConfigList = webCrawlingConfigService.getAllWebCrawlingConfigList(); - final List fileConfigList = fileCrawlingConfigService.getAllFileCrawlingConfigList(); + final List webConfigList = webConfigService.getAllWebConfigList(); + final List fileConfigList = fileConfigService.getAllFileConfigList(); if (webConfigList.isEmpty() && fileConfigList.isEmpty()) { // nothing @@ -100,17 +100,17 @@ public class WebFsIndexHelper implements Serializable { doCrawl(sessionId, webConfigList, fileConfigList); } - public void crawl(final String sessionId, final List webConfigIdList, final List fileConfigIdList) { + public void crawl(final String sessionId, final List webConfigIdList, final List fileConfigIdList) { final boolean runAll = webConfigIdList == null && fileConfigIdList == null; - final List webConfigList; + final List webConfigList; if (runAll || webConfigIdList != null) { - webConfigList = webCrawlingConfigService.getWebCrawlingConfigListByIds(webConfigIdList); + webConfigList = webConfigService.getWebConfigListByIds(webConfigIdList); } else { webConfigList = Collections.emptyList(); } - final List fileConfigList; + final List fileConfigList; if (runAll || fileConfigIdList != null) { - fileConfigList = fileCrawlingConfigService.getFileCrawlingConfigListByIds(fileConfigIdList); + fileConfigList = fileConfigService.getFileConfigListByIds(fileConfigIdList); } else { fileConfigList = Collections.emptyList(); } @@ -126,8 +126,7 @@ public class WebFsIndexHelper implements Serializable { doCrawl(sessionId, webConfigList, fileConfigList); } - protected void doCrawl(final String sessionId, final List webConfigList, - final List fileConfigList) { + protected void doCrawl(final String sessionId, final List webConfigList, final List fileConfigList) { int multiprocessCrawlingCount = 5; final String value = crawlerProperties.getProperty(Constants.CRAWLING_THREAD_COUNT_PROPERTY, "5"); try { @@ -144,15 +143,15 @@ public class WebFsIndexHelper implements Serializable { s2RobotList.clear(); final List s2RobotStatusList = new ArrayList(); // Web - for (final WebCrawlingConfig webCrawlingConfig : webConfigList) { - final String sid = crawlingConfigHelper.store(sessionId, webCrawlingConfig); + for (final WebConfig webConfig : webConfigList) { + final String sid = crawlingConfigHelper.store(sessionId, webConfig); // create s2robot final S2Robot s2Robot = SingletonS2Container.getComponent(S2Robot.class); s2Robot.setSessionId(sid); sessionIdList.add(sid); - final String urlsStr = webCrawlingConfig.getUrls(); + final String urlsStr = webConfig.getUrls(); if (StringUtil.isBlank(urlsStr)) { logger.warn("No target urls. Skipped"); break; @@ -160,31 +159,27 @@ public class WebFsIndexHelper implements Serializable { // interval time final int intervalTime = - webCrawlingConfig.getIntervalTime() != null ? webCrawlingConfig.getIntervalTime() - : Constants.DEFAULT_INTERVAL_TIME_FOR_WEB; + webConfig.getIntervalTime() != null ? webConfig.getIntervalTime() : Constants.DEFAULT_INTERVAL_TIME_FOR_WEB; ((FessIntervalController) s2Robot.getIntervalController()).setDelayMillisForWaitingNewUrl(intervalTime); - final String includedUrlsStr = - webCrawlingConfig.getIncludedUrls() != null ? webCrawlingConfig.getIncludedUrls() : StringUtil.EMPTY; - final String excludedUrlsStr = - webCrawlingConfig.getExcludedUrls() != null ? webCrawlingConfig.getExcludedUrls() : StringUtil.EMPTY; + final String includedUrlsStr = webConfig.getIncludedUrls() != null ? webConfig.getIncludedUrls() : StringUtil.EMPTY; + final String excludedUrlsStr = webConfig.getExcludedUrls() != null ? webConfig.getExcludedUrls() : StringUtil.EMPTY; // num of threads final S2RobotContext robotContext = s2Robot.getRobotContext(); final int numOfThread = - webCrawlingConfig.getNumOfThread() != null ? webCrawlingConfig.getNumOfThread() - : Constants.DEFAULT_NUM_OF_THREAD_FOR_WEB; + webConfig.getNumOfThread() != null ? webConfig.getNumOfThread() : Constants.DEFAULT_NUM_OF_THREAD_FOR_WEB; robotContext.setNumOfThread(numOfThread); // depth - final int depth = webCrawlingConfig.getDepth() != null ? webCrawlingConfig.getDepth() : -1; + final int depth = webConfig.getDepth() != null ? webConfig.getDepth() : -1; robotContext.setMaxDepth(depth); // max count - final long maxCount = webCrawlingConfig.getMaxAccessCount() != null ? webCrawlingConfig.getMaxAccessCount() : maxAccessCount; + final long maxCount = webConfig.getMaxAccessCount() != null ? webConfig.getMaxAccessCount() : maxAccessCount; robotContext.setMaxAccessCount(maxCount); - webCrawlingConfig.initializeClientFactory(s2Robot.getClientFactory()); + webConfig.initializeClientFactory(s2Robot.getClientFactory()); // set urls final String[] urls = urlsStr.split("[\r\n]"); @@ -229,7 +224,7 @@ public class WebFsIndexHelper implements Serializable { } // failure url - final List excludedUrlList = failureUrlService.getExcludedUrlList(webCrawlingConfig.getConfigId()); + final List excludedUrlList = failureUrlService.getExcludedUrlList(webConfig.getConfigId()); if (excludedUrlList != null) { for (final String u : excludedUrlList) { if (StringUtil.isNotBlank(u)) { @@ -254,46 +249,42 @@ public class WebFsIndexHelper implements Serializable { } // File - for (final FileCrawlingConfig fileCrawlingConfig : fileConfigList) { - final String sid = crawlingConfigHelper.store(sessionId, fileCrawlingConfig); + for (final FileConfig fileConfig : fileConfigList) { + final String sid = crawlingConfigHelper.store(sessionId, fileConfig); // create s2robot final S2Robot s2Robot = SingletonS2Container.getComponent(S2Robot.class); s2Robot.setSessionId(sid); sessionIdList.add(sid); - final String pathsStr = fileCrawlingConfig.getPaths(); + final String pathsStr = fileConfig.getPaths(); if (StringUtil.isBlank(pathsStr)) { logger.warn("No target uris. Skipped"); break; } final int intervalTime = - fileCrawlingConfig.getIntervalTime() != null ? fileCrawlingConfig.getIntervalTime() - : Constants.DEFAULT_INTERVAL_TIME_FOR_FS; + fileConfig.getIntervalTime() != null ? fileConfig.getIntervalTime() : Constants.DEFAULT_INTERVAL_TIME_FOR_FS; ((FessIntervalController) s2Robot.getIntervalController()).setDelayMillisForWaitingNewUrl(intervalTime); - final String includedPathsStr = - fileCrawlingConfig.getIncludedPaths() != null ? fileCrawlingConfig.getIncludedPaths() : StringUtil.EMPTY; - final String excludedPathsStr = - fileCrawlingConfig.getExcludedPaths() != null ? fileCrawlingConfig.getExcludedPaths() : StringUtil.EMPTY; + final String includedPathsStr = fileConfig.getIncludedPaths() != null ? fileConfig.getIncludedPaths() : StringUtil.EMPTY; + final String excludedPathsStr = fileConfig.getExcludedPaths() != null ? fileConfig.getExcludedPaths() : StringUtil.EMPTY; // num of threads final S2RobotContext robotContext = s2Robot.getRobotContext(); final int numOfThread = - fileCrawlingConfig.getNumOfThread() != null ? fileCrawlingConfig.getNumOfThread() - : Constants.DEFAULT_NUM_OF_THREAD_FOR_FS; + fileConfig.getNumOfThread() != null ? fileConfig.getNumOfThread() : Constants.DEFAULT_NUM_OF_THREAD_FOR_FS; robotContext.setNumOfThread(numOfThread); // depth - final int depth = fileCrawlingConfig.getDepth() != null ? fileCrawlingConfig.getDepth() : -1; + final int depth = fileConfig.getDepth() != null ? fileConfig.getDepth() : -1; robotContext.setMaxDepth(depth); // max count - final long maxCount = fileCrawlingConfig.getMaxAccessCount() != null ? fileCrawlingConfig.getMaxAccessCount() : maxAccessCount; + final long maxCount = fileConfig.getMaxAccessCount() != null ? fileConfig.getMaxAccessCount() : maxAccessCount; robotContext.setMaxAccessCount(maxCount); - fileCrawlingConfig.initializeClientFactory(s2Robot.getClientFactory()); + fileConfig.initializeClientFactory(s2Robot.getClientFactory()); // set paths final String[] paths = pathsStr.split("[\r\n]"); @@ -365,7 +356,7 @@ public class WebFsIndexHelper implements Serializable { } // failure url - final List excludedUrlList = failureUrlService.getExcludedUrlList(fileCrawlingConfig.getConfigId()); + final List excludedUrlList = failureUrlService.getExcludedUrlList(fileConfig.getConfigId()); if (excludedUrlList != null) { for (final String u : excludedUrlList) { if (StringUtil.isNotBlank(u)) { diff --git a/src/main/java/org/codelibs/fess/helper/impl/SearchLogHelperImpl.java b/src/main/java/org/codelibs/fess/helper/impl/SearchLogHelperImpl.java index a5aed6c74..267e3d357 100644 --- a/src/main/java/org/codelibs/fess/helper/impl/SearchLogHelperImpl.java +++ b/src/main/java/org/codelibs/fess/helper/impl/SearchLogHelperImpl.java @@ -16,7 +16,6 @@ package org.codelibs.fess.helper.impl; -import java.time.LocalDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -27,16 +26,14 @@ import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.Constants; import org.codelibs.fess.beans.FessBeans; import org.codelibs.fess.client.FessEsClient; -import org.codelibs.fess.db.exbhv.ClickLogBhv; -import org.codelibs.fess.db.exbhv.SearchLogBhv; -import org.codelibs.fess.db.exbhv.UserInfoBhv; -import org.codelibs.fess.db.exentity.ClickLog; -import org.codelibs.fess.db.exentity.SearchLog; -import org.codelibs.fess.db.exentity.UserInfo; +import org.codelibs.fess.es.exbhv.ClickLogBhv; +import org.codelibs.fess.es.exbhv.SearchLogBhv; +import org.codelibs.fess.es.exbhv.UserInfoBhv; +import org.codelibs.fess.es.exentity.ClickLog; +import org.codelibs.fess.es.exentity.SearchLog; +import org.codelibs.fess.es.exentity.UserInfo; import org.codelibs.fess.helper.FieldHelper; import org.codelibs.fess.helper.SearchLogHelper; -import org.codelibs.fess.service.SearchLogService; -import org.codelibs.fess.service.UserInfoService; import org.codelibs.fess.util.ComponentUtil; import org.seasar.framework.container.SingletonS2Container; import org.slf4j.Logger; @@ -51,16 +48,27 @@ public class SearchLogHelperImpl extends SearchLogHelper { final long current = System.currentTimeMillis(); final Long time = userInfoCache.get(userCode); if (time == null || current - time.longValue() > userCheckInterval) { - final UserInfoService userInfoService = SingletonS2Container.getComponent(UserInfoService.class); - UserInfo userInfo = userInfoService.getUserInfo(userCode); - if (userInfo == null) { - final LocalDateTime now = ComponentUtil.getSystemHelper().getCurrentTime(); + + final UserInfoBhv userInfoBhv = ComponentUtil.getComponent(UserInfoBhv.class); + + final List list = userInfoBhv.selectList(cb -> { + cb.query().setCode_Equal(userCode); + cb.query().addOrderBy_UpdatedTime_Desc(); + }); + + final UserInfo userInfo; + final long now = ComponentUtil.getSystemHelper().getCurrentTimeAsLong(); + if (list.isEmpty()) { userInfo = new UserInfo(); userInfo.setCode(userCode); userInfo.setCreatedTime(now); - userInfo.setUpdatedTime(now); - userInfoService.store(userInfo); + } else { + userInfo = list.get(0); } + userInfo.setUpdatedTime(now); + new Thread(() -> { + userInfoBhv.insertOrUpdate(userInfo); + }).start(); userInfoCache.put(userCode, current); } } @@ -139,14 +147,15 @@ public class SearchLogHelperImpl extends SearchLogHelper { final UserInfo userInfo = searchLog.getUserInfo().orElse(null);//TODO if (userInfo != null) { final UserInfo entity = userInfoMap.get(userInfo.getCode()); - searchLog.setUserId(entity.getId()); + searchLog.setUserInfoId(entity.getId()); } } } if (!searchLogList.isEmpty()) { - final SearchLogService searchLogService = SingletonS2Container.getComponent(SearchLogService.class); - searchLogService.store(searchLogList); + final SearchLogBhv searchLogBhv = ComponentUtil.getComponent(SearchLogBhv.class); + searchLogBhv.batchUpdate(searchLogList); + // TODO SearchLogValue } } @@ -162,7 +171,7 @@ public class SearchLogHelperImpl extends SearchLogHelper { cb.query().setUserSessionId_Equal(clickLog.getUserSessionId()); }).orElse(null);//TODO if (entity != null) { - clickLog.setSearchId(entity.getId()); + clickLog.setSearchLogId(entity.getId()); clickLogList.add(clickLog); } else { logger.warn("Not Found[ClickLog]: " + clickLog); diff --git a/src/main/java/org/codelibs/fess/job/JobScheduler.java b/src/main/java/org/codelibs/fess/job/JobScheduler.java index 216a17216..8a980097a 100644 --- a/src/main/java/org/codelibs/fess/job/JobScheduler.java +++ b/src/main/java/org/codelibs/fess/job/JobScheduler.java @@ -26,8 +26,8 @@ import java.util.List; import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.Constants; -import org.codelibs.fess.db.exbhv.ScheduledJobBhv; -import org.codelibs.fess.db.exentity.ScheduledJob; +import org.codelibs.fess.es.exbhv.ScheduledJobBhv; +import org.codelibs.fess.es.exentity.ScheduledJob; import org.codelibs.fess.helper.JobHelper; import org.codelibs.fess.util.ComponentUtil; import org.quartz.Job; @@ -66,7 +66,6 @@ public class JobScheduler { ComponentUtil.getComponent(ScheduledJobBhv.class).selectCursor(cb -> { cb.query().setAvailable_Equal(Constants.T); - cb.query().setDeletedBy_IsNull(); cb.query().addOrderBy_SortOrder_Asc(); cb.query().addOrderBy_Name_Asc(); }, scheduledJob -> register(scheduledJob)); @@ -112,7 +111,7 @@ public class JobScheduler { scriptType = "groovy"; } - final Long id = scheduledJob.getId(); + final String id = scheduledJob.getId(); final String jobId = Constants.JOB_ID_PREFIX + id; final String triggerId = TRIGGER_ID_PREFIX + id; diff --git a/src/main/java/org/codelibs/fess/job/PurgeLogJob.java b/src/main/java/org/codelibs/fess/job/PurgeLogJob.java deleted file mode 100644 index 58e1e3db0..000000000 --- a/src/main/java/org/codelibs/fess/job/PurgeLogJob.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.job; - -import org.codelibs.core.misc.DynamicProperties; -import org.codelibs.fess.Constants; -import org.codelibs.fess.service.CrawlingSessionService; -import org.codelibs.fess.service.JobLogService; -import org.codelibs.fess.service.SearchLogService; -import org.codelibs.fess.service.UserInfoService; -import org.codelibs.fess.util.ComponentUtil; -import org.seasar.framework.container.SingletonS2Container; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class PurgeLogJob { - - private static final Logger logger = LoggerFactory.getLogger(PurgeLogJob.class); - - public String execute() { - final CrawlingSessionService crawlingSessionService = SingletonS2Container.getComponent(CrawlingSessionService.class); - final SearchLogService searchLogService = SingletonS2Container.getComponent(SearchLogService.class); - final JobLogService jobLogService = SingletonS2Container.getComponent(JobLogService.class); - final UserInfoService userInfoService = SingletonS2Container.getComponent(UserInfoService.class); - final DynamicProperties crawlerProperties = ComponentUtil.getCrawlerProperties(); - - final StringBuilder resultBuf = new StringBuilder(); - - // purge crawling sessions - try { - crawlingSessionService.deleteBefore(ComponentUtil.getSystemHelper().getCurrentTime()); - } catch (final Exception e) { - logger.error("Failed to purge crawling sessions.", e); - resultBuf.append(e.getMessage()).append("\n"); - } - - // purge search logs - try { - final String value = crawlerProperties.getProperty(Constants.PURGE_SEARCH_LOG_DAY_PROPERTY, Constants.DEFAULT_PURGE_DAY); - final int days = Integer.parseInt(value); - searchLogService.deleteBefore(days); - } catch (final Exception e) { - logger.error("Failed to purge search logs.", e); - resultBuf.append(e.getMessage()).append("\n"); - } - - // purge job logs - try { - final String value = crawlerProperties.getProperty(Constants.PURGE_JOB_LOG_DAY_PROPERTY, Constants.DEFAULT_PURGE_DAY); - final int days = Integer.parseInt(value); - jobLogService.deleteBefore(days); - } catch (final Exception e) { - logger.error("Failed to purge job logs.", e); - resultBuf.append(e.getMessage()).append("\n"); - } - - // purge user info - try { - final String value = crawlerProperties.getProperty(Constants.PURGE_USER_INFO_DAY_PROPERTY, Constants.DEFAULT_PURGE_DAY); - final int days = Integer.parseInt(value); - userInfoService.deleteBefore(days); - } catch (final Exception e) { - logger.error("Failed to purge user info.", e); - resultBuf.append(e.getMessage()).append("\n"); - } - - return resultBuf.toString(); - } - -} diff --git a/src/main/java/org/codelibs/fess/job/TriggeredJob.java b/src/main/java/org/codelibs/fess/job/TriggeredJob.java index bd51b868c..7b616fb5b 100644 --- a/src/main/java/org/codelibs/fess/job/TriggeredJob.java +++ b/src/main/java/org/codelibs/fess/job/TriggeredJob.java @@ -17,8 +17,8 @@ package org.codelibs.fess.job; import org.codelibs.fess.Constants; -import org.codelibs.fess.db.exentity.JobLog; -import org.codelibs.fess.db.exentity.ScheduledJob; +import org.codelibs.fess.es.exentity.JobLog; +import org.codelibs.fess.es.exentity.ScheduledJob; import org.codelibs.fess.helper.JobHelper; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.service.JobLogService; @@ -48,7 +48,7 @@ public class TriggeredJob implements Job { final JobLog jobLog = new JobLog(scheduledJob); final String scriptType = scheduledJob.getScriptType(); final String script = scheduledJob.getScriptData(); - final Long id = scheduledJob.getId(); + final String id = scheduledJob.getId(); final String jobId = Constants.JOB_ID_PREFIX + id; final JobExecutor jobExecutor = ComponentUtil.getJobExecutor(scriptType); if (jobExecutor == null) { @@ -91,7 +91,7 @@ public class TriggeredJob implements Job { jobLog.setScriptResult(systemHelper.abbreviateLongText(t.getLocalizedMessage())); } finally { jobHelper.finishJobExecutoer(id); - jobLog.setEndTime(ComponentUtil.getSystemHelper().getCurrentTime()); + jobLog.setEndTime(ComponentUtil.getSystemHelper().getCurrentTimeAsLong()); if (logger.isDebugEnabled()) { logger.debug("jobLog: " + jobLog); } diff --git a/src/main/java/org/codelibs/fess/job/UpdateStatsJob.java b/src/main/java/org/codelibs/fess/job/UpdateStatsJob.java deleted file mode 100644 index 3f9fc784e..000000000 --- a/src/main/java/org/codelibs/fess/job/UpdateStatsJob.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.job; - -import org.codelibs.fess.service.SearchFieldLogService; -import org.codelibs.fess.util.ComponentUtil; -import org.seasar.framework.container.SingletonS2Container; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class UpdateStatsJob { - - private static final Logger logger = LoggerFactory.getLogger(UpdateStatsJob.class); - - public String execute() { - final SearchFieldLogService searchFieldLogService = SingletonS2Container.getComponent(SearchFieldLogService.class); - - final StringBuilder resultBuf = new StringBuilder(); - - try { - // update stats fields - searchFieldLogService.updateFieldLabels(); - } catch (final Exception e) { - logger.error("Failed to execute the hourly task.", e); - resultBuf.append(e.getMessage()).append("\n"); - } - - try { - ComponentUtil.getKeyMatchHelper().update(); - } catch (final Exception e) { - logger.error("Failed to execute the hourly task.", e); - resultBuf.append(e.getMessage()).append("\n"); - } - - return resultBuf.toString(); - } - -} diff --git a/src/main/java/org/codelibs/fess/lasta/core/direction/FessEnv.java b/src/main/java/org/codelibs/fess/lasta/core/direction/FessEnv.java index 2fc635951..093e69f3d 100644 --- a/src/main/java/org/codelibs/fess/lasta/core/direction/FessEnv.java +++ b/src/main/java/org/codelibs/fess/lasta/core/direction/FessEnv.java @@ -198,76 +198,91 @@ public interface FessEnv { private static final long serialVersionUID = 1L; /** {@inheritDoc} */ + @Override public String getDevelopmentHere() { return get(FessEnv.DEVELOPMENT_HERE); } /** {@inheritDoc} */ + @Override public boolean isDevelopmentHere() { return is(FessEnv.DEVELOPMENT_HERE); } /** {@inheritDoc} */ + @Override public String getEnvironmentTitle() { return get(FessEnv.ENVIRONMENT_TITLE); } /** {@inheritDoc} */ + @Override public String getFrameworkDebug() { return get(FessEnv.FRAMEWORK_DEBUG); } /** {@inheritDoc} */ + @Override public boolean isFrameworkDebug() { return is(FessEnv.FRAMEWORK_DEBUG); } /** {@inheritDoc} */ + @Override public String getTimeAdjustTimeMillis() { return get(FessEnv.TIME_ADJUST_TIME_MILLIS); } /** {@inheritDoc} */ + @Override public Long getTimeAdjustTimeMillisAsLong() { return getAsLong(FessEnv.TIME_ADJUST_TIME_MILLIS); } /** {@inheritDoc} */ + @Override public String getMailSendMock() { return get(FessEnv.MAIL_SEND_MOCK); } /** {@inheritDoc} */ + @Override public boolean isMailSendMock() { return is(FessEnv.MAIL_SEND_MOCK); } /** {@inheritDoc} */ + @Override public String getMailSmtpServerDefaultHostAndPort() { return get(FessEnv.MAIL_SMTP_SERVER_DEFAULT_HOST_AND_PORT); } /** {@inheritDoc} */ + @Override public String getJdbcUrl() { return get(FessEnv.JDBC_URL); } /** {@inheritDoc} */ + @Override public String getJdbcUser() { return get(FessEnv.JDBC_USER); } /** {@inheritDoc} */ + @Override public String getJdbcPassword() { return get(FessEnv.JDBC_PASSWORD); } /** {@inheritDoc} */ + @Override public String getJdbcConnectionPoolingSize() { return get(FessEnv.JDBC_CONNECTION_POOLING_SIZE); } /** {@inheritDoc} */ + @Override public Integer getJdbcConnectionPoolingSizeAsInteger() { return getAsInteger(FessEnv.JDBC_CONNECTION_POOLING_SIZE); } diff --git a/src/main/java/org/codelibs/fess/lasta/web/action/FessJspPath.java b/src/main/java/org/codelibs/fess/lasta/web/action/FessJspPath.java index 4fdf24f91..4d7b34f97 100644 --- a/src/main/java/org/codelibs/fess/lasta/web/action/FessJspPath.java +++ b/src/main/java/org/codelibs/fess/lasta/web/action/FessJspPath.java @@ -48,17 +48,17 @@ public interface FessJspPath { /** The path of the JSP: /admin/data/index.jsp */ String path_AdminData_IndexJsp = "/admin/data/index.jsp"; - /** The path of the JSP: /admin/dataCrawlingConfig/confirm.jsp */ - String path_AdminDataCrawlingConfig_ConfirmJsp = "/admin/dataCrawlingConfig/confirm.jsp"; + /** The path of the JSP: /admin/dataConfig/confirm.jsp */ + String path_AdminDataConfig_ConfirmJsp = "/admin/dataConfig/confirm.jsp"; - /** The path of the JSP: /admin/dataCrawlingConfig/edit.jsp */ - String path_AdminDataCrawlingConfig_EditJsp = "/admin/dataCrawlingConfig/edit.jsp"; + /** The path of the JSP: /admin/dataConfig/edit.jsp */ + String path_AdminDataConfig_EditJsp = "/admin/dataConfig/edit.jsp"; - /** The path of the JSP: /admin/dataCrawlingConfig/error.jsp */ - String path_AdminDataCrawlingConfig_ErrorJsp = "/admin/dataCrawlingConfig/error.jsp"; + /** The path of the JSP: /admin/dataConfig/error.jsp */ + String path_AdminDataConfig_ErrorJsp = "/admin/dataConfig/error.jsp"; - /** The path of the JSP: /admin/dataCrawlingConfig/index.jsp */ - String path_AdminDataCrawlingConfig_IndexJsp = "/admin/dataCrawlingConfig/index.jsp"; + /** The path of the JSP: /admin/dataConfig/index.jsp */ + String path_AdminDataConfig_IndexJsp = "/admin/dataConfig/index.jsp"; /** The path of the JSP: /admin/design/edit.jsp */ String path_AdminDesign_EditJsp = "/admin/design/edit.jsp"; @@ -141,17 +141,17 @@ public interface FessJspPath { /** The path of the JSP: /admin/fileAuthentication/index.jsp */ String path_AdminFileAuthentication_IndexJsp = "/admin/fileAuthentication/index.jsp"; - /** The path of the JSP: /admin/fileCrawlingConfig/confirm.jsp */ - String path_AdminFileCrawlingConfig_ConfirmJsp = "/admin/fileCrawlingConfig/confirm.jsp"; + /** The path of the JSP: /admin/fileConfig/confirm.jsp */ + String path_AdminFileConfig_ConfirmJsp = "/admin/fileConfig/confirm.jsp"; - /** The path of the JSP: /admin/fileCrawlingConfig/edit.jsp */ - String path_AdminFileCrawlingConfig_EditJsp = "/admin/fileCrawlingConfig/edit.jsp"; + /** The path of the JSP: /admin/fileConfig/edit.jsp */ + String path_AdminFileConfig_EditJsp = "/admin/fileConfig/edit.jsp"; - /** The path of the JSP: /admin/fileCrawlingConfig/error.jsp */ - String path_AdminFileCrawlingConfig_ErrorJsp = "/admin/fileCrawlingConfig/error.jsp"; + /** The path of the JSP: /admin/fileConfig/error.jsp */ + String path_AdminFileConfig_ErrorJsp = "/admin/fileConfig/error.jsp"; - /** The path of the JSP: /admin/fileCrawlingConfig/index.jsp */ - String path_AdminFileCrawlingConfig_IndexJsp = "/admin/fileCrawlingConfig/index.jsp"; + /** The path of the JSP: /admin/fileConfig/index.jsp */ + String path_AdminFileConfig_IndexJsp = "/admin/fileConfig/index.jsp"; /** The path of the JSP: /admin/jobLog/confirm.jsp */ String path_AdminJobLog_ConfirmJsp = "/admin/jobLog/confirm.jsp"; @@ -330,17 +330,17 @@ public interface FessJspPath { /** The path of the JSP: /admin/webAuthentication/index.jsp */ String path_AdminWebAuthentication_IndexJsp = "/admin/webAuthentication/index.jsp"; - /** The path of the JSP: /admin/webCrawlingConfig/confirm.jsp */ - String path_AdminWebCrawlingConfig_ConfirmJsp = "/admin/webCrawlingConfig/confirm.jsp"; + /** The path of the JSP: /admin/webConfig/confirm.jsp */ + String path_AdminWebConfig_ConfirmJsp = "/admin/webConfig/confirm.jsp"; - /** The path of the JSP: /admin/webCrawlingConfig/edit.jsp */ - String path_AdminWebCrawlingConfig_EditJsp = "/admin/webCrawlingConfig/edit.jsp"; + /** The path of the JSP: /admin/webConfig/edit.jsp */ + String path_AdminWebConfig_EditJsp = "/admin/webConfig/edit.jsp"; - /** The path of the JSP: /admin/webCrawlingConfig/error.jsp */ - String path_AdminWebCrawlingConfig_ErrorJsp = "/admin/webCrawlingConfig/error.jsp"; + /** The path of the JSP: /admin/webConfig/error.jsp */ + String path_AdminWebConfig_ErrorJsp = "/admin/webConfig/error.jsp"; - /** The path of the JSP: /admin/webCrawlingConfig/index.jsp */ - String path_AdminWebCrawlingConfig_IndexJsp = "/admin/webCrawlingConfig/index.jsp"; + /** The path of the JSP: /admin/webConfig/index.jsp */ + String path_AdminWebConfig_IndexJsp = "/admin/webConfig/index.jsp"; /** The path of the JSP: /admin/wizard/crawlingConfig.jsp */ String path_AdminWizard_CrawlingConfigJsp = "/admin/wizard/crawlingConfig.jsp"; diff --git a/src/main/java/org/codelibs/fess/pager/DataCrawlingConfigPager.java b/src/main/java/org/codelibs/fess/pager/DataConfigPager.java similarity index 97% rename from src/main/java/org/codelibs/fess/pager/DataCrawlingConfigPager.java rename to src/main/java/org/codelibs/fess/pager/DataConfigPager.java index d27830720..6b1471ff7 100644 --- a/src/main/java/org/codelibs/fess/pager/DataCrawlingConfigPager.java +++ b/src/main/java/org/codelibs/fess/pager/DataConfigPager.java @@ -20,7 +20,7 @@ import java.util.List; import org.codelibs.fess.Constants; -public class DataCrawlingConfigPager { +public class DataConfigPager { public static final int DEFAULT_PAGE_SIZE = 20; @@ -140,7 +140,7 @@ public class DataCrawlingConfigPager { this.pageNumberList = pageNumberList; } - public DataCrawlingConfigPager() { + public DataConfigPager() { super(); } diff --git a/src/main/java/org/codelibs/fess/pager/FavoriteLogPager.java b/src/main/java/org/codelibs/fess/pager/FavoriteLogPager.java deleted file mode 100644 index e66d7f652..000000000 --- a/src/main/java/org/codelibs/fess/pager/FavoriteLogPager.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.pager; - -import java.util.List; - -import org.codelibs.fess.Constants; - -public class FavoriteLogPager { - - public String userCode; - - public String startDate; - - public String startHour; - - public String startMin; - - public String endDate; - - public String endHour; - - public String endMin; - - public static final int DEFAULT_PAGE_SIZE = 20; - - public static final int DEFAULT_CURRENT_PAGE_NUMBER = 1; - - private int allRecordCount; - - private int allPageCount; - - private boolean existPrePage; - - private boolean existNextPage; - - private List pageNumberList; - - private int pageSize; - - private int currentPageNumber; - - public String id; - - public String userId; - - public String url; - - public String createdTime; - - public void clear() { - pageSize = getDefaultPageSize(); - currentPageNumber = getDefaultCurrentPageNumber(); - - id = null; - userId = null; - url = null; - createdTime = null; - userCode = null; - startDate = null; - startHour = null; - startMin = null; - endDate = null; - endHour = null; - endMin = null; - - } - - protected int getDefaultCurrentPageNumber() { - return DEFAULT_CURRENT_PAGE_NUMBER; - } - - public int getAllRecordCount() { - return allRecordCount; - } - - public void setAllRecordCount(final int allRecordCount) { - this.allRecordCount = allRecordCount; - } - - public int getAllPageCount() { - return allPageCount; - } - - public void setAllPageCount(final int allPageCount) { - this.allPageCount = allPageCount; - } - - public boolean isExistPrePage() { - return existPrePage; - } - - public void setExistPrePage(final boolean existPrePage) { - this.existPrePage = existPrePage; - } - - public boolean isExistNextPage() { - return existNextPage; - } - - public void setExistNextPage(final boolean existNextPage) { - this.existNextPage = existNextPage; - } - - public int getPageSize() { - if (pageSize <= 0) { - pageSize = getDefaultPageSize(); - } - return pageSize; - } - - public void setPageSize(final int pageSize) { - this.pageSize = pageSize; - } - - public int getCurrentPageNumber() { - if (currentPageNumber <= 0) { - currentPageNumber = getDefaultCurrentPageNumber(); - } - return currentPageNumber; - } - - public void setCurrentPageNumber(final int currentPageNumber) { - this.currentPageNumber = currentPageNumber; - } - - public List getPageNumberList() { - return pageNumberList; - } - - public void setPageNumberList(final List pageNumberList) { - this.pageNumberList = pageNumberList; - } - - public FavoriteLogPager() { - super(); - } - - protected int getDefaultPageSize() { - return Constants.DEFAULT_ADMIN_PAGE_SIZE; - } - -} diff --git a/src/main/java/org/codelibs/fess/pager/FileAuthenticationPager.java b/src/main/java/org/codelibs/fess/pager/FileAuthenticationPager.java index 97889e7d7..dc403818b 100644 --- a/src/main/java/org/codelibs/fess/pager/FileAuthenticationPager.java +++ b/src/main/java/org/codelibs/fess/pager/FileAuthenticationPager.java @@ -46,7 +46,7 @@ public class FileAuthenticationPager { public String username; - public String fileCrawlingConfigId; + public String fileConfigId; public String createdBy; @@ -61,7 +61,7 @@ public class FileAuthenticationPager { id = null; port = null; username = null; - fileCrawlingConfigId = null; + fileConfigId = null; createdBy = null; createdTime = null; versionNo = null; diff --git a/src/main/java/org/codelibs/fess/pager/FileCrawlingConfigPager.java b/src/main/java/org/codelibs/fess/pager/FileConfigPager.java similarity index 97% rename from src/main/java/org/codelibs/fess/pager/FileCrawlingConfigPager.java rename to src/main/java/org/codelibs/fess/pager/FileConfigPager.java index 267f29638..2136f7755 100644 --- a/src/main/java/org/codelibs/fess/pager/FileCrawlingConfigPager.java +++ b/src/main/java/org/codelibs/fess/pager/FileConfigPager.java @@ -20,7 +20,7 @@ import java.util.List; import org.codelibs.fess.Constants; -public class FileCrawlingConfigPager { +public class FileConfigPager { public static final int DEFAULT_PAGE_SIZE = 20; @@ -146,7 +146,7 @@ public class FileCrawlingConfigPager { this.pageNumberList = pageNumberList; } - public FileCrawlingConfigPager() { + public FileConfigPager() { super(); } diff --git a/src/main/java/org/codelibs/fess/pager/RequestHeaderPager.java b/src/main/java/org/codelibs/fess/pager/RequestHeaderPager.java index d27444ffe..d3b7319f3 100644 --- a/src/main/java/org/codelibs/fess/pager/RequestHeaderPager.java +++ b/src/main/java/org/codelibs/fess/pager/RequestHeaderPager.java @@ -46,7 +46,7 @@ public class RequestHeaderPager { public String value; - public String webCrawlingConfigId; + public String webConfigId; public String createdBy; @@ -61,7 +61,7 @@ public class RequestHeaderPager { id = null; name = null; value = null; - webCrawlingConfigId = null; + webConfigId = null; createdBy = null; createdTime = null; versionNo = null; diff --git a/src/main/java/org/codelibs/fess/pager/SearchLogPager.java b/src/main/java/org/codelibs/fess/pager/SearchLogPager.java deleted file mode 100644 index f6ab17edd..000000000 --- a/src/main/java/org/codelibs/fess/pager/SearchLogPager.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.pager; - -import java.util.List; - -import org.codelibs.fess.Constants; - -public class SearchLogPager { - - public String searchWord; - - public String userCode; - - public String sortOrder; - - public String sortField; - - public String startDate; - - public String startHour; - - public String startMin; - - public String endDate; - - public String endHour; - - public String endMin; - - public String startPage; - - public static final int DEFAULT_PAGE_SIZE = 20; - - public static final int DEFAULT_CURRENT_PAGE_NUMBER = 1; - - private int allRecordCount; - - private int allPageCount; - - private boolean existPrePage; - - private boolean existNextPage; - - private List pageNumberList; - - private int pageSize; - - private int currentPageNumber; - - public String id; - - public String requestedTime; - - public String responseTime; - - public String hitCount; - - public String queryOffset; - - public String queryPageSize; - - public String accessType; - - public void clear() { - pageSize = getDefaultPageSize(); - currentPageNumber = getDefaultCurrentPageNumber(); - - id = null; - requestedTime = null; - responseTime = null; - hitCount = null; - queryOffset = null; - queryPageSize = null; - accessType = null; - searchWord = null; - userCode = null; - sortOrder = null; - sortField = null; - startDate = null; - startHour = null; - startMin = null; - endDate = null; - endHour = null; - endMin = null; - startPage = null; - - } - - protected int getDefaultCurrentPageNumber() { - return DEFAULT_CURRENT_PAGE_NUMBER; - } - - public int getAllRecordCount() { - return allRecordCount; - } - - public void setAllRecordCount(final int allRecordCount) { - this.allRecordCount = allRecordCount; - } - - public int getAllPageCount() { - return allPageCount; - } - - public void setAllPageCount(final int allPageCount) { - this.allPageCount = allPageCount; - } - - public boolean isExistPrePage() { - return existPrePage; - } - - public void setExistPrePage(final boolean existPrePage) { - this.existPrePage = existPrePage; - } - - public boolean isExistNextPage() { - return existNextPage; - } - - public void setExistNextPage(final boolean existNextPage) { - this.existNextPage = existNextPage; - } - - public int getPageSize() { - if (pageSize <= 0) { - pageSize = getDefaultPageSize(); - } - return pageSize; - } - - public void setPageSize(final int pageSize) { - this.pageSize = pageSize; - } - - public int getCurrentPageNumber() { - if (currentPageNumber <= 0) { - currentPageNumber = getDefaultCurrentPageNumber(); - } - return currentPageNumber; - } - - public void setCurrentPageNumber(final int currentPageNumber) { - this.currentPageNumber = currentPageNumber; - } - - public List getPageNumberList() { - return pageNumberList; - } - - public void setPageNumberList(final List pageNumberList) { - this.pageNumberList = pageNumberList; - } - - public SearchLogPager() { - super(); - } - - protected int getDefaultPageSize() { - return Constants.DEFAULT_ADMIN_PAGE_SIZE; - } - - public String getReverseSortOrder() { - if (Constants.ASC.equals(sortOrder)) { - return Constants.DESC; - } else if (Constants.DESC.equals(sortOrder)) { - return Constants.ASC; - } - return Constants.ASC; - } -} diff --git a/src/main/java/org/codelibs/fess/pager/StatsPager.java b/src/main/java/org/codelibs/fess/pager/StatsPager.java deleted file mode 100644 index 7d78a5522..000000000 --- a/src/main/java/org/codelibs/fess/pager/StatsPager.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.pager; - -import java.io.Serializable; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.time.format.DateTimeParseException; -import java.util.List; - -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.Constants; - -public class StatsPager implements Serializable { - - private static final String DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm"; - - private static final long serialVersionUID = 1L; - - public static final int DEFAULT_PAGE_SIZE = 20; - - public static final int DEFAULT_CURRENT_PAGE_NUMBER = 1; - - private int allRecordCount; - - private int allPageCount; - - private boolean existPrePage; - - private boolean existNextPage; - - private List pageNumberList; - - private int pageSize; - - private int currentPageNumber; - - public String reportType; - - public String startDate; - - public String startHour; - - public String startMin; - - public String endDate; - - public String endHour; - - public String endMin; - - public void clear() { - pageSize = getDefaultPageSize(); - currentPageNumber = getDefaultCurrentPageNumber(); - reportType = null; - resetStartDate(); - resetEndDate(); - } - - public LocalDateTime getFromRequestedTime() { - if (StringUtil.isBlank(startDate)) { - return null; - } - - try { - if (StringUtil.isBlank(startHour)) { - startHour = null; - startMin = null; - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_TIME_FORMAT); - return LocalDateTime.parse(startDate + " 00:00", formatter); - - } else { - if (StringUtil.isBlank(startMin)) { - startMin = "0"; - } - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_TIME_FORMAT); - return LocalDateTime.parse(startDate + " " + startHour + ":" + startMin, formatter); - } - } catch (final DateTimeParseException e) { - resetStartDate(); - } - return null; - } - - private void resetStartDate() { - startDate = null; - startHour = null; - startMin = null; - } - - public LocalDateTime getToRequestedTime() { - if (StringUtil.isBlank(endDate)) { - return null; - } - - try { - if (StringUtil.isBlank(endHour)) { - endHour = null; - endMin = null; - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_TIME_FORMAT); - return LocalDateTime.parse(endDate + " 00:00", formatter); - - } else { - if (StringUtil.isBlank(endMin)) { - endMin = "0"; - } - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_TIME_FORMAT); - return LocalDateTime.parse(endDate + " " + endHour + ":" + endMin, formatter); - } - } catch (final DateTimeParseException e) { - resetEndDate(); - } - return null; - } - - private void resetEndDate() { - endDate = null; - endHour = null; - endMin = null; - } - - protected int getDefaultPageSize() { - return Constants.DEFAULT_ADMIN_PAGE_SIZE; - } - - protected int getDefaultCurrentPageNumber() { - return DEFAULT_CURRENT_PAGE_NUMBER; - } - - public int getAllRecordCount() { - return allRecordCount; - } - - public void setAllRecordCount(final int allRecordCount) { - this.allRecordCount = allRecordCount; - } - - public int getAllPageCount() { - return allPageCount; - } - - public void setAllPageCount(final int allPageCount) { - this.allPageCount = allPageCount; - } - - public boolean isExistPrePage() { - return existPrePage; - } - - public void setExistPrePage(final boolean existPrePage) { - this.existPrePage = existPrePage; - } - - public boolean isExistNextPage() { - return existNextPage; - } - - public void setExistNextPage(final boolean existNextPage) { - this.existNextPage = existNextPage; - } - - public int getPageSize() { - if (pageSize <= 0) { - pageSize = getDefaultPageSize(); - } - return pageSize; - } - - public void setPageSize(final int pageSize) { - this.pageSize = pageSize; - } - - public int getCurrentPageNumber() { - if (currentPageNumber <= 0) { - currentPageNumber = getDefaultCurrentPageNumber(); - } - return currentPageNumber; - } - - public void setCurrentPageNumber(final int currentPageNumber) { - this.currentPageNumber = currentPageNumber; - } - - public List getPageNumberList() { - return pageNumberList; - } - - public void setPageNumberList(final List pageNumberList) { - this.pageNumberList = pageNumberList; - } - -} diff --git a/src/main/java/org/codelibs/fess/pager/UserInfoPager.java b/src/main/java/org/codelibs/fess/pager/UserInfoPager.java deleted file mode 100644 index b622be5d9..000000000 --- a/src/main/java/org/codelibs/fess/pager/UserInfoPager.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.pager; - -import java.time.LocalDateTime; -import java.util.List; - -import org.codelibs.fess.Constants; - -public class UserInfoPager { - - public LocalDateTime updatedTimeBefore; - - public static final int DEFAULT_PAGE_SIZE = 20; - - public static final int DEFAULT_CURRENT_PAGE_NUMBER = 1; - - private int allRecordCount; - - private int allPageCount; - - private boolean existPrePage; - - private boolean existNextPage; - - private List pageNumberList; - - private int pageSize; - - private int currentPageNumber; - - public String id; - - public String code; - - public String createdTime; - - public String updatedTime; - - public void clear() { - pageSize = getDefaultPageSize(); - currentPageNumber = getDefaultCurrentPageNumber(); - - id = null; - code = null; - createdTime = null; - updatedTime = null; - - } - - protected int getDefaultCurrentPageNumber() { - return DEFAULT_CURRENT_PAGE_NUMBER; - } - - public int getAllRecordCount() { - return allRecordCount; - } - - public void setAllRecordCount(final int allRecordCount) { - this.allRecordCount = allRecordCount; - } - - public int getAllPageCount() { - return allPageCount; - } - - public void setAllPageCount(final int allPageCount) { - this.allPageCount = allPageCount; - } - - public boolean isExistPrePage() { - return existPrePage; - } - - public void setExistPrePage(final boolean existPrePage) { - this.existPrePage = existPrePage; - } - - public boolean isExistNextPage() { - return existNextPage; - } - - public void setExistNextPage(final boolean existNextPage) { - this.existNextPage = existNextPage; - } - - public int getPageSize() { - if (pageSize <= 0) { - pageSize = getDefaultPageSize(); - } - return pageSize; - } - - public void setPageSize(final int pageSize) { - this.pageSize = pageSize; - } - - public int getCurrentPageNumber() { - if (currentPageNumber <= 0) { - currentPageNumber = getDefaultCurrentPageNumber(); - } - return currentPageNumber; - } - - public void setCurrentPageNumber(final int currentPageNumber) { - this.currentPageNumber = currentPageNumber; - } - - public List getPageNumberList() { - return pageNumberList; - } - - public void setPageNumberList(final List pageNumberList) { - this.pageNumberList = pageNumberList; - } - - public UserInfoPager() { - super(); - } - - protected int getDefaultPageSize() { - return Constants.DEFAULT_ADMIN_PAGE_SIZE; - } - -} diff --git a/src/main/java/org/codelibs/fess/pager/WebAuthenticationPager.java b/src/main/java/org/codelibs/fess/pager/WebAuthenticationPager.java index e4a2c3317..7a7e43004 100644 --- a/src/main/java/org/codelibs/fess/pager/WebAuthenticationPager.java +++ b/src/main/java/org/codelibs/fess/pager/WebAuthenticationPager.java @@ -46,7 +46,7 @@ public class WebAuthenticationPager { public String username; - public String webCrawlingConfigId; + public String webConfigId; public String createdBy; @@ -61,7 +61,7 @@ public class WebAuthenticationPager { id = null; port = null; username = null; - webCrawlingConfigId = null; + webConfigId = null; createdBy = null; createdTime = null; versionNo = null; diff --git a/src/main/java/org/codelibs/fess/pager/WebCrawlingConfigPager.java b/src/main/java/org/codelibs/fess/pager/WebConfigPager.java similarity index 97% rename from src/main/java/org/codelibs/fess/pager/WebCrawlingConfigPager.java rename to src/main/java/org/codelibs/fess/pager/WebConfigPager.java index 540b20e0c..b7945f0e5 100644 --- a/src/main/java/org/codelibs/fess/pager/WebCrawlingConfigPager.java +++ b/src/main/java/org/codelibs/fess/pager/WebConfigPager.java @@ -20,7 +20,7 @@ import java.util.List; import org.codelibs.fess.Constants; -public class WebCrawlingConfigPager { +public class WebConfigPager { public static final int DEFAULT_PAGE_SIZE = 20; @@ -149,7 +149,7 @@ public class WebCrawlingConfigPager { this.pageNumberList = pageNumberList; } - public WebCrawlingConfigPager() { + public WebConfigPager() { super(); } diff --git a/src/main/java/org/codelibs/fess/robot/FessS2RobotThread.java b/src/main/java/org/codelibs/fess/robot/FessS2RobotThread.java index 188cbea64..4ec91fea9 100644 --- a/src/main/java/org/codelibs/fess/robot/FessS2RobotThread.java +++ b/src/main/java/org/codelibs/fess/robot/FessS2RobotThread.java @@ -29,13 +29,12 @@ import org.apache.commons.io.IOUtils; import org.codelibs.core.misc.DynamicProperties; import org.codelibs.fess.Constants; import org.codelibs.fess.client.FessEsClient; -import org.codelibs.fess.db.exentity.CrawlingConfig; +import org.codelibs.fess.es.exentity.CrawlingConfig; import org.codelibs.fess.helper.CrawlingConfigHelper; import org.codelibs.fess.helper.CrawlingSessionHelper; import org.codelibs.fess.helper.FieldHelper; import org.codelibs.fess.helper.IndexingHelper; import org.codelibs.fess.helper.SambaHelper; -import org.codelibs.fess.helper.SearchLogHelper; import org.codelibs.fess.util.ComponentUtil; import org.codelibs.robot.S2RobotThread; import org.codelibs.robot.builder.RequestDataBuilder; @@ -124,24 +123,6 @@ public class FessS2RobotThread extends S2RobotThread { return true; } - final Integer clickCount = (Integer) solrDocument.get(fieldHelper.clickCountField); - if (clickCount != null) { - final SearchLogHelper searchLogHelper = ComponentUtil.getSearchLogHelper(); - final int count = searchLogHelper.getClickCount(url); - if (count != clickCount.intValue()) { - return true; - } - } - - final Integer favoriteCount = (Integer) solrDocument.get(fieldHelper.favoriteCountField); - if (favoriteCount != null) { - final SearchLogHelper searchLogHelper = ComponentUtil.getSearchLogHelper(); - final long count = searchLogHelper.getFavoriteCount(url); - if (count != favoriteCount.longValue()) { - return true; - } - } - if (responseData == null) { // head method responseData = client.execute(RequestDataBuilder.newRequestData().head().url(url).build()); diff --git a/src/main/java/org/codelibs/fess/service/ClickLogService.java b/src/main/java/org/codelibs/fess/service/ClickLogService.java deleted file mode 100644 index 6ee06476b..000000000 --- a/src/main/java/org/codelibs/fess/service/ClickLogService.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.service; - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Resource; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.codelibs.core.CoreLibConstants; -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.db.exbhv.ClickLogBhv; -import org.codelibs.fess.db.exbhv.SearchLogBhv; -import org.codelibs.fess.db.exentity.ClickLog; -import org.codelibs.fess.db.exentity.SearchLog; -import org.dbflute.bhv.readable.EntityRowHandler; - -import jp.sf.orangesignal.csv.CsvConfig; -import jp.sf.orangesignal.csv.CsvReader; -import jp.sf.orangesignal.csv.CsvWriter; - -public class ClickLogService implements Serializable { - - private static final long serialVersionUID = 1L; - - private static final Log log = LogFactory.getLog(ClickLogService.class); - - @Resource - protected SearchLogBhv searchLogBhv; - - @Resource - protected ClickLogBhv clickLogBhv; - - public void importCsv(final Reader reader) { - final CsvReader csvReader = new CsvReader(reader, new CsvConfig()); - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(CoreLibConstants.DATE_FORMAT_ISO_8601_EXTEND); - try { - List list; - csvReader.readValues(); // ignore header - while ((list = csvReader.readValues()) != null) { - try { - final String dateStr = list.get(3); - final String userSessionId = list.get(4); - final SearchLog searchLog = searchLogBhv.selectEntity(cb -> { - cb.query().setRequestedTime_Equal(LocalDateTime.parse(dateStr, formatter)); - cb.query().setUserSessionId_Equal(userSessionId); - }).orElse(null);//TODO - if (searchLog != null) { - final ClickLog entity = new ClickLog(); - entity.setId(Long.parseLong(list.get(0))); - entity.setSearchId(searchLog.getId()); - entity.setUrl(list.get(1)); - entity.setRequestedTime(LocalDateTime.parse(list.get(2), formatter)); - clickLogBhv.insert(entity); - } else { - log.warn("The search log is not found: " + list); - } - } catch (final Exception e) { - log.warn("Failed to read a click log: " + list, e); - } - } - } catch (final IOException e) { - log.warn("Failed to read a click log.", e); - } - } - - public void exportCsv(final Writer writer) { - final CsvConfig cfg = new CsvConfig(',', '"', '"'); - cfg.setEscapeDisabled(false); - cfg.setQuoteDisabled(false); - final CsvWriter csvWriter = new CsvWriter(writer, cfg); - try { - final List list = new ArrayList(); - list.add("SearchId"); - list.add("URL"); - list.add("RequestedTime"); - list.add("QueryRequestedTime"); - list.add("UserSessionId"); - csvWriter.writeValues(list); - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(CoreLibConstants.DATE_FORMAT_ISO_8601_EXTEND); - clickLogBhv.selectCursor(cb -> { - cb.setupSelect_SearchLog(); - cb.specify().specifySearchLog().columnUserSessionId(); - cb.specify().specifySearchLog().columnRequestedTime(); - }, new EntityRowHandler() { - @Override - public void handle(final ClickLog entity) { - final List list = new ArrayList(); - addToList(list, entity.getSearchId()); - addToList(list, entity.getUrl()); - addToList(list, entity.getRequestedTime()); - entity.getSearchLog().ifPresent(searchLog -> { - addToList(list, searchLog.getRequestedTime()); - addToList(list, searchLog.getUserSessionId()); - }); - try { - csvWriter.writeValues(list); - } catch (final IOException e) { - log.warn("Failed to write a search log: " + entity, e); - } - } - - private void addToList(final List list, final Object value) { - if (value == null) { - list.add(StringUtil.EMPTY); - } else if (value instanceof LocalDateTime) { - list.add(((LocalDateTime) value).format(formatter)); - } else { - list.add(value.toString()); - } - } - }); - csvWriter.flush(); - } catch (final IOException e) { - log.warn("Failed to write a search log.", e); - } - } -} diff --git a/src/main/java/org/codelibs/fess/service/CrawlingSessionService.java b/src/main/java/org/codelibs/fess/service/CrawlingSessionService.java index f4173c214..640d0a73f 100644 --- a/src/main/java/org/codelibs/fess/service/CrawlingSessionService.java +++ b/src/main/java/org/codelibs/fess/service/CrawlingSessionService.java @@ -20,6 +20,8 @@ import java.io.IOException; import java.io.Reader; import java.io.Serializable; import java.io.Writer; +import java.text.DateFormat; +import java.text.SimpleDateFormat; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.ArrayList; @@ -27,6 +29,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.stream.Collectors; import javax.annotation.Resource; @@ -37,11 +40,11 @@ import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.FessSystemException; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.db.cbean.CrawlingSessionCB; -import org.codelibs.fess.db.exbhv.CrawlingSessionBhv; -import org.codelibs.fess.db.exbhv.CrawlingSessionInfoBhv; -import org.codelibs.fess.db.exentity.CrawlingSession; -import org.codelibs.fess.db.exentity.CrawlingSessionInfo; +import org.codelibs.fess.es.cbean.CrawlingSessionCB; +import org.codelibs.fess.es.exbhv.CrawlingSessionBhv; +import org.codelibs.fess.es.exbhv.CrawlingSessionInfoBhv; +import org.codelibs.fess.es.exentity.CrawlingSession; +import org.codelibs.fess.es.exentity.CrawlingSessionInfo; import org.codelibs.fess.pager.CrawlingSessionPager; import org.codelibs.fess.util.ComponentUtil; import org.dbflute.bhv.readable.EntityRowHandler; @@ -87,7 +90,7 @@ public class CrawlingSessionService implements Serializable { public CrawlingSession getCrawlingSession(final Map keys) { final CrawlingSession crawlingSession = crawlingSessionBhv.selectEntity(cb -> { - cb.query().setId_Equal(Long.parseLong(keys.get("id"))); + cb.query().docMeta().setId_Equal(keys.get("id")); setupEntityCondition(cb, keys); }).orElse(null);//TODO if (crawlingSession == null) { @@ -117,13 +120,11 @@ public class CrawlingSessionService implements Serializable { protected void setupListCondition(final CrawlingSessionCB cb, final CrawlingSessionPager crawlingSessionPager) { if (crawlingSessionPager.id != null) { - cb.query().setId_Equal(Long.parseLong(crawlingSessionPager.id)); + cb.query().docMeta().setId_Equal(crawlingSessionPager.id); } // TODO Long, Integer, String supported only. if (StringUtil.isNotBlank(crawlingSessionPager.sessionId)) { - cb.query().setSessionId_LikeSearch(crawlingSessionPager.sessionId, op -> { - op.likeContain(); - }); + cb.query().setSessionId_Match(crawlingSessionPager.sessionId); } cb.query().addOrderBy_CreatedTime_Desc(); } @@ -132,41 +133,41 @@ public class CrawlingSessionService implements Serializable { if (crawlingSession == null) { throw new FessSystemException("Crawling Session is null."); } - final LocalDateTime now = ComponentUtil.getSystemHelper().getCurrentTime(); + final long now = ComponentUtil.getSystemHelper().getCurrentTimeAsLong(); if (crawlingSession.getCreatedTime() == null) { crawlingSession.setCreatedTime(now); } } protected void setupDeleteCondition(final CrawlingSession crawlingSession) { - crawlingSessionInfoBhv.varyingQueryDelete(cb -> { + crawlingSessionInfoBhv.queryDelete(cb -> { cb.query().setCrawlingSessionId_Equal(crawlingSession.getId()); - }, op -> { - op.allowNonQueryDelete(); }); } - public void deleteSessionIdsBefore(final String activeSessionId, final String name, final LocalDateTime date) { + public void deleteSessionIdsBefore(final String activeSessionId, final String name, final long date) { final List crawlingSessionList = crawlingSessionBhv.selectList(cb -> { - cb.query().setExpiredTime_LessEqual(date); - if (StringUtil.isNotBlank(name)) { - cb.query().setName_Equal(name); - } - if (activeSessionId != null) { - cb.query().setSessionId_NotEqual(activeSessionId); - } + cb.query().filtered((cq, cf) -> { + cq.setExpiredTime_LessEqual(date); + if (StringUtil.isNotBlank(name)) { + cf.setName_Equal(name); + } + if (activeSessionId != null) { + cf.setSessionId_NotEqual(activeSessionId); + } + + }); + cb.specify().columnId(); }); if (!crawlingSessionList.isEmpty()) { - final List crawlingSessionIdList = new ArrayList(); + final List crawlingSessionIdList = new ArrayList<>(); for (final CrawlingSession cs : crawlingSessionList) { crawlingSessionIdList.add(cs.getId()); } - crawlingSessionInfoBhv.varyingQueryDelete(cb2 -> { + crawlingSessionInfoBhv.queryDelete(cb2 -> { cb2.query().setCrawlingSessionId_InScope(crawlingSessionIdList); - }, op -> { - op.allowNonQueryDelete(); }); crawlingSessionBhv.batchDelete(crawlingSessionList); @@ -184,7 +185,7 @@ public class CrawlingSessionService implements Serializable { throw new FessSystemException("Crawling Session Info is null."); } - final LocalDateTime now = ComponentUtil.getSystemHelper().getCurrentTime(); + final long now = ComponentUtil.getSystemHelper().getCurrentTimeAsLong(); for (final CrawlingSessionInfo crawlingSessionInfo : crawlingSessionInfoList) { if (crawlingSessionInfo.getCreatedTime() == null) { crawlingSessionInfo.setCreatedTime(now); @@ -193,9 +194,9 @@ public class CrawlingSessionService implements Serializable { crawlingSessionInfoBhv.batchInsert(crawlingSessionInfoList); } - public List getCrawlingSessionInfoList(final Long id) { + public List getCrawlingSessionInfoList(final String id) { return crawlingSessionInfoBhv.selectList(cb -> { - cb.query().queryCrawlingSession().setId_Equal(id); + cb.query().setCrawlingSessionId_Equal(id); cb.query().addOrderBy_Id_Asc(); }); } @@ -212,25 +213,34 @@ public class CrawlingSessionService implements Serializable { } public void deleteOldSessions(final Set activeSessionId) { - crawlingSessionInfoBhv.varyingQueryDelete(cb1 -> { - if (!activeSessionId.isEmpty()) { - cb1.query().queryCrawlingSession().setSessionId_NotInScope(activeSessionId); - } - }, op -> { - op.allowNonQueryDelete(); - }); - crawlingSessionBhv.varyingQueryDelete(cb2 -> { - if (!activeSessionId.isEmpty()) { - cb2.query().setSessionId_NotInScope(activeSessionId); - } - }, op -> { - op.allowNonQueryDelete(); + final List activeSessionList = crawlingSessionBhv.selectList(cb -> { + cb.query().setSessionId_InScope(activeSessionId); + cb.specify().columnId(); }); + final List idList = activeSessionList.stream().map(session -> session.getId()).collect(Collectors.toList()); + if (!idList.isEmpty()) { + crawlingSessionInfoBhv.queryDelete(cb1 -> { + cb1.query().filtered((cq, cf) -> { + cq.matchAll(); + cf.not(subCf -> { + subCf.setCrawlingSessionId_InScope(idList); + }); + }); + }); + crawlingSessionBhv.queryDelete(cb2 -> { + cb2.query().filtered((cq, cf) -> { + cq.matchAll(); + cf.not(subCf -> { + subCf.setId_InScope(idList); + }); + }); + }); + } } public void importCsv(final Reader reader) { final CsvReader csvReader = new CsvReader(reader, new CsvConfig()); - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(CoreLibConstants.DATE_FORMAT_ISO_8601_EXTEND); + final DateFormat formatter = new SimpleDateFormat(CoreLibConstants.DATE_FORMAT_ISO_8601_EXTEND); try { List list; csvReader.readValues(); // ignore header @@ -244,7 +254,7 @@ public class CrawlingSessionService implements Serializable { if (crawlingSession == null) { crawlingSession = new CrawlingSession(); crawlingSession.setSessionId(list.get(0)); - crawlingSession.setCreatedTime(LocalDateTime.parse(list.get(1), formatter)); + crawlingSession.setCreatedTime(formatter.parse(list.get(1)).getTime()); crawlingSessionBhv.insert(crawlingSession); } @@ -252,7 +262,7 @@ public class CrawlingSessionService implements Serializable { entity.setCrawlingSessionId(crawlingSession.getId()); entity.setKey(list.get(2)); entity.setValue(list.get(3)); - entity.setCreatedTime(LocalDateTime.parse(list.get(4), formatter)); + entity.setCreatedTime(formatter.parse(list.get(4)).getTime()); crawlingSessionInfoBhv.insert(entity); } catch (final Exception e) { log.warn("Failed to read a click log: " + list, e); @@ -279,7 +289,7 @@ public class CrawlingSessionService implements Serializable { csvWriter.writeValues(list); final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(CoreLibConstants.DATE_FORMAT_ISO_8601_EXTEND); crawlingSessionInfoBhv.selectCursor(cb -> { - cb.setupSelect_CrawlingSession(); + cb.query().matchAll(); }, new EntityRowHandler() { @Override public void handle(final CrawlingSessionInfo entity) { @@ -319,17 +329,17 @@ public class CrawlingSessionService implements Serializable { } } - public void deleteBefore(final LocalDateTime date) { - crawlingSessionInfoBhv.varyingQueryDelete(cb1 -> { - cb1.setupSelect_CrawlingSession(); - cb1.query().queryCrawlingSession().setExpiredTime_LessThan(date); - }, op -> { - op.allowNonQueryDelete(); - }); - crawlingSessionBhv.varyingQueryDelete(cb2 -> { - cb2.query().setExpiredTime_LessThan(date); - }, op -> { - op.allowNonQueryDelete(); + public void deleteBefore(final long date) { + crawlingSessionBhv.selectBulk(cb -> { + cb.query().setExpiredTime_LessThan(date); + }, list -> { + final List idList = list.stream().map(entity -> entity.getId()).collect(Collectors.toList()); + crawlingSessionInfoBhv.queryDelete(cb1 -> { + cb1.query().setCrawlingSessionId_InScope(idList); + }); + crawlingSessionBhv.queryDelete(cb2 -> { + cb2.query().setExpiredTime_LessThan(date); + }); }); } diff --git a/src/main/java/org/codelibs/fess/service/DataConfigService.java b/src/main/java/org/codelibs/fess/service/DataConfigService.java new file mode 100644 index 000000000..c011e3b1a --- /dev/null +++ b/src/main/java/org/codelibs/fess/service/DataConfigService.java @@ -0,0 +1,284 @@ +/* + * Copyright 2009-2015 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 org.codelibs.fess.service; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import javax.annotation.Resource; + +import org.codelibs.fess.Constants; +import org.codelibs.fess.crud.CommonConstants; +import org.codelibs.fess.crud.CrudMessageException; +import org.codelibs.fess.es.cbean.DataConfigCB; +import org.codelibs.fess.es.exbhv.DataConfigBhv; +import org.codelibs.fess.es.exbhv.DataConfigToLabelBhv; +import org.codelibs.fess.es.exbhv.DataConfigToRoleBhv; +import org.codelibs.fess.es.exentity.DataConfig; +import org.codelibs.fess.es.exentity.DataConfigToLabel; +import org.codelibs.fess.es.exentity.DataConfigToRole; +import org.codelibs.fess.pager.DataConfigPager; +import org.dbflute.cbean.result.PagingResultBean; +import org.seasar.framework.beans.util.Beans; + +public class DataConfigService implements Serializable { + + private static final long serialVersionUID = 1L; + + @Resource + protected DataConfigToRoleBhv dataConfigToRoleBhv; + + @Resource + protected DataConfigToLabelBhv dataConfigToLabelBhv; + + @Resource + protected DataConfigBhv dataConfigBhv; + + public DataConfigService() { + super(); + } + + public List getDataConfigList(final DataConfigPager dataConfigPager) { + + final PagingResultBean dataConfigList = dataConfigBhv.selectPage(cb -> { + cb.paging(dataConfigPager.getPageSize(), dataConfigPager.getCurrentPageNumber()); + + setupListCondition(cb, dataConfigPager); + }); + + // update pager + Beans.copy(dataConfigList, dataConfigPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); + dataConfigPager.setPageNumberList(dataConfigList.pageRange(op -> { + op.rangeSize(5); + }).createPageNumberList()); + + return dataConfigList; + } + + public void delete(final DataConfig dataConfig) throws CrudMessageException { + setupDeleteCondition(dataConfig); + + dataConfigBhv.delete(dataConfig, op -> { + op.setRefresh(true); + }); + + } + + public List getAllDataConfigList() { + return getAllDataConfigList(true, true, true, null); + } + + public List getDataConfigListByIds(final List idList) { + if (idList == null) { + return getAllDataConfigList(); + } else { + return getAllDataConfigList(true, true, false, idList); + } + } + + public List getAllDataConfigList(final boolean withLabelType, final boolean withRoleType, final boolean available, + final List idList) { + final List list = dataConfigBhv.selectList(cb -> { + if (available) { + cb.query().setAvailable_Equal(Constants.T); + } + if (idList != null) { + cb.query().setId_InScope(idList); + } + }); + return list; + } + + public DataConfig getDataConfig(final Map keys) { + + final DataConfig dataConfig = dataConfigBhv.selectEntity(cb -> { + cb.query().docMeta().setId_Equal(keys.get("id")); + setupEntityCondition(cb, keys); + }).orElse(null);//TODO + + if (dataConfig != null) { + + final List fctrtmList = dataConfigToRoleBhv.selectList(fctrtmCb -> { + fctrtmCb.query().setDataConfigId_Equal(dataConfig.getId()); + }); + if (!fctrtmList.isEmpty()) { + final List roleTypeIds = new ArrayList(fctrtmList.size()); + for (final DataConfigToRole mapping : fctrtmList) { + roleTypeIds.add(mapping.getRoleTypeId()); + } + dataConfig.setRoleTypeIds(roleTypeIds.toArray(new String[roleTypeIds.size()])); + } + + final List fctltmList = dataConfigToLabelBhv.selectList(fctltmCb -> { + fctltmCb.query().setDataConfigId_Equal(dataConfig.getId()); + }); + if (!fctltmList.isEmpty()) { + final List labelTypeIds = new ArrayList(fctltmList.size()); + for (final DataConfigToLabel mapping : fctltmList) { + labelTypeIds.add(mapping.getLabelTypeId()); + } + dataConfig.setLabelTypeIds(labelTypeIds.toArray(new String[labelTypeIds.size()])); + } + + } + + return dataConfig; + } + + public void store(final DataConfig dataConfig) { + final boolean isNew = dataConfig.getId() == null; + final String[] labelTypeIds = dataConfig.getLabelTypeIds(); + final String[] roleTypeIds = dataConfig.getRoleTypeIds(); + setupStoreCondition(dataConfig); + + dataConfigBhv.insertOrUpdate(dataConfig, op -> { + op.setRefresh(true); + }); + final String dataConfigId = dataConfig.getId(); + if (isNew) { + // Insert + if (labelTypeIds != null) { + final List fctltmList = new ArrayList(); + for (final String labelTypeId : labelTypeIds) { + final DataConfigToLabel mapping = new DataConfigToLabel(); + mapping.setDataConfigId(dataConfigId); + mapping.setLabelTypeId(labelTypeId); + fctltmList.add(mapping); + } + dataConfigToLabelBhv.batchInsert(fctltmList, op -> { + op.setRefresh(true); + }); + } + if (roleTypeIds != null) { + final List fctrtmList = new ArrayList(); + for (final String roleTypeId : roleTypeIds) { + final DataConfigToRole mapping = new DataConfigToRole(); + mapping.setDataConfigId(dataConfigId); + mapping.setRoleTypeId(roleTypeId); + fctrtmList.add(mapping); + } + dataConfigToRoleBhv.batchInsert(fctrtmList, op -> { + op.setRefresh(true); + }); + } + } else { + // Update + if (labelTypeIds != null) { + final List fctltmList = dataConfigToLabelBhv.selectList(fctltmCb -> { + fctltmCb.query().setDataConfigId_Equal(dataConfigId); + }); + final List newList = new ArrayList(); + final List matchedList = new ArrayList(); + for (final String id : labelTypeIds) { + boolean exist = false; + for (final DataConfigToLabel mapping : fctltmList) { + if (mapping.getLabelTypeId().equals(id)) { + exist = true; + matchedList.add(mapping); + break; + } + } + if (!exist) { + // new + final DataConfigToLabel mapping = new DataConfigToLabel(); + mapping.setDataConfigId(dataConfigId); + mapping.setLabelTypeId(id); + newList.add(mapping); + } + } + fctltmList.removeAll(matchedList); + dataConfigToLabelBhv.batchInsert(newList, op -> { + op.setRefresh(true); + }); + dataConfigToLabelBhv.batchDelete(fctltmList, op -> { + op.setRefresh(true); + }); + } + if (roleTypeIds != null) { + final List fctrtmList = dataConfigToRoleBhv.selectList(fctrtmCb -> { + fctrtmCb.query().setDataConfigId_Equal(dataConfigId); + }); + final List newList = new ArrayList(); + final List matchedList = new ArrayList(); + for (final String id : roleTypeIds) { + boolean exist = false; + for (final DataConfigToRole mapping : fctrtmList) { + if (mapping.getRoleTypeId().equals(id)) { + exist = true; + matchedList.add(mapping); + break; + } + } + if (!exist) { + // new + final DataConfigToRole mapping = new DataConfigToRole(); + mapping.setDataConfigId(dataConfigId); + mapping.setRoleTypeId(id); + newList.add(mapping); + } + } + fctrtmList.removeAll(matchedList); + dataConfigToRoleBhv.batchInsert(newList, op -> { + op.setRefresh(true); + }); + dataConfigToRoleBhv.batchDelete(fctrtmList, op -> { + op.setRefresh(true); + }); + } + } + } + + protected void setupListCondition(final DataConfigCB cb, final DataConfigPager dataConfigPager) { + if (dataConfigPager.id != null) { + cb.query().docMeta().setId_Equal(dataConfigPager.id); + } + // TODO Long, Integer, String supported only. + + // setup condition + cb.query().addOrderBy_SortOrder_Asc(); + + // search + + } + + protected void setupEntityCondition(final DataConfigCB cb, final Map keys) { + + // setup condition + + } + + protected void setupStoreCondition(final DataConfig dataConfig) { + + // setup condition + + } + + protected void setupDeleteCondition(final DataConfig dataConfig) { + + // setup condition + + } + + public DataConfig getDataConfig(final String id) { + return dataConfigBhv.selectEntity(cb -> { + cb.query().docMeta().setId_Equal(id); + }).orElse(null);//TODO + } + +} diff --git a/src/main/java/org/codelibs/fess/service/DataCrawlingConfigService.java b/src/main/java/org/codelibs/fess/service/DataCrawlingConfigService.java deleted file mode 100644 index b2f14b05c..000000000 --- a/src/main/java/org/codelibs/fess/service/DataCrawlingConfigService.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.service; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; - -import org.codelibs.fess.Constants; -import org.codelibs.fess.crud.CommonConstants; -import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.db.cbean.DataCrawlingConfigCB; -import org.codelibs.fess.db.exbhv.DataConfigToLabelTypeMappingBhv; -import org.codelibs.fess.db.exbhv.DataConfigToRoleTypeMappingBhv; -import org.codelibs.fess.db.exbhv.DataCrawlingConfigBhv; -import org.codelibs.fess.db.exentity.DataConfigToLabelTypeMapping; -import org.codelibs.fess.db.exentity.DataConfigToRoleTypeMapping; -import org.codelibs.fess.db.exentity.DataCrawlingConfig; -import org.codelibs.fess.pager.DataCrawlingConfigPager; -import org.dbflute.cbean.result.PagingResultBean; -import org.seasar.framework.beans.util.Beans; - -public class DataCrawlingConfigService implements Serializable { - - private static final long serialVersionUID = 1L; - - @Resource - protected DataConfigToRoleTypeMappingBhv dataConfigToRoleTypeMappingBhv; - - @Resource - protected DataConfigToLabelTypeMappingBhv dataConfigToLabelTypeMappingBhv; - - @Resource - protected DataCrawlingConfigBhv dataCrawlingConfigBhv; - - public DataCrawlingConfigService() { - super(); - } - - public List getDataCrawlingConfigList(final DataCrawlingConfigPager dataCrawlingConfigPager) { - - final PagingResultBean dataCrawlingConfigList = dataCrawlingConfigBhv.selectPage(cb -> { - cb.paging(dataCrawlingConfigPager.getPageSize(), dataCrawlingConfigPager.getCurrentPageNumber()); - - setupListCondition(cb, dataCrawlingConfigPager); - }); - - // update pager - Beans.copy(dataCrawlingConfigList, dataCrawlingConfigPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - dataCrawlingConfigPager.setPageNumberList(dataCrawlingConfigList.pageRange(op -> { - op.rangeSize(5); - }).createPageNumberList()); - - return dataCrawlingConfigList; - } - - public void delete(final DataCrawlingConfig dataCrawlingConfig) throws CrudMessageException { - setupDeleteCondition(dataCrawlingConfig); - - dataCrawlingConfigBhv.delete(dataCrawlingConfig); - - } - - public List getAllDataCrawlingConfigList() { - return getAllDataCrawlingConfigList(true, true, true, null); - } - - public List getDataCrawlingConfigListByIds(final List idList) { - if (idList == null) { - return getAllDataCrawlingConfigList(); - } else { - return getAllDataCrawlingConfigList(true, true, false, idList); - } - } - - public List getAllDataCrawlingConfigList(final boolean withLabelType, final boolean withRoleType, - final boolean available, final List idList) { - final List list = dataCrawlingConfigBhv.selectList(cb -> { - cb.query().setDeletedBy_IsNull(); - if (available) { - cb.query().setAvailable_Equal(Constants.T); - } - if (idList != null) { - cb.query().setId_InScope(idList); - } - }); - if (withRoleType) { - dataCrawlingConfigBhv.loadDataConfigToRoleTypeMapping(list, cb -> { - cb.setupSelect_RoleType(); - cb.query().queryRoleType().setDeletedBy_IsNull(); - cb.query().queryRoleType().addOrderBy_SortOrder_Asc(); - }); - } - if (withLabelType) { - dataCrawlingConfigBhv.loadDataConfigToLabelTypeMapping(list, cb -> { - cb.setupSelect_LabelType(); - cb.query().queryLabelType().setDeletedBy_IsNull(); - cb.query().queryLabelType().addOrderBy_SortOrder_Asc(); - }); - } - return list; - } - - public DataCrawlingConfig getDataCrawlingConfig(final Map keys) { - - final DataCrawlingConfig dataCrawlingConfig = dataCrawlingConfigBhv.selectEntity(cb -> { - cb.query().setId_Equal(Long.parseLong(keys.get("id"))); - setupEntityCondition(cb, keys); - }).orElse(null);//TODO - - if (dataCrawlingConfig != null) { - - final List fctrtmList = dataConfigToRoleTypeMappingBhv.selectList(fctrtmCb -> { - fctrtmCb.query().setDataConfigId_Equal(dataCrawlingConfig.getId()); - fctrtmCb.query().queryRoleType().setDeletedBy_IsNull(); - fctrtmCb.query().queryDataCrawlingConfig().setDeletedBy_IsNull(); - }); - if (!fctrtmList.isEmpty()) { - final List roleTypeIds = new ArrayList(fctrtmList.size()); - for (final DataConfigToRoleTypeMapping mapping : fctrtmList) { - roleTypeIds.add(Long.toString(mapping.getRoleTypeId())); - } - dataCrawlingConfig.setRoleTypeIds(roleTypeIds.toArray(new String[roleTypeIds.size()])); - } - - final List fctltmList = dataConfigToLabelTypeMappingBhv.selectList(fctltmCb -> { - fctltmCb.query().setDataConfigId_Equal(dataCrawlingConfig.getId()); - fctltmCb.query().queryLabelType().setDeletedBy_IsNull(); - fctltmCb.query().queryDataCrawlingConfig().setDeletedBy_IsNull(); - }); - if (!fctltmList.isEmpty()) { - final List labelTypeIds = new ArrayList(fctltmList.size()); - for (final DataConfigToLabelTypeMapping mapping : fctltmList) { - labelTypeIds.add(Long.toString(mapping.getLabelTypeId())); - } - dataCrawlingConfig.setLabelTypeIds(labelTypeIds.toArray(new String[labelTypeIds.size()])); - } - - } - - return dataCrawlingConfig; - } - - public void store(final DataCrawlingConfig dataCrawlingConfig) { - final boolean isNew = dataCrawlingConfig.getId() == null; - final String[] labelTypeIds = dataCrawlingConfig.getLabelTypeIds(); - final String[] roleTypeIds = dataCrawlingConfig.getRoleTypeIds(); - setupStoreCondition(dataCrawlingConfig); - - dataCrawlingConfigBhv.insertOrUpdate(dataCrawlingConfig); - final Long dataConfigId = dataCrawlingConfig.getId(); - if (isNew) { - // Insert - if (labelTypeIds != null) { - final List fctltmList = new ArrayList(); - for (final String labelTypeId : labelTypeIds) { - final DataConfigToLabelTypeMapping mapping = new DataConfigToLabelTypeMapping(); - mapping.setDataConfigId(dataConfigId); - mapping.setLabelTypeId(Long.parseLong(labelTypeId)); - fctltmList.add(mapping); - } - dataConfigToLabelTypeMappingBhv.batchInsert(fctltmList); - } - if (roleTypeIds != null) { - final List fctrtmList = new ArrayList(); - for (final String roleTypeId : roleTypeIds) { - final DataConfigToRoleTypeMapping mapping = new DataConfigToRoleTypeMapping(); - mapping.setDataConfigId(dataConfigId); - mapping.setRoleTypeId(Long.parseLong(roleTypeId)); - fctrtmList.add(mapping); - } - dataConfigToRoleTypeMappingBhv.batchInsert(fctrtmList); - } - } else { - // Update - if (labelTypeIds != null) { - final List fctltmList = dataConfigToLabelTypeMappingBhv.selectList(fctltmCb -> { - fctltmCb.query().setDataConfigId_Equal(dataConfigId); - }); - final List newList = new ArrayList(); - final List matchedList = new ArrayList(); - for (final String id : labelTypeIds) { - final Long labelTypeId = Long.parseLong(id); - boolean exist = false; - for (final DataConfigToLabelTypeMapping mapping : fctltmList) { - if (mapping.getLabelTypeId().equals(labelTypeId)) { - exist = true; - matchedList.add(mapping); - break; - } - } - if (!exist) { - // new - final DataConfigToLabelTypeMapping mapping = new DataConfigToLabelTypeMapping(); - mapping.setDataConfigId(dataConfigId); - mapping.setLabelTypeId(Long.parseLong(id)); - newList.add(mapping); - } - } - fctltmList.removeAll(matchedList); - dataConfigToLabelTypeMappingBhv.batchInsert(newList); - dataConfigToLabelTypeMappingBhv.batchDelete(fctltmList); - } - if (roleTypeIds != null) { - final List fctrtmList = dataConfigToRoleTypeMappingBhv.selectList(fctrtmCb -> { - fctrtmCb.query().setDataConfigId_Equal(dataConfigId); - }); - final List newList = new ArrayList(); - final List matchedList = new ArrayList(); - for (final String id : roleTypeIds) { - final Long roleTypeId = Long.parseLong(id); - boolean exist = false; - for (final DataConfigToRoleTypeMapping mapping : fctrtmList) { - if (mapping.getRoleTypeId().equals(roleTypeId)) { - exist = true; - matchedList.add(mapping); - break; - } - } - if (!exist) { - // new - final DataConfigToRoleTypeMapping mapping = new DataConfigToRoleTypeMapping(); - mapping.setDataConfigId(dataConfigId); - mapping.setRoleTypeId(Long.parseLong(id)); - newList.add(mapping); - } - } - fctrtmList.removeAll(matchedList); - dataConfigToRoleTypeMappingBhv.batchInsert(newList); - dataConfigToRoleTypeMappingBhv.batchDelete(fctrtmList); - } - } - } - - protected void setupListCondition(final DataCrawlingConfigCB cb, final DataCrawlingConfigPager dataCrawlingConfigPager) { - if (dataCrawlingConfigPager.id != null) { - cb.query().setId_Equal(Long.parseLong(dataCrawlingConfigPager.id)); - } - // TODO Long, Integer, String supported only. - - // setup condition - cb.query().setDeletedBy_IsNull(); - cb.query().addOrderBy_SortOrder_Asc(); - - // search - - } - - protected void setupEntityCondition(final DataCrawlingConfigCB cb, final Map keys) { - - // setup condition - cb.query().setDeletedBy_IsNull(); - - } - - protected void setupStoreCondition(final DataCrawlingConfig dataCrawlingConfig) { - - // setup condition - - } - - protected void setupDeleteCondition(final DataCrawlingConfig dataCrawlingConfig) { - - // setup condition - - } - - public DataCrawlingConfig getDataCrawlingConfig(final long id) { - return dataCrawlingConfigBhv.selectEntity(cb -> { - cb.query().setId_Equal(id); - cb.query().setDeletedBy_IsNull(); - }).orElse(null);//TODO - } - -} diff --git a/src/main/java/org/codelibs/fess/service/FailureUrlService.java b/src/main/java/org/codelibs/fess/service/FailureUrlService.java index 959379b60..7eb15506e 100644 --- a/src/main/java/org/codelibs/fess/service/FailureUrlService.java +++ b/src/main/java/org/codelibs/fess/service/FailureUrlService.java @@ -32,10 +32,10 @@ import org.codelibs.core.misc.DynamicProperties; import org.codelibs.fess.Constants; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.db.cbean.FailureUrlCB; -import org.codelibs.fess.db.exbhv.FailureUrlBhv; -import org.codelibs.fess.db.exentity.CrawlingConfig; -import org.codelibs.fess.db.exentity.FailureUrl; +import org.codelibs.fess.es.cbean.FailureUrlCB; +import org.codelibs.fess.es.exbhv.FailureUrlBhv; +import org.codelibs.fess.es.exentity.CrawlingConfig; +import org.codelibs.fess.es.exentity.FailureUrl; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.pager.FailureUrlPager; import org.codelibs.fess.util.ComponentUtil; @@ -76,7 +76,7 @@ public class FailureUrlService implements Serializable { public FailureUrl getFailureUrl(final Map keys) { final FailureUrl failureUrl = failureUrlBhv.selectEntity(cb -> { - cb.query().setId_Equal(Long.parseLong(keys.get("id"))); + cb.query().docMeta().setId_Equal(keys.get("id")); setupEntityCondition(cb, keys); }).orElse(null); if (failureUrl == null) { @@ -90,20 +90,24 @@ public class FailureUrlService implements Serializable { public void store(final FailureUrl failureUrl) throws CrudMessageException { setupStoreCondition(failureUrl); - failureUrlBhv.insertOrUpdate(failureUrl); + failureUrlBhv.insertOrUpdate(failureUrl, op -> { + op.setRefresh(true); + }); } public void delete(final FailureUrl failureUrl) throws CrudMessageException { setupDeleteCondition(failureUrl); - failureUrlBhv.delete(failureUrl); + failureUrlBhv.delete(failureUrl, op -> { + op.setRefresh(true); + }); } protected void setupListCondition(final FailureUrlCB cb, final FailureUrlPager failureUrlPager) { if (failureUrlPager.id != null) { - cb.query().setId_Equal(Long.parseLong(failureUrlPager.id)); + cb.query().docMeta().setId_Equal(failureUrlPager.id); } // TODO Long, Integer, String supported only. @@ -132,17 +136,15 @@ public class FailureUrlService implements Serializable { } public void deleteAll(final FailureUrlPager failureUrlPager) { - failureUrlBhv.varyingQueryDelete(cb -> { + failureUrlBhv.queryDelete(cb -> { buildSearchCondition(failureUrlPager, cb); - }, op -> { - op.allowNonQueryDelete(); }); } private void buildSearchCondition(final FailureUrlPager failureUrlPager, final FailureUrlCB cb) { // search if (StringUtil.isNotBlank(failureUrlPager.url)) { - cb.query().setUrl_LikeSearch(failureUrlPager.url, op -> op.likeContain()); + cb.query().setUrl_Match(failureUrlPager.url); } if (StringUtil.isNotBlank(failureUrlPager.errorCountMax)) { @@ -153,7 +155,7 @@ public class FailureUrlService implements Serializable { } if (StringUtil.isNotBlank(failureUrlPager.errorName)) { - cb.query().setErrorName_LikeSearch(failureUrlPager.errorName, op -> op.likeContain()); + cb.query().setErrorName_Match(failureUrlPager.errorName); } } @@ -201,9 +203,9 @@ public class FailureUrlService implements Serializable { } public void deleteByConfigId(final String configId) { - failureUrlBhv.varyingQueryDelete(cb -> { + failureUrlBhv.queryDelete(cb -> { cb.query().setConfigId_Equal(configId); - }, op -> op.allowNonQueryDelete()); + }); } public void store(final CrawlingConfig crawlingConfig, final String errorName, final String url, final Throwable e) { @@ -229,7 +231,7 @@ public class FailureUrlService implements Serializable { failureUrl.setErrorName(errorName); failureUrl.setErrorLog(StringUtils.abbreviate(getStackTrace(e), 4000)); - failureUrl.setLastAccessTime(ComponentUtil.getSystemHelper().getCurrentTime()); + failureUrl.setLastAccessTime(ComponentUtil.getSystemHelper().getCurrentTimeAsLong()); failureUrl.setThreadName(Thread.currentThread().getName()); failureUrlBhv.insertOrUpdate(failureUrl); diff --git a/src/main/java/org/codelibs/fess/service/FavoriteLogService.java b/src/main/java/org/codelibs/fess/service/FavoriteLogService.java deleted file mode 100644 index 60c48e2c2..000000000 --- a/src/main/java/org/codelibs/fess/service/FavoriteLogService.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.service; - -import java.io.IOException; -import java.io.Serializable; -import java.io.Writer; -import java.sql.Timestamp; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.time.format.DateTimeParseException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.codelibs.core.CoreLibConstants; -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.crud.CommonConstants; -import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.db.cbean.FavoriteLogCB; -import org.codelibs.fess.db.exbhv.FavoriteLogBhv; -import org.codelibs.fess.db.exbhv.UserInfoBhv; -import org.codelibs.fess.db.exentity.FavoriteLog; -import org.codelibs.fess.db.exentity.UserInfo; -import org.codelibs.fess.pager.FavoriteLogPager; -import org.codelibs.fess.util.ComponentUtil; -import org.dbflute.bhv.readable.EntityRowHandler; -import org.dbflute.cbean.result.ListResultBean; -import org.dbflute.cbean.result.PagingResultBean; -import org.seasar.framework.beans.util.Beans; - -import com.ibm.icu.text.SimpleDateFormat; - -import jp.sf.orangesignal.csv.CsvConfig; -import jp.sf.orangesignal.csv.CsvWriter; - -public class FavoriteLogService implements Serializable { - private static final Log log = LogFactory.getLog(FavoriteLogService.class); - - private static final long serialVersionUID = 1L; - - @Resource - protected UserInfoBhv userInfoBhv; - - @Resource - protected FavoriteLogBhv favoriteLogBhv; - - public FavoriteLogService() { - super(); - } - - public List getFavoriteLogList(final FavoriteLogPager favoriteLogPager) { - - final PagingResultBean favoriteLogList = favoriteLogBhv.selectPage(cb -> { - cb.paging(favoriteLogPager.getPageSize(), favoriteLogPager.getCurrentPageNumber()); - setupListCondition(cb, favoriteLogPager); - }); - - // update pager - Beans.copy(favoriteLogList, favoriteLogPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - favoriteLogPager.setPageNumberList(favoriteLogList.pageRange(op -> { - op.rangeSize(5); - }).createPageNumberList()); - - return favoriteLogList; - } - - public FavoriteLog getFavoriteLog(final Map keys) { - final FavoriteLog favoriteLog = favoriteLogBhv.selectEntity(cb -> { - cb.query().setId_Equal(Long.parseLong(keys.get("id"))); - setupEntityCondition(cb, keys); - }).orElse(null);//TODO - if (favoriteLog == null) { - // TODO exception? - return null; - } - - return favoriteLog; - } - - public void store(final FavoriteLog favoriteLog) throws CrudMessageException { - setupStoreCondition(favoriteLog); - - favoriteLogBhv.insertOrUpdate(favoriteLog); - - } - - public void delete(final FavoriteLog favoriteLog) throws CrudMessageException { - setupDeleteCondition(favoriteLog); - - favoriteLogBhv.delete(favoriteLog); - - } - - protected void setupListCondition(final FavoriteLogCB cb, final FavoriteLogPager favoriteLogPager) { - if (favoriteLogPager.id != null) { - cb.query().setId_Equal(Long.parseLong(favoriteLogPager.id)); - } - // TODO Long, Integer, String supported only. - - cb.setupSelect_UserInfo(); - - cb.query().addOrderBy_CreatedTime_Desc(); - - // setup condition - - // search - buildSearchCondition(favoriteLogPager, cb); - } - - protected void setupEntityCondition(final FavoriteLogCB cb, final Map keys) { - - // setup condition - - } - - protected void setupStoreCondition(final FavoriteLog favoriteLog) { - - // setup condition - - } - - protected void setupDeleteCondition(final FavoriteLog favoriteLog) { - - // setup condition - - } - - public boolean addUrl(final String userCode, final String url) { - final UserInfo userInfo = userInfoBhv.selectEntity(cb -> { - cb.query().setCode_Equal(userCode); - }).orElse(null);//TODO - - if (userInfo != null) { - final FavoriteLog favoriteLog = new FavoriteLog(); - favoriteLog.setUserId(userInfo.getId()); - favoriteLog.setUrl(url); - favoriteLog.setCreatedTime(ComponentUtil.getSystemHelper().getCurrentTime()); - favoriteLogBhv.insert(favoriteLog); - return true; - } - - return false; - } - - public List getUrlList(final String userCode, final List urlList) { - if (urlList.isEmpty()) { - return urlList; - } - - final UserInfo userInfo = userInfoBhv.selectEntity(cb -> { - cb.query().setCode_Equal(userCode); - }).orElse(null);//TODO - - if (userInfo != null) { - final ListResultBean list = favoriteLogBhv.selectList(cb2 -> { - cb2.query().setUserId_Equal(userInfo.getId()); - cb2.query().setUrl_InScope(urlList); - }); - if (!list.isEmpty()) { - final List newUrlList = new ArrayList(list.size()); - for (final FavoriteLog favoriteLog : list) { - newUrlList.add(favoriteLog.getUrl()); - } - return newUrlList; - } - } - - return Collections.emptyList(); - } - - public void deleteAll(final FavoriteLogPager favoriteLogPager) { - favoriteLogBhv.varyingQueryDelete(cb1 -> { - buildSearchCondition(favoriteLogPager, cb1); - }, op -> op.allowNonQueryDelete()); - } - - private void buildSearchCondition(final FavoriteLogPager favoriteLogPager, final FavoriteLogCB cb) { - - if (StringUtil.isNotBlank(favoriteLogPager.userCode)) { - cb.setupSelect_UserInfo(); - cb.query().queryUserInfo().setCode_Equal(favoriteLogPager.userCode); - } - - if (StringUtil.isNotBlank(favoriteLogPager.startDate)) { - final StringBuilder buf = new StringBuilder(20); - buf.append(favoriteLogPager.startDate); - buf.append('+'); - if (StringUtil.isNotBlank(favoriteLogPager.startHour)) { - buf.append(favoriteLogPager.startHour); - } else { - buf.append("00"); - } - buf.append(':'); - if (StringUtil.isNotBlank(favoriteLogPager.startMin)) { - buf.append(favoriteLogPager.startMin); - } else { - buf.append("00"); - } - - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd+HH:mm"); - try { - cb.query().setCreatedTime_GreaterEqual(LocalDateTime.parse(buf.toString(), formatter)); - } catch (final DateTimeParseException e) { - favoriteLogPager.startDate = null; - favoriteLogPager.startHour = null; - favoriteLogPager.startMin = null; - } - } - - if (StringUtil.isNotBlank(favoriteLogPager.endDate)) { - final StringBuilder buf = new StringBuilder(20); - buf.append(favoriteLogPager.endDate); - buf.append('+'); - if (StringUtil.isNotBlank(favoriteLogPager.endHour)) { - buf.append(favoriteLogPager.endHour); - } else { - buf.append("00"); - } - buf.append(':'); - if (StringUtil.isNotBlank(favoriteLogPager.endMin)) { - buf.append(favoriteLogPager.endMin); - } else { - buf.append("00"); - } - - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd+HH:mm"); - try { - cb.query().setCreatedTime_LessThan(LocalDateTime.parse(buf.toString(), formatter)); - } catch (final DateTimeParseException e) { - favoriteLogPager.endDate = null; - favoriteLogPager.endHour = null; - favoriteLogPager.endMin = null; - } - } - - } - - public void dump(final Writer writer, final FavoriteLogPager favoriteLogPager) { - final CsvConfig cfg = new CsvConfig(',', '"', '"'); - cfg.setEscapeDisabled(false); - cfg.setQuoteDisabled(false); - final CsvWriter csvWriter = new CsvWriter(writer, cfg); - try { - final List list = new ArrayList(); - list.add("UserCode"); - list.add("URL"); - list.add("Date"); - csvWriter.writeValues(list); - final SimpleDateFormat sdf = new SimpleDateFormat(CoreLibConstants.DATE_FORMAT_ISO_8601_EXTEND); - favoriteLogBhv.selectCursor(cb -> { - if (favoriteLogPager != null) { - buildSearchCondition(favoriteLogPager, cb); - } - }, new EntityRowHandler() { - @Override - public void handle(final FavoriteLog entity) { - final UserInfo userInfo = userInfoBhv.selectEntity(cb2 -> cb2.query().setId_Equal(entity.getId())).orElse(null);//TODO - String userCode; - if (userInfo == null) { - userCode = StringUtil.EMPTY; - } else { - userCode = userInfo.getCode(); - } - - final List list = new ArrayList(); - addToList(list, userCode); - addToList(list, entity.getUrl()); - addToList(list, entity.getCreatedTime()); - try { - csvWriter.writeValues(list); - } catch (final IOException e) { - log.warn("Failed to write a search log: " + entity, e); - } - } - - private void addToList(final List list, final Object value) { - if (value == null) { - list.add(StringUtil.EMPTY); - } else if (value instanceof Timestamp) { - list.add(sdf.format((Date) value)); - } else { - list.add(value.toString()); - } - } - }); - csvWriter.flush(); - } catch (final IOException e) { - log.warn("Failed to write a favorite log.", e); - } - } -} diff --git a/src/main/java/org/codelibs/fess/service/FileAuthenticationService.java b/src/main/java/org/codelibs/fess/service/FileAuthenticationService.java index 6bb004825..55574049c 100644 --- a/src/main/java/org/codelibs/fess/service/FileAuthenticationService.java +++ b/src/main/java/org/codelibs/fess/service/FileAuthenticationService.java @@ -24,9 +24,9 @@ import javax.annotation.Resource; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.db.cbean.FileAuthenticationCB; -import org.codelibs.fess.db.exbhv.FileAuthenticationBhv; -import org.codelibs.fess.db.exentity.FileAuthentication; +import org.codelibs.fess.es.cbean.FileAuthenticationCB; +import org.codelibs.fess.es.exbhv.FileAuthenticationBhv; +import org.codelibs.fess.es.exentity.FileAuthentication; import org.codelibs.fess.pager.FileAuthenticationPager; import org.dbflute.cbean.result.PagingResultBean; import org.seasar.framework.beans.util.Beans; @@ -60,7 +60,7 @@ public class FileAuthenticationService implements Serializable { public FileAuthentication getFileAuthentication(final Map keys) { final FileAuthentication fileAuthentication = fileAuthenticationBhv.selectEntity(cb -> { - cb.query().setId_Equal(Long.parseLong(keys.get("id"))); + cb.query().docMeta().setId_Equal(keys.get("id")); setupEntityCondition(cb, keys); }).orElse(null);//TODO if (fileAuthentication == null) { @@ -74,28 +74,29 @@ public class FileAuthenticationService implements Serializable { public void store(final FileAuthentication fileAuthentication) throws CrudMessageException { setupStoreCondition(fileAuthentication); - fileAuthenticationBhv.insertOrUpdate(fileAuthentication); + fileAuthenticationBhv.insertOrUpdate(fileAuthentication, op -> { + op.setRefresh(true); + }); } public void delete(final FileAuthentication fileAuthentication) throws CrudMessageException { setupDeleteCondition(fileAuthentication); - fileAuthenticationBhv.delete(fileAuthentication); + fileAuthenticationBhv.delete(fileAuthentication, op -> { + op.setRefresh(true); + }); } protected void setupListCondition(final FileAuthenticationCB cb, final FileAuthenticationPager fileAuthenticationPager) { if (fileAuthenticationPager.id != null) { - cb.query().setId_Equal(Long.parseLong(fileAuthenticationPager.id)); + cb.query().docMeta().setId_Equal(fileAuthenticationPager.id); } // TODO Long, Integer, String supported only. // setup condition - cb.setupSelect_FileCrawlingConfig(); - cb.query().setDeletedBy_IsNull(); cb.query().addOrderBy_Hostname_Asc(); - cb.query().addOrderBy_FileCrawlingConfigId_Asc(); // search @@ -104,7 +105,6 @@ public class FileAuthenticationService implements Serializable { protected void setupEntityCondition(final FileAuthenticationCB cb, final Map keys) { // setup condition - cb.query().setDeletedBy_IsNull(); } @@ -120,9 +120,9 @@ public class FileAuthenticationService implements Serializable { } - public List getFileAuthenticationList(final Long fileCrawlingConfigId) { + public List getFileAuthenticationList(final String fileConfigId) { return fileAuthenticationBhv.selectList(cb -> { - cb.query().setFileCrawlingConfigId_Equal(fileCrawlingConfigId); + cb.query().setFileConfigId_Equal(fileConfigId); }); } } diff --git a/src/main/java/org/codelibs/fess/service/FileConfigService.java b/src/main/java/org/codelibs/fess/service/FileConfigService.java new file mode 100644 index 000000000..0f9902f54 --- /dev/null +++ b/src/main/java/org/codelibs/fess/service/FileConfigService.java @@ -0,0 +1,282 @@ +/* + * Copyright 2009-2015 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 org.codelibs.fess.service; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import javax.annotation.Resource; + +import org.codelibs.fess.Constants; +import org.codelibs.fess.crud.CommonConstants; +import org.codelibs.fess.crud.CrudMessageException; +import org.codelibs.fess.es.cbean.FileConfigCB; +import org.codelibs.fess.es.exbhv.FileConfigBhv; +import org.codelibs.fess.es.exbhv.FileConfigToLabelBhv; +import org.codelibs.fess.es.exbhv.FileConfigToRoleBhv; +import org.codelibs.fess.es.exentity.FileConfig; +import org.codelibs.fess.es.exentity.FileConfigToLabel; +import org.codelibs.fess.es.exentity.FileConfigToRole; +import org.codelibs.fess.pager.FileConfigPager; +import org.dbflute.cbean.result.PagingResultBean; +import org.seasar.framework.beans.util.Beans; + +public class FileConfigService implements Serializable { + + private static final long serialVersionUID = 1L; + + @Resource + protected FileConfigToRoleBhv fileConfigToRoleBhv; + + @Resource + protected FileConfigToLabelBhv fileConfigToLabelBhv; + + @Resource + protected FileConfigBhv fileConfigBhv; + + public FileConfigService() { + super(); + } + + public List getFileConfigList(final FileConfigPager fileConfigPager) { + + final PagingResultBean fileConfigList = fileConfigBhv.selectPage(cb -> { + cb.paging(fileConfigPager.getPageSize(), fileConfigPager.getCurrentPageNumber()); + setupListCondition(cb, fileConfigPager); + }); + + // update pager + Beans.copy(fileConfigList, fileConfigPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); + fileConfigPager.setPageNumberList(fileConfigList.pageRange(op -> { + op.rangeSize(5); + }).createPageNumberList()); + + return fileConfigList; + } + + public void delete(final FileConfig fileConfig) throws CrudMessageException { + setupDeleteCondition(fileConfig); + + fileConfigBhv.delete(fileConfig, op -> { + op.setRefresh(true); + }); + + } + + public List getAllFileConfigList() { + return getAllFileConfigList(true, true, true, null); + } + + public List getFileConfigListByIds(final List idList) { + if (idList == null) { + return getAllFileConfigList(); + } else { + return getAllFileConfigList(true, true, false, idList); + } + } + + public List getAllFileConfigList(final boolean withLabelType, final boolean withRoleType, final boolean available, + final List idList) { + final List list = fileConfigBhv.selectList(cb -> { + if (available) { + cb.query().setAvailable_Equal(Constants.T); + } + if (idList != null) { + cb.query().setId_InScope(idList); + } + }); + return list; + } + + public FileConfig getFileConfig(final Map keys) { + final FileConfig fileConfig = fileConfigBhv.selectEntity(cb -> { + cb.query().docMeta().setId_Equal(keys.get("id")); + setupEntityCondition(cb, keys); + }).orElse(null);//TODO + + if (fileConfig != null) { + + final List fctrtmList = fileConfigToRoleBhv.selectList(fctrtmCb -> { + fctrtmCb.query().setFileConfigId_Equal(fileConfig.getId()); + }); + if (!fctrtmList.isEmpty()) { + final List roleTypeIds = new ArrayList(fctrtmList.size()); + for (final FileConfigToRole mapping : fctrtmList) { + roleTypeIds.add(mapping.getRoleTypeId()); + } + fileConfig.setRoleTypeIds(roleTypeIds.toArray(new String[roleTypeIds.size()])); + } + + final List fctltmList = fileConfigToLabelBhv.selectList(fctltmCb -> { + fctltmCb.query().setFileConfigId_Equal(fileConfig.getId()); + }); + if (!fctltmList.isEmpty()) { + final List labelTypeIds = new ArrayList(fctltmList.size()); + for (final FileConfigToLabel mapping : fctltmList) { + labelTypeIds.add(mapping.getLabelTypeId()); + } + fileConfig.setLabelTypeIds(labelTypeIds.toArray(new String[labelTypeIds.size()])); + } + + } + + return fileConfig; + } + + public void store(final FileConfig fileConfig) { + final boolean isNew = fileConfig.getId() == null; + final String[] labelTypeIds = fileConfig.getLabelTypeIds(); + final String[] roleTypeIds = fileConfig.getRoleTypeIds(); + setupStoreCondition(fileConfig); + + fileConfigBhv.insertOrUpdate(fileConfig, op -> { + op.setRefresh(true); + }); + final String fileConfigId = fileConfig.getId(); + if (isNew) { + // Insert + if (labelTypeIds != null) { + final List fctltmList = new ArrayList(); + for (final String labelTypeId : labelTypeIds) { + final FileConfigToLabel mapping = new FileConfigToLabel(); + mapping.setFileConfigId(fileConfigId); + mapping.setLabelTypeId(labelTypeId); + fctltmList.add(mapping); + } + fileConfigToLabelBhv.batchInsert(fctltmList, op -> { + op.setRefresh(true); + }); + } + if (roleTypeIds != null) { + final List fctrtmList = new ArrayList(); + for (final String roleTypeId : roleTypeIds) { + final FileConfigToRole mapping = new FileConfigToRole(); + mapping.setFileConfigId(fileConfigId); + mapping.setRoleTypeId(roleTypeId); + fctrtmList.add(mapping); + } + fileConfigToRoleBhv.batchInsert(fctrtmList, op -> { + op.setRefresh(true); + }); + } + } else { + // Update + if (labelTypeIds != null) { + final List fctltmList = fileConfigToLabelBhv.selectList(fctltmCb -> { + fctltmCb.query().setFileConfigId_Equal(fileConfigId); + }); + final List newList = new ArrayList(); + final List matchedList = new ArrayList(); + for (final String id : labelTypeIds) { + boolean exist = false; + for (final FileConfigToLabel mapping : fctltmList) { + if (mapping.getLabelTypeId().equals(id)) { + exist = true; + matchedList.add(mapping); + break; + } + } + if (!exist) { + // new + final FileConfigToLabel mapping = new FileConfigToLabel(); + mapping.setFileConfigId(fileConfigId); + mapping.setLabelTypeId(id); + newList.add(mapping); + } + } + fctltmList.removeAll(matchedList); + fileConfigToLabelBhv.batchInsert(newList, op -> { + op.setRefresh(true); + }); + fileConfigToLabelBhv.batchDelete(fctltmList, op -> { + op.setRefresh(true); + }); + } + if (roleTypeIds != null) { + final List fctrtmList = fileConfigToRoleBhv.selectList(fctrtmCb -> { + fctrtmCb.query().setFileConfigId_Equal(fileConfigId); + }); + final List newList = new ArrayList(); + final List matchedList = new ArrayList(); + for (final String id : roleTypeIds) { + boolean exist = false; + for (final FileConfigToRole mapping : fctrtmList) { + if (mapping.getRoleTypeId().equals(id)) { + exist = true; + matchedList.add(mapping); + break; + } + } + if (!exist) { + // new + final FileConfigToRole mapping = new FileConfigToRole(); + mapping.setFileConfigId(fileConfigId); + mapping.setRoleTypeId(id); + newList.add(mapping); + } + } + fctrtmList.removeAll(matchedList); + fileConfigToRoleBhv.batchInsert(newList, op -> { + op.setRefresh(true); + }); + fileConfigToRoleBhv.batchDelete(fctrtmList, op -> { + op.setRefresh(true); + }); + } + } + } + + protected void setupListCondition(final FileConfigCB cb, final FileConfigPager fileConfigPager) { + if (fileConfigPager.id != null) { + cb.query().docMeta().setId_Equal(fileConfigPager.id); + } + // TODO Long, Integer, String supported only. + + // setup condition + cb.query().addOrderBy_SortOrder_Asc(); + + // search + + } + + protected void setupEntityCondition(final FileConfigCB cb, final Map keys) { + + // setup condition + + } + + protected void setupStoreCondition(final FileConfig fileConfig) { + + // setup condition + + } + + protected void setupDeleteCondition(final FileConfig fileConfig) { + + // setup condition + + } + + public FileConfig getFileConfig(final String id) { + return fileConfigBhv.selectEntity(cb -> { + cb.query().docMeta().setId_Equal(id); + }).orElse(null);//TODO + } + +} diff --git a/src/main/java/org/codelibs/fess/service/FileCrawlingConfigService.java b/src/main/java/org/codelibs/fess/service/FileCrawlingConfigService.java deleted file mode 100644 index 255de7df4..000000000 --- a/src/main/java/org/codelibs/fess/service/FileCrawlingConfigService.java +++ /dev/null @@ -1,290 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.service; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; - -import org.codelibs.fess.Constants; -import org.codelibs.fess.crud.CommonConstants; -import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.db.cbean.FileCrawlingConfigCB; -import org.codelibs.fess.db.exbhv.FileConfigToLabelTypeMappingBhv; -import org.codelibs.fess.db.exbhv.FileConfigToRoleTypeMappingBhv; -import org.codelibs.fess.db.exbhv.FileCrawlingConfigBhv; -import org.codelibs.fess.db.exentity.FileConfigToLabelTypeMapping; -import org.codelibs.fess.db.exentity.FileConfigToRoleTypeMapping; -import org.codelibs.fess.db.exentity.FileCrawlingConfig; -import org.codelibs.fess.pager.FileCrawlingConfigPager; -import org.dbflute.cbean.result.PagingResultBean; -import org.seasar.framework.beans.util.Beans; - -public class FileCrawlingConfigService implements Serializable { - - private static final long serialVersionUID = 1L; - - @Resource - protected FileConfigToRoleTypeMappingBhv fileConfigToRoleTypeMappingBhv; - - @Resource - protected FileConfigToLabelTypeMappingBhv fileConfigToLabelTypeMappingBhv; - - @Resource - protected FileCrawlingConfigBhv fileCrawlingConfigBhv; - - public FileCrawlingConfigService() { - super(); - } - - public List getFileCrawlingConfigList(final FileCrawlingConfigPager fileCrawlingConfigPager) { - - final PagingResultBean fileCrawlingConfigList = fileCrawlingConfigBhv.selectPage(cb -> { - cb.paging(fileCrawlingConfigPager.getPageSize(), fileCrawlingConfigPager.getCurrentPageNumber()); - setupListCondition(cb, fileCrawlingConfigPager); - }); - - // update pager - Beans.copy(fileCrawlingConfigList, fileCrawlingConfigPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - fileCrawlingConfigPager.setPageNumberList(fileCrawlingConfigList.pageRange(op -> { - op.rangeSize(5); - }).createPageNumberList()); - - return fileCrawlingConfigList; - } - - public void delete(final FileCrawlingConfig fileCrawlingConfig) throws CrudMessageException { - setupDeleteCondition(fileCrawlingConfig); - - fileCrawlingConfigBhv.delete(fileCrawlingConfig); - - } - - public List getAllFileCrawlingConfigList() { - return getAllFileCrawlingConfigList(true, true, true, null); - } - - public List getFileCrawlingConfigListByIds(final List idList) { - if (idList == null) { - return getAllFileCrawlingConfigList(); - } else { - return getAllFileCrawlingConfigList(true, true, false, idList); - } - } - - public List getAllFileCrawlingConfigList(final boolean withLabelType, final boolean withRoleType, - final boolean available, final List idList) { - final List list = fileCrawlingConfigBhv.selectList(cb -> { - cb.query().setDeletedBy_IsNull(); - if (available) { - cb.query().setAvailable_Equal(Constants.T); - } - if (idList != null) { - cb.query().setId_InScope(idList); - } - }); - if (withRoleType) { - fileCrawlingConfigBhv.loadFileConfigToRoleTypeMapping(list, cb -> { - cb.setupSelect_RoleType(); - cb.query().queryRoleType().setDeletedBy_IsNull(); - cb.query().queryRoleType().addOrderBy_SortOrder_Asc(); - }); - } - if (withLabelType) { - fileCrawlingConfigBhv.loadFileConfigToLabelTypeMapping(list, cb -> { - cb.setupSelect_LabelType(); - cb.query().queryLabelType().setDeletedBy_IsNull(); - cb.query().queryLabelType().addOrderBy_SortOrder_Asc(); - }); - } - return list; - } - - public FileCrawlingConfig getFileCrawlingConfig(final Map keys) { - final FileCrawlingConfig fileCrawlingConfig = fileCrawlingConfigBhv.selectEntity(cb -> { - cb.query().setId_Equal(Long.parseLong(keys.get("id"))); - setupEntityCondition(cb, keys); - }).orElse(null);//TODO - - if (fileCrawlingConfig != null) { - - final List fctrtmList = fileConfigToRoleTypeMappingBhv.selectList(fctrtmCb -> { - fctrtmCb.query().setFileConfigId_Equal(fileCrawlingConfig.getId()); - fctrtmCb.query().queryRoleType().setDeletedBy_IsNull(); - fctrtmCb.query().queryFileCrawlingConfig().setDeletedBy_IsNull(); - }); - if (!fctrtmList.isEmpty()) { - final List roleTypeIds = new ArrayList(fctrtmList.size()); - for (final FileConfigToRoleTypeMapping mapping : fctrtmList) { - roleTypeIds.add(Long.toString(mapping.getRoleTypeId())); - } - fileCrawlingConfig.setRoleTypeIds(roleTypeIds.toArray(new String[roleTypeIds.size()])); - } - - final List fctltmList = fileConfigToLabelTypeMappingBhv.selectList(fctltmCb -> { - fctltmCb.query().setFileConfigId_Equal(fileCrawlingConfig.getId()); - fctltmCb.query().queryLabelType().setDeletedBy_IsNull(); - fctltmCb.query().queryFileCrawlingConfig().setDeletedBy_IsNull(); - }); - if (!fctltmList.isEmpty()) { - final List labelTypeIds = new ArrayList(fctltmList.size()); - for (final FileConfigToLabelTypeMapping mapping : fctltmList) { - labelTypeIds.add(Long.toString(mapping.getLabelTypeId())); - } - fileCrawlingConfig.setLabelTypeIds(labelTypeIds.toArray(new String[labelTypeIds.size()])); - } - - } - - return fileCrawlingConfig; - } - - public void store(final FileCrawlingConfig fileCrawlingConfig) { - final boolean isNew = fileCrawlingConfig.getId() == null; - final String[] labelTypeIds = fileCrawlingConfig.getLabelTypeIds(); - final String[] roleTypeIds = fileCrawlingConfig.getRoleTypeIds(); - setupStoreCondition(fileCrawlingConfig); - - fileCrawlingConfigBhv.insertOrUpdate(fileCrawlingConfig); - final Long fileConfigId = fileCrawlingConfig.getId(); - if (isNew) { - // Insert - if (labelTypeIds != null) { - final List fctltmList = new ArrayList(); - for (final String labelTypeId : labelTypeIds) { - final FileConfigToLabelTypeMapping mapping = new FileConfigToLabelTypeMapping(); - mapping.setFileConfigId(fileConfigId); - mapping.setLabelTypeId(Long.parseLong(labelTypeId)); - fctltmList.add(mapping); - } - fileConfigToLabelTypeMappingBhv.batchInsert(fctltmList); - } - if (roleTypeIds != null) { - final List fctrtmList = new ArrayList(); - for (final String roleTypeId : roleTypeIds) { - final FileConfigToRoleTypeMapping mapping = new FileConfigToRoleTypeMapping(); - mapping.setFileConfigId(fileConfigId); - mapping.setRoleTypeId(Long.parseLong(roleTypeId)); - fctrtmList.add(mapping); - } - fileConfigToRoleTypeMappingBhv.batchInsert(fctrtmList); - } - } else { - // Update - if (labelTypeIds != null) { - final List fctltmList = fileConfigToLabelTypeMappingBhv.selectList(fctltmCb -> { - fctltmCb.query().setFileConfigId_Equal(fileConfigId); - }); - final List newList = new ArrayList(); - final List matchedList = new ArrayList(); - for (final String id : labelTypeIds) { - final Long labelTypeId = Long.parseLong(id); - boolean exist = false; - for (final FileConfigToLabelTypeMapping mapping : fctltmList) { - if (mapping.getLabelTypeId().equals(labelTypeId)) { - exist = true; - matchedList.add(mapping); - break; - } - } - if (!exist) { - // new - final FileConfigToLabelTypeMapping mapping = new FileConfigToLabelTypeMapping(); - mapping.setFileConfigId(fileConfigId); - mapping.setLabelTypeId(Long.parseLong(id)); - newList.add(mapping); - } - } - fctltmList.removeAll(matchedList); - fileConfigToLabelTypeMappingBhv.batchInsert(newList); - fileConfigToLabelTypeMappingBhv.batchDelete(fctltmList); - } - if (roleTypeIds != null) { - final List fctrtmList = fileConfigToRoleTypeMappingBhv.selectList(fctrtmCb -> { - fctrtmCb.query().setFileConfigId_Equal(fileConfigId); - }); - final List newList = new ArrayList(); - final List matchedList = new ArrayList(); - for (final String id : roleTypeIds) { - final Long roleTypeId = Long.parseLong(id); - boolean exist = false; - for (final FileConfigToRoleTypeMapping mapping : fctrtmList) { - if (mapping.getRoleTypeId().equals(roleTypeId)) { - exist = true; - matchedList.add(mapping); - break; - } - } - if (!exist) { - // new - final FileConfigToRoleTypeMapping mapping = new FileConfigToRoleTypeMapping(); - mapping.setFileConfigId(fileConfigId); - mapping.setRoleTypeId(Long.parseLong(id)); - newList.add(mapping); - } - } - fctrtmList.removeAll(matchedList); - fileConfigToRoleTypeMappingBhv.batchInsert(newList); - fileConfigToRoleTypeMappingBhv.batchDelete(fctrtmList); - } - } - } - - protected void setupListCondition(final FileCrawlingConfigCB cb, final FileCrawlingConfigPager fileCrawlingConfigPager) { - if (fileCrawlingConfigPager.id != null) { - cb.query().setId_Equal(Long.parseLong(fileCrawlingConfigPager.id)); - } - // TODO Long, Integer, String supported only. - - // setup condition - cb.query().setDeletedBy_IsNull(); - cb.query().addOrderBy_SortOrder_Asc(); - - // search - - } - - protected void setupEntityCondition(final FileCrawlingConfigCB cb, final Map keys) { - - // setup condition - cb.query().setDeletedBy_IsNull(); - - } - - protected void setupStoreCondition(final FileCrawlingConfig fileCrawlingConfig) { - - // setup condition - - } - - protected void setupDeleteCondition(final FileCrawlingConfig fileCrawlingConfig) { - - // setup condition - - } - - public FileCrawlingConfig getFileCrawlingConfig(final long id) { - return fileCrawlingConfigBhv.selectEntity(cb -> { - cb.query().setId_Equal(id); - cb.query().setDeletedBy_IsNull(); - }).orElse(null);//TODO - } - -} diff --git a/src/main/java/org/codelibs/fess/service/JobLogService.java b/src/main/java/org/codelibs/fess/service/JobLogService.java index 5f8306d5c..171c4ea2e 100644 --- a/src/main/java/org/codelibs/fess/service/JobLogService.java +++ b/src/main/java/org/codelibs/fess/service/JobLogService.java @@ -17,7 +17,6 @@ package org.codelibs.fess.service; import java.io.Serializable; -import java.time.LocalDateTime; import java.util.List; import java.util.Map; @@ -25,9 +24,9 @@ import javax.annotation.Resource; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.db.cbean.JobLogCB; -import org.codelibs.fess.db.exbhv.JobLogBhv; -import org.codelibs.fess.db.exentity.JobLog; +import org.codelibs.fess.es.cbean.JobLogCB; +import org.codelibs.fess.es.exbhv.JobLogBhv; +import org.codelibs.fess.es.exentity.JobLog; import org.codelibs.fess.pager.JobLogPager; import org.codelibs.fess.util.ComponentUtil; import org.dbflute.cbean.result.PagingResultBean; @@ -62,7 +61,7 @@ public class JobLogService implements Serializable { public JobLog getJobLog(final Map keys) { final JobLog jobLog = jobLogBhv.selectEntity(cb -> { - cb.query().setId_Equal(Long.parseLong(keys.get("id"))); + cb.query().docMeta().setId_Equal(keys.get("id")); setupEntityCondition(cb, keys); }).orElse(null);//TODO if (jobLog == null) { @@ -76,20 +75,24 @@ public class JobLogService implements Serializable { public void store(final JobLog jobLog) throws CrudMessageException { setupStoreCondition(jobLog); - jobLogBhv.insertOrUpdate(jobLog); + jobLogBhv.insertOrUpdate(jobLog, op -> { + op.setRefresh(true); + }); } public void delete(final JobLog jobLog) throws CrudMessageException { setupDeleteCondition(jobLog); - jobLogBhv.delete(jobLog); + jobLogBhv.delete(jobLog, op -> { + op.setRefresh(true); + }); } protected void setupListCondition(final JobLogCB cb, final JobLogPager jobLogPager) { if (jobLogPager.id != null) { - cb.query().setId_Equal(Long.parseLong(jobLogPager.id)); + cb.query().docMeta().setId_Equal(jobLogPager.id); } // TODO Long, Integer, String supported only. @@ -120,16 +123,17 @@ public class JobLogService implements Serializable { } public void deleteBefore(final int days) { - final LocalDateTime targetTime = ComponentUtil.getSystemHelper().getCurrentTime().minusDays(days); - jobLogBhv.varyingQueryDelete(cb -> { + final long oneday = 24 * 60 * 60 * 1000; + final long targetTime = ComponentUtil.getSystemHelper().getCurrentTimeAsLong() - days * oneday; + jobLogBhv.queryDelete(cb -> { cb.query().setEndTime_LessThan(targetTime); - }, op -> op.allowNonQueryDelete()); + }); } public void deleteByJobStatus(final List jobStatusList) { - jobLogBhv.varyingQueryDelete(cb -> { + jobLogBhv.queryDelete(cb -> { cb.query().setJobStatus_InScope(jobStatusList); - }, op -> op.allowNonQueryDelete()); + }); } } diff --git a/src/main/java/org/codelibs/fess/service/LabelTypeService.java b/src/main/java/org/codelibs/fess/service/LabelTypeService.java index f075d55d6..ee8c9f8e3 100644 --- a/src/main/java/org/codelibs/fess/service/LabelTypeService.java +++ b/src/main/java/org/codelibs/fess/service/LabelTypeService.java @@ -25,11 +25,11 @@ import javax.annotation.Resource; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.db.cbean.LabelTypeCB; -import org.codelibs.fess.db.exbhv.LabelTypeBhv; -import org.codelibs.fess.db.exbhv.LabelTypeToRoleTypeMappingBhv; -import org.codelibs.fess.db.exentity.LabelType; -import org.codelibs.fess.db.exentity.LabelTypeToRoleTypeMapping; +import org.codelibs.fess.es.cbean.LabelTypeCB; +import org.codelibs.fess.es.exbhv.LabelToRoleBhv; +import org.codelibs.fess.es.exbhv.LabelTypeBhv; +import org.codelibs.fess.es.exentity.LabelToRole; +import org.codelibs.fess.es.exentity.LabelType; import org.codelibs.fess.helper.LabelTypeHelper; import org.codelibs.fess.pager.LabelTypePager; import org.codelibs.fess.util.ComponentUtil; @@ -42,7 +42,7 @@ public class LabelTypeService implements Serializable { private static final long serialVersionUID = 1L; @Resource - protected LabelTypeToRoleTypeMappingBhv labelTypeToRoleTypeMappingBhv; + protected LabelToRoleBhv labelToRoleBhv; @Resource protected LabelTypeBhv labelTypeBhv; @@ -70,18 +70,22 @@ public class LabelTypeService implements Serializable { public void delete(final LabelType labelType) throws CrudMessageException { setupDeleteCondition(labelType); - labelTypeBhv.delete(labelType); + labelTypeBhv.delete(labelType, op -> { + op.setRefresh(true); + }); + labelToRoleBhv.queryDelete(cb -> { + cb.query().setLabelTypeId_Equal(labelType.getId()); + }); } protected void setupListCondition(final LabelTypeCB cb, final LabelTypePager labelTypePager) { if (labelTypePager.id != null) { - cb.query().setId_Equal(Long.parseLong(labelTypePager.id)); + cb.query().docMeta().setId_Equal(labelTypePager.id); } // TODO Long, Integer, String supported only. // setup condition - cb.query().setDeletedBy_IsNull(); cb.query().addOrderBy_SortOrder_Asc(); cb.query().addOrderBy_Name_Asc(); // search @@ -91,7 +95,6 @@ public class LabelTypeService implements Serializable { protected void setupEntityCondition(final LabelTypeCB cb, final Map keys) { // setup condition - cb.query().setDeletedBy_IsNull(); } @@ -109,7 +112,6 @@ public class LabelTypeService implements Serializable { public List getLabelTypeList() { return labelTypeBhv.selectList(cb -> { - cb.query().setDeletedBy_IsNull(); cb.query().addOrderBy_SortOrder_Asc(); cb.query().addOrderBy_Name_Asc(); }); @@ -117,16 +119,10 @@ public class LabelTypeService implements Serializable { public List getLabelTypeListWithRoles() { final ListResultBean labelTypeList = labelTypeBhv.selectList(cb -> { - cb.query().setDeletedBy_IsNull(); cb.query().addOrderBy_SortOrder_Asc(); cb.query().addOrderBy_Name_Asc(); }); - labelTypeBhv.loadLabelTypeToRoleTypeMapping(labelTypeList, cb -> { - cb.setupSelect_RoleType(); - cb.query().queryRoleType().addOrderBy_Value_Asc(); - }); - return labelTypeList; } @@ -135,32 +131,35 @@ public class LabelTypeService implements Serializable { final String[] roleTypeIds = labelType.getRoleTypeIds(); setupStoreCondition(labelType); - labelTypeBhv.insertOrUpdate(labelType); - final Long labelTypeId = labelType.getId(); + labelTypeBhv.insertOrUpdate(labelType, op -> { + op.setRefresh(true); + }); + final String labelTypeId = labelType.getId(); if (isNew) { // Insert if (roleTypeIds != null) { - final List lttrtmList = new ArrayList(); + final List lttrtmList = new ArrayList(); for (final String id : roleTypeIds) { - final LabelTypeToRoleTypeMapping mapping = new LabelTypeToRoleTypeMapping(); + final LabelToRole mapping = new LabelToRole(); mapping.setLabelTypeId(labelTypeId); - mapping.setRoleTypeId(Long.parseLong(id)); + mapping.setRoleTypeId(id); lttrtmList.add(mapping); } - labelTypeToRoleTypeMappingBhv.batchInsert(lttrtmList); + labelToRoleBhv.batchInsert(lttrtmList, op -> { + op.setRefresh(true); + }); } } else { // Update if (roleTypeIds != null) { - final List list = labelTypeToRoleTypeMappingBhv.selectList(lttrtmCb -> { + final List list = labelToRoleBhv.selectList(lttrtmCb -> { lttrtmCb.query().setLabelTypeId_Equal(labelTypeId); }); - final List newList = new ArrayList(); - final List matchedList = new ArrayList(); - for (final String id : roleTypeIds) { - final Long roleTypeId = Long.parseLong(id); + final List newList = new ArrayList(); + final List matchedList = new ArrayList(); + for (final String roleTypeId : roleTypeIds) { boolean exist = false; - for (final LabelTypeToRoleTypeMapping mapping : list) { + for (final LabelToRole mapping : list) { if (mapping.getRoleTypeId().equals(roleTypeId)) { exist = true; matchedList.add(mapping); @@ -169,15 +168,19 @@ public class LabelTypeService implements Serializable { } if (!exist) { // new - final LabelTypeToRoleTypeMapping mapping = new LabelTypeToRoleTypeMapping(); + final LabelToRole mapping = new LabelToRole(); mapping.setLabelTypeId(labelTypeId); mapping.setRoleTypeId(roleTypeId); newList.add(mapping); } } list.removeAll(matchedList); - labelTypeToRoleTypeMappingBhv.batchInsert(newList); - labelTypeToRoleTypeMappingBhv.batchDelete(list); + labelToRoleBhv.batchInsert(newList, op -> { + op.setRefresh(true); + }); + labelToRoleBhv.batchDelete(list, op -> { + op.setRefresh(true); + }); } } @@ -189,19 +192,17 @@ public class LabelTypeService implements Serializable { public LabelType getLabelType(final Map keys) { final LabelType labelType = labelTypeBhv.selectEntity(cb -> { - cb.query().setId_Equal(Long.parseLong(keys.get("id"))); + cb.query().docMeta().setId_Equal(keys.get("id")); setupEntityCondition(cb, keys); }).orElse(null);//TODO if (labelType != null) { - final List wctrtmList = labelTypeToRoleTypeMappingBhv.selectList(wctrtmCb -> { + final List wctrtmList = labelToRoleBhv.selectList(wctrtmCb -> { wctrtmCb.query().setLabelTypeId_Equal(labelType.getId()); - wctrtmCb.query().queryRoleType().setDeletedBy_IsNull(); - wctrtmCb.query().queryLabelType().setDeletedBy_IsNull(); }); if (!wctrtmList.isEmpty()) { final List roleTypeIds = new ArrayList(wctrtmList.size()); - for (final LabelTypeToRoleTypeMapping mapping : wctrtmList) { - roleTypeIds.add(Long.toString(mapping.getRoleTypeId())); + for (final LabelToRole mapping : wctrtmList) { + roleTypeIds.add(mapping.getRoleTypeId()); } labelType.setRoleTypeIds(roleTypeIds.toArray(new String[roleTypeIds.size()])); } diff --git a/src/main/java/org/codelibs/fess/service/RequestHeaderService.java b/src/main/java/org/codelibs/fess/service/RequestHeaderService.java index a3f112530..e956d19f3 100644 --- a/src/main/java/org/codelibs/fess/service/RequestHeaderService.java +++ b/src/main/java/org/codelibs/fess/service/RequestHeaderService.java @@ -96,9 +96,7 @@ public class RequestHeaderService implements Serializable { // TODO Long, Integer, String supported only. // setup condition - // TODO CONFIG cb.setupSelect_WebCrawlingConfig(); cb.query().addOrderBy_Name_Asc(); - // TODO CONFIG cb.query().addOrderBy_WebCrawlingConfigId_Asc(); // search @@ -122,11 +120,10 @@ public class RequestHeaderService implements Serializable { } - public List getRequestHeaderList(final Long webCrawlingConfigId) { + public List getRequestHeaderList(final String webConfigId) { return requestHeaderBhv.selectList(cb -> { - // TODO CONFIG cb.query().setWebCrawlingConfigId_Equal(webCrawlingConfigId); - cb.query().matchAll(); - }); + cb.query().setWebConfigId_Equal(webConfigId); + }); } } diff --git a/src/main/java/org/codelibs/fess/service/RoleTypeService.java b/src/main/java/org/codelibs/fess/service/RoleTypeService.java index b1f660187..1a5d84b8f 100644 --- a/src/main/java/org/codelibs/fess/service/RoleTypeService.java +++ b/src/main/java/org/codelibs/fess/service/RoleTypeService.java @@ -24,9 +24,9 @@ import javax.annotation.Resource; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.db.cbean.RoleTypeCB; -import org.codelibs.fess.db.exbhv.RoleTypeBhv; -import org.codelibs.fess.db.exentity.RoleType; +import org.codelibs.fess.es.cbean.RoleTypeCB; +import org.codelibs.fess.es.exbhv.RoleTypeBhv; +import org.codelibs.fess.es.exentity.RoleType; import org.codelibs.fess.pager.RoleTypePager; import org.dbflute.cbean.result.PagingResultBean; import org.seasar.framework.beans.util.Beans; @@ -60,7 +60,7 @@ public class RoleTypeService implements Serializable { public RoleType getRoleType(final Map keys) { final RoleType roleType = roleTypeBhv.selectEntity(cb -> { - cb.query().setId_Equal(Long.parseLong(keys.get("id"))); + cb.query().docMeta().setId_Equal(keys.get("id")); setupEntityCondition(cb, keys); }).orElse(null);//TODO if (roleType == null) { @@ -74,25 +74,28 @@ public class RoleTypeService implements Serializable { public void store(final RoleType roleType) throws CrudMessageException { setupStoreCondition(roleType); - roleTypeBhv.insertOrUpdate(roleType); + roleTypeBhv.insertOrUpdate(roleType, op -> { + op.setRefresh(true); + }); } public void delete(final RoleType roleType) throws CrudMessageException { setupDeleteCondition(roleType); - roleTypeBhv.delete(roleType); + roleTypeBhv.delete(roleType, op -> { + op.setRefresh(true); + }); } protected void setupListCondition(final RoleTypeCB cb, final RoleTypePager roleTypePager) { if (roleTypePager.id != null) { - cb.query().setId_Equal(Long.parseLong(roleTypePager.id)); + cb.query().docMeta().setId_Equal(roleTypePager.id); } // TODO Long, Integer, String supported only. // setup condition - cb.query().setDeletedBy_IsNull(); cb.query().addOrderBy_SortOrder_Asc(); cb.query().addOrderBy_Name_Asc(); // search @@ -102,7 +105,6 @@ public class RoleTypeService implements Serializable { protected void setupEntityCondition(final RoleTypeCB cb, final Map keys) { // setup condition - cb.query().setDeletedBy_IsNull(); } @@ -120,7 +122,6 @@ public class RoleTypeService implements Serializable { public List getRoleTypeList() { return roleTypeBhv.selectList(cb -> { - cb.query().setDeletedBy_IsNull(); cb.query().addOrderBy_SortOrder_Asc(); cb.query().addOrderBy_Name_Asc(); }); diff --git a/src/main/java/org/codelibs/fess/service/ScheduledJobService.java b/src/main/java/org/codelibs/fess/service/ScheduledJobService.java index c23593f76..396658fdc 100644 --- a/src/main/java/org/codelibs/fess/service/ScheduledJobService.java +++ b/src/main/java/org/codelibs/fess/service/ScheduledJobService.java @@ -25,9 +25,9 @@ import javax.annotation.Resource; import org.codelibs.fess.Constants; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.db.cbean.ScheduledJobCB; -import org.codelibs.fess.db.exbhv.ScheduledJobBhv; -import org.codelibs.fess.db.exentity.ScheduledJob; +import org.codelibs.fess.es.cbean.ScheduledJobCB; +import org.codelibs.fess.es.exbhv.ScheduledJobBhv; +import org.codelibs.fess.es.exentity.ScheduledJob; import org.codelibs.fess.job.JobScheduler; import org.codelibs.fess.pager.ScheduledJobPager; import org.dbflute.cbean.result.PagingResultBean; @@ -62,7 +62,7 @@ public class ScheduledJobService implements Serializable { public ScheduledJob getScheduledJob(final Map keys) { final ScheduledJob scheduledJob = scheduledJobBhv.selectEntity(cb -> { - cb.query().setId_Equal(Long.parseLong(keys.get("id"))); + cb.query().docMeta().setId_Equal(keys.get("id")); setupEntityCondition(cb, keys); }).orElse(null);//TODO if (scheduledJob == null) { @@ -76,7 +76,9 @@ public class ScheduledJobService implements Serializable { public void delete(final ScheduledJob scheduledJob) throws CrudMessageException { setupDeleteCondition(scheduledJob); - scheduledJobBhv.delete(scheduledJob); + scheduledJobBhv.delete(scheduledJob, op -> { + op.setRefresh(true); + }); } @@ -85,12 +87,11 @@ public class ScheduledJobService implements Serializable { protected void setupListCondition(final ScheduledJobCB cb, final ScheduledJobPager scheduledJobPager) { if (scheduledJobPager.id != null) { - cb.query().setId_Equal(Long.parseLong(scheduledJobPager.id)); + cb.query().docMeta().setId_Equal(scheduledJobPager.id); } // TODO Long, Integer, String supported only. // setup condition - cb.query().setDeletedBy_IsNull(); cb.query().addOrderBy_SortOrder_Asc(); cb.query().addOrderBy_Name_Asc(); @@ -101,7 +102,6 @@ public class ScheduledJobService implements Serializable { protected void setupEntityCondition(final ScheduledJobCB cb, final Map keys) { // setup condition - cb.query().setDeletedBy_IsNull(); } @@ -119,7 +119,6 @@ public class ScheduledJobService implements Serializable { public List getScheduledJobList() { return scheduledJobBhv.selectList(cb -> { - cb.query().setDeletedBy_IsNull(); cb.query().addOrderBy_SortOrder_Asc(); cb.query().addOrderBy_Name_Asc(); }); @@ -127,21 +126,19 @@ public class ScheduledJobService implements Serializable { public void store(final ScheduledJob scheduledJob) { final boolean isNew = scheduledJob.getId() == null; - final boolean isDelete = scheduledJob.getDeletedBy() != null; setupStoreCondition(scheduledJob); - scheduledJobBhv.insertOrUpdate(scheduledJob); + scheduledJobBhv.insertOrUpdate(scheduledJob, op -> { + op.setRefresh(true); + }); if (!isNew) { jobScheduler.unregister(scheduledJob); } - if (!isDelete) { - jobScheduler.register(scheduledJob); - } + jobScheduler.register(scheduledJob); } public List getCrawloerJobList() { return scheduledJobBhv.selectList(cb -> { - cb.query().setDeletedBy_IsNull(); cb.query().setCrawler_Equal(Constants.T); cb.query().addOrderBy_SortOrder_Asc(); cb.query().addOrderBy_Name_Asc(); diff --git a/src/main/java/org/codelibs/fess/service/SearchFieldLogService.java b/src/main/java/org/codelibs/fess/service/SearchFieldLogService.java deleted file mode 100644 index 11ca30857..000000000 --- a/src/main/java/org/codelibs/fess/service/SearchFieldLogService.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.service; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Resource; - -import org.codelibs.fess.db.exbhv.SearchFieldLogBhv; -import org.codelibs.fess.db.exbhv.pmbean.GroupedFieldNamePmb; -import org.codelibs.fess.db.exentity.customize.GroupedFieldName; -import org.dbflute.cbean.result.ListResultBean; -import org.seasar.framework.container.annotation.tiger.InitMethod; - -public class SearchFieldLogService implements Serializable { - - private static final long serialVersionUID = 1L; - - @Resource - protected SearchFieldLogBhv searchFieldLogBhv; - - private String[] groupedFieldNames; - - @InitMethod - public void init() { - updateFieldLabels(); - } - - public void updateFieldLabels() { - final GroupedFieldNamePmb pmb = new GroupedFieldNamePmb(); - final ListResultBean list = searchFieldLogBhv.outsideSql().selectList(pmb); - final List groupedFieldNameList = new ArrayList(); - for (final GroupedFieldName e : list) { - final String name = e.getName(); - if (!"query".equals(name) && !"solrQuery".equals(name)) { - groupedFieldNameList.add(name); - } - } - groupedFieldNames = groupedFieldNameList.toArray(new String[groupedFieldNameList.size()]); - } - - public String[] getGroupedFieldNames() { - return groupedFieldNames; - } -} diff --git a/src/main/java/org/codelibs/fess/service/SearchLogService.java b/src/main/java/org/codelibs/fess/service/SearchLogService.java deleted file mode 100644 index 76990df5e..000000000 --- a/src/main/java/org/codelibs/fess/service/SearchLogService.java +++ /dev/null @@ -1,601 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.service; - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.sql.Timestamp; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.time.format.DateTimeParseException; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.codelibs.core.CoreLibConstants; -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.Constants; -import org.codelibs.fess.crud.CommonConstants; -import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.db.allcommon.CDef.AccessType; -import org.codelibs.fess.db.cbean.ClickLogCB; -import org.codelibs.fess.db.cbean.SearchLogCB; -import org.codelibs.fess.db.exbhv.ClickLogBhv; -import org.codelibs.fess.db.exbhv.SearchFieldLogBhv; -import org.codelibs.fess.db.exbhv.SearchLogBhv; -import org.codelibs.fess.db.exentity.SearchFieldLog; -import org.codelibs.fess.db.exentity.SearchLog; -import org.codelibs.fess.pager.SearchLogPager; -import org.codelibs.fess.util.ComponentUtil; -import org.dbflute.bhv.readable.EntityRowHandler; -import org.dbflute.cbean.result.ListResultBean; -import org.dbflute.cbean.result.PagingResultBean; -import org.seasar.framework.beans.util.Beans; - -import com.ibm.icu.text.SimpleDateFormat; - -import jp.sf.orangesignal.csv.CsvConfig; -import jp.sf.orangesignal.csv.CsvReader; -import jp.sf.orangesignal.csv.CsvWriter; -import net.arnx.jsonic.JSON; - -public class SearchLogService implements Serializable { - private static final Log log = LogFactory.getLog(SearchLogService.class); - - private static final long serialVersionUID = 1L; - - @Resource - protected ClickLogBhv clickLogBhv; - - @Resource - protected SearchFieldLogBhv searchFieldLogBhv; - - @Resource - protected SearchLogBhv searchLogBhv; - - public SearchLogService() { - super(); - } - - public List getSearchLogList(final SearchLogPager searchLogPager) { - - final PagingResultBean searchLogList = searchLogBhv.selectPage(cb -> { - cb.paging(searchLogPager.getPageSize(), searchLogPager.getCurrentPageNumber()); - setupListCondition(cb, searchLogPager); - }); - - // update pager - Beans.copy(searchLogList, searchLogPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - searchLogPager.setPageNumberList(searchLogList.pageRange(op -> { - op.rangeSize(5); - }).createPageNumberList()); - - return searchLogList; - } - - protected void setupListCondition(final SearchLogCB cb, final SearchLogPager searchLogPager) { - if (searchLogPager.id != null) { - cb.query().setId_Equal(Long.parseLong(searchLogPager.id)); - } - // TODO Long, Integer, String supported only. - cb.setupSelect_UserInfo(); - - // setup condition - if ("searchWord".equals(searchLogPager.sortField)) { - if (Constants.DESC.equals(searchLogPager.sortOrder)) { - cb.query().addOrderBy_SearchWord_Desc(); - } else { - cb.query().addOrderBy_SearchWord_Asc(); - } - cb.query().addOrderBy_RequestedTime_Desc(); - } else if ("userCode".equals(searchLogPager.userCode)) { - if (Constants.DESC.equals(searchLogPager.sortOrder)) { - cb.query().queryUserInfo().addOrderBy_Code_Desc(); - } else { - cb.query().queryUserInfo().addOrderBy_Code_Asc(); - } - cb.query().addOrderBy_RequestedTime_Desc(); - } else if ("hitCount".equals(searchLogPager.sortField)) { - if (Constants.DESC.equals(searchLogPager.sortOrder)) { - cb.query().addOrderBy_HitCount_Desc(); - } else { - cb.query().addOrderBy_HitCount_Asc(); - } - cb.query().addOrderBy_RequestedTime_Desc(); - } else if ("responseTime".equals(searchLogPager.sortField)) { - if (Constants.DESC.equals(searchLogPager.sortOrder)) { - cb.query().addOrderBy_ResponseTime_Desc(); - } else { - cb.query().addOrderBy_ResponseTime_Asc(); - } - cb.query().addOrderBy_RequestedTime_Desc(); - } else { - if (Constants.ASC.equals(searchLogPager.sortOrder)) { - cb.query().addOrderBy_RequestedTime_Asc(); - } else { - cb.query().addOrderBy_RequestedTime_Desc(); - } - } - - buildSearchCondition(searchLogPager, cb); - } - - public SearchLog getSearchLog(final Map keys) { - final SearchLog searchLog = searchLogBhv.selectEntity(cb -> { - cb.query().setId_Equal(Long.parseLong(keys.get("id"))); - setupEntityCondition(cb, keys); - }).orElse(null);//TODO - if (searchLog != null) { - searchLog.setClickLogList(clickLogBhv.selectList(cb -> { - cb.query().setSearchId_Equal(searchLog.getId()); - })); - } - return searchLog; - } - - protected void setupEntityCondition(final SearchLogCB cb, final Map keys) { - - // setup condition - - } - - protected void setupStoreCondition(final SearchLog searchLog) { - - // setup condition - - } - - protected void setupDeleteCondition(final SearchLog searchLog) { - - // setup condition - - } - - public void delete(final SearchLog searchLog) throws CrudMessageException { - clickLogBhv.batchDelete(searchLog.getClickLogList()); - searchFieldLogBhv.varyingQueryDelete(cb -> { - cb.query().setSearchId_Equal(searchLog.getId()); - }, op -> op.allowNonQueryDelete()); - setupDeleteCondition(searchLog); - - searchLogBhv.delete(searchLog); - } - - public void deleteAll(final SearchLogPager searchLogPager) { - clickLogBhv.varyingQueryDelete(cb2 -> { - if (StringUtil.isNotBlank(searchLogPager.searchWord)) { - cb2.query().querySearchLog().setSearchWord_LikeSearch(searchLogPager.searchWord, op -> op.likeContain()); - } - - if (StringUtil.isNotBlank(searchLogPager.startDate)) { - final StringBuilder buf = new StringBuilder(20); - buf.append(searchLogPager.startDate); - buf.append('+'); - if (StringUtil.isNotBlank(searchLogPager.startHour)) { - buf.append(searchLogPager.startHour); - } else { - buf.append("00"); - } - buf.append(':'); - if (StringUtil.isNotBlank(searchLogPager.startMin)) { - buf.append(searchLogPager.startMin); - } else { - buf.append("00"); - } - - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd+HH:mm"); - try { - final LocalDateTime startDate = LocalDateTime.parse(buf.toString(), formatter); - cb2.query().querySearchLog().setRequestedTime_GreaterEqual(startDate); - } catch (final DateTimeParseException e) { - searchLogPager.startDate = null; - searchLogPager.startHour = null; - searchLogPager.startMin = null; - } - } - - if (StringUtil.isNotBlank(searchLogPager.endDate)) { - final StringBuilder buf = new StringBuilder(20); - buf.append(searchLogPager.endDate); - buf.append('+'); - if (StringUtil.isNotBlank(searchLogPager.endHour)) { - buf.append(searchLogPager.endHour); - } else { - buf.append("00"); - } - buf.append(':'); - if (StringUtil.isNotBlank(searchLogPager.endMin)) { - buf.append(searchLogPager.endMin); - } else { - buf.append("00"); - } - - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd+HH:mm"); - try { - final LocalDateTime endDate = LocalDateTime.parse(buf.toString(), formatter); - cb2.query().querySearchLog().setRequestedTime_LessThan(endDate); - } catch (final DateTimeParseException e) { - searchLogPager.endDate = null; - searchLogPager.endHour = null; - searchLogPager.endMin = null; - } - } - - if (StringUtil.isNotBlank(searchLogPager.startPage)) { - cb2.query().querySearchLog().setQueryOffset_Equal(0); - } - }, op -> op.allowNonQueryDelete()); - searchFieldLogBhv.varyingQueryDelete(cb2 -> {}, op -> op.allowNonQueryDelete()); - searchLogBhv.varyingQueryDelete(cb1 -> { - if (StringUtil.isNotBlank(searchLogPager.searchWord)) { - cb1.query().setSearchWord_LikeSearch(searchLogPager.searchWord, op -> op.likeContain()); - } - - if (StringUtil.isNotBlank(searchLogPager.userCode)) { - cb1.setupSelect_UserInfo(); - cb1.query().queryUserInfo().setCode_Equal(searchLogPager.userCode); - } - - if (StringUtil.isNotBlank(searchLogPager.startDate)) { - final StringBuilder buf = new StringBuilder(20); - buf.append(searchLogPager.startDate); - buf.append('+'); - if (StringUtil.isNotBlank(searchLogPager.startHour)) { - buf.append(searchLogPager.startHour); - } else { - buf.append("00"); - } - buf.append(':'); - if (StringUtil.isNotBlank(searchLogPager.startMin)) { - buf.append(searchLogPager.startMin); - } else { - buf.append("00"); - } - - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd+HH:mm"); - try { - final LocalDateTime startDate = LocalDateTime.parse(buf.toString(), formatter); - cb1.query().setRequestedTime_GreaterEqual(startDate); - } catch (final DateTimeParseException e) { - searchLogPager.startDate = null; - searchLogPager.startHour = null; - searchLogPager.startMin = null; - } - } - - if (StringUtil.isNotBlank(searchLogPager.endDate)) { - final StringBuilder buf = new StringBuilder(20); - buf.append(searchLogPager.endDate); - buf.append('+'); - if (StringUtil.isNotBlank(searchLogPager.endHour)) { - buf.append(searchLogPager.endHour); - } else { - buf.append("00"); - } - buf.append(':'); - if (StringUtil.isNotBlank(searchLogPager.endMin)) { - buf.append(searchLogPager.endMin); - } else { - buf.append("00"); - } - - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd+HH:mm"); - try { - final LocalDateTime endDate = LocalDateTime.parse(buf.toString(), formatter); - cb1.query().setRequestedTime_LessThan(endDate); - } catch (final DateTimeParseException e) { - searchLogPager.endDate = null; - searchLogPager.endHour = null; - searchLogPager.endMin = null; - } - } - - if (StringUtil.isNotBlank(searchLogPager.startPage)) { - cb1.query().setQueryOffset_Equal(0); - } - }, op -> op.allowNonQueryDelete()); - } - - public void exportCsv(final Writer writer) { - dump(writer, null); - } - - public void importCsv(final Reader reader) { - final CsvReader csvReader = new CsvReader(reader, new CsvConfig()); - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(CoreLibConstants.DATE_FORMAT_ISO_8601_EXTEND); - try { - List list; - csvReader.readValues(); // ignore header - while ((list = csvReader.readValues()) != null) { - try { - final SearchLog entity = new SearchLog(); - entity.setSearchWord(list.get(0)); - entity.setSearchQuery(list.get(1)); - entity.setSolrQuery(list.get(2)); - entity.setRequestedTime(LocalDateTime.parse(list.get(3), formatter)); - entity.setResponseTime(Integer.parseInt(list.get(4))); - entity.setHitCount(Long.parseLong(list.get(5))); - entity.setQueryOffset(Integer.parseInt(list.get(6))); - entity.setQueryPageSize(Integer.parseInt(list.get(7))); - entity.setUserAgent(list.get(8)); - entity.setReferer(list.get(9)); - entity.setClientIp(list.get(10)); - entity.setUserSessionId(list.get(11)); - entity.setAccessTypeAsAccessType(AccessType.valueOf(list.get(12))); - if (list.size() >= 14) { - final String jsonStr = list.get(13); - @SuppressWarnings("rawtypes") - final List objList = JSON.decode(jsonStr); - for (final Object obj : objList) { - @SuppressWarnings("rawtypes") - final Map objMap = (Map) obj; - entity.addSearchFieldLogValue((String) objMap.get(Constants.ITEM_NAME), - (String) objMap.get(Constants.ITEM_VALUE)); - } - } - searchLogBhv.insert(entity); - } catch (final Exception e) { - log.warn("Failed to read a search log: " + list, e); - } - } - } catch (final IOException e) { - log.warn("Failed to read a search log.", e); - } - } - - public void dump(final Writer writer, final SearchLogPager searchLogPager) { - final CsvConfig cfg = new CsvConfig(',', '"', '"'); - cfg.setEscapeDisabled(false); - cfg.setQuoteDisabled(false); - final CsvWriter csvWriter = new CsvWriter(writer, cfg); - try { - final List list = new ArrayList(); - list.add("SearchWord"); - list.add("SearchQuery"); - list.add("SolrQuery"); - list.add("RequestedTime"); - list.add("ResponseTime"); - list.add("HitCount"); - list.add("QueryOffset"); - list.add("QueryPageSize"); - list.add("UserAgent"); - list.add("Referer"); - list.add("ClientIp"); - list.add("UserSessionId"); - list.add("AccessType"); - list.add("Fields"); - csvWriter.writeValues(list); - final SimpleDateFormat sdf = new SimpleDateFormat(CoreLibConstants.DATE_FORMAT_ISO_8601_EXTEND); - searchLogBhv.selectCursor(cb -> { - if (searchLogPager != null) { - buildSearchCondition(searchLogPager, cb); - } - }, new EntityRowHandler() { - @Override - public void handle(final SearchLog entity) { - final ListResultBean fieldLogList = - ComponentUtil.getComponent(SearchFieldLogBhv.class).selectList(cb2 -> { - cb2.query().setSearchId_Equal(entity.getId()); - }); - String query = StringUtil.EMPTY; - String solrQuery = StringUtil.EMPTY; - final List> jsonObjList = new ArrayList>(fieldLogList.size()); - for (final SearchFieldLog fieldLog : fieldLogList) { - final String name = fieldLog.getName(); - if (Constants.SEARCH_FIELD_LOG_SEARCH_QUERY.equals(name)) { - query = fieldLog.getValue(); - } else if (Constants.SEARCH_FIELD_LOG_SOLR_QUERY.equals(name)) { - solrQuery = fieldLog.getValue(); - } else { - final Map objMap = new HashMap(2); - objMap.put(Constants.ITEM_NAME, fieldLog.getName()); - objMap.put(Constants.ITEM_VALUE, fieldLog.getValue()); - jsonObjList.add(objMap); - } - } - - final List list = new ArrayList(); - addToList(list, entity.getSearchWord()); - addToList(list, query); - addToList(list, solrQuery); - addToList(list, entity.getRequestedTime()); - addToList(list, entity.getResponseTime()); - addToList(list, entity.getHitCount()); - addToList(list, entity.getQueryOffset()); - addToList(list, entity.getQueryPageSize()); - addToList(list, entity.getUserAgent()); - addToList(list, entity.getReferer()); - addToList(list, entity.getClientIp()); - addToList(list, entity.getUserSessionId()); - addToList(list, entity.getAccessType()); - addToList(list, JSON.encode(jsonObjList)); - try { - csvWriter.writeValues(list); - } catch (final IOException e) { - log.warn("Failed to write a search log: " + entity, e); - } - } - - private void addToList(final List list, final Object value) { - if (value == null) { - list.add(StringUtil.EMPTY); - } else if (value instanceof Timestamp) { - list.add(sdf.format((Date) value)); - } else { - list.add(value.toString()); - } - } - }); - csvWriter.flush(); - } catch (final IOException e) { - log.warn("Failed to write a search log.", e); - } - } - - private void buildSearchCondition(final SearchLogPager searchLogPager, final SearchLogCB cb) { - buildSearchCondition(searchLogPager, cb, null); - } - - private void buildSearchCondition(final SearchLogPager searchLogPager, final SearchLogCB cb1, final ClickLogCB cb2) { - if (StringUtil.isNotBlank(searchLogPager.searchWord)) { - cb1.query().setSearchWord_LikeSearch(searchLogPager.searchWord, op -> op.likeContain()); - if (cb2 != null) { - cb2.query().querySearchLog().setSearchWord_LikeSearch(searchLogPager.searchWord, op -> op.likeContain()); - } - } - - if (StringUtil.isNotBlank(searchLogPager.userCode)) { - cb1.setupSelect_UserInfo(); - cb1.query().queryUserInfo().setCode_Equal(searchLogPager.userCode); - } - - if (StringUtil.isNotBlank(searchLogPager.startDate)) { - final StringBuilder buf = new StringBuilder(20); - buf.append(searchLogPager.startDate); - buf.append('+'); - if (StringUtil.isNotBlank(searchLogPager.startHour)) { - buf.append(searchLogPager.startHour); - } else { - buf.append("00"); - } - buf.append(':'); - if (StringUtil.isNotBlank(searchLogPager.startMin)) { - buf.append(searchLogPager.startMin); - } else { - buf.append("00"); - } - - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd+HH:mm"); - try { - final LocalDateTime startDate = LocalDateTime.parse(buf.toString(), formatter); - cb1.query().setRequestedTime_GreaterEqual(startDate); - if (cb2 != null) { - cb2.query().querySearchLog().setRequestedTime_GreaterEqual(startDate); - } - } catch (final DateTimeParseException e) { - searchLogPager.startDate = null; - searchLogPager.startHour = null; - searchLogPager.startMin = null; - } - } - - if (StringUtil.isNotBlank(searchLogPager.endDate)) { - final StringBuilder buf = new StringBuilder(20); - buf.append(searchLogPager.endDate); - buf.append('+'); - if (StringUtil.isNotBlank(searchLogPager.endHour)) { - buf.append(searchLogPager.endHour); - } else { - buf.append("00"); - } - buf.append(':'); - if (StringUtil.isNotBlank(searchLogPager.endMin)) { - buf.append(searchLogPager.endMin); - } else { - buf.append("00"); - } - - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd+HH:mm"); - try { - final LocalDateTime endDate = LocalDateTime.parse(buf.toString(), formatter); - cb1.query().setRequestedTime_LessThan(endDate); - if (cb2 != null) { - cb2.query().querySearchLog().setRequestedTime_LessThan(endDate); - } - } catch (final DateTimeParseException e) { - searchLogPager.endDate = null; - searchLogPager.endHour = null; - searchLogPager.endMin = null; - } - } - - if (StringUtil.isNotBlank(searchLogPager.startPage)) { - cb1.query().setQueryOffset_Equal(0); - if (cb2 != null) { - cb2.query().querySearchLog().setQueryOffset_Equal(0); - } - } - } - - public void deleteBefore(final int days) { - final LocalDateTime targetTime = LocalDateTime.now().minusDays(days); - clickLogBhv.varyingQueryDelete(cb2 -> { - cb2.query().querySearchLog().setRequestedTime_LessThan(targetTime); - }, op -> op.allowNonQueryDelete()); - searchFieldLogBhv.varyingQueryDelete(cb3 -> { - cb3.query().querySearchLog().setRequestedTime_LessThan(targetTime); - }, op -> op.allowNonQueryDelete()); - searchLogBhv.varyingQueryDelete(cb1 -> { - cb1.query().setRequestedTime_LessThan(targetTime); - }, op -> op.allowNonQueryDelete()); - } - - public void deleteBotsLog(final String[] bots) { - final LocalDateTime now = ComponentUtil.getSystemHelper().getCurrentTime(); - for (final String value : bots) { - final String userAgent = value.trim(); - clickLogBhv.varyingQueryDelete(cb2 -> { - cb2.query().querySearchLog().setRequestedTime_LessThan(now); - cb2.query().querySearchLog().setUserAgent_LikeSearch(userAgent, op -> op.likeContain()); - }, op -> op.allowNonQueryDelete()); - searchFieldLogBhv.varyingQueryDelete(cb3 -> { - cb3.query().querySearchLog().setRequestedTime_LessThan(now); - cb3.query().querySearchLog().setUserAgent_LikeSearch(userAgent, op -> op.likeContain()); - }, op -> op.allowNonQueryDelete()); - searchLogBhv.varyingQueryDelete(cb1 -> { - cb1.query().setRequestedTime_LessThan(now); - cb1.query().setUserAgent_LikeSearch(userAgent, op -> op.likeContain()); - }, op -> op.allowNonQueryDelete()); - } - } - - public void store(final SearchLog searchLog) throws CrudMessageException { - setupStoreCondition(searchLog); - - searchLogBhv.insertOrUpdate(searchLog); - final List searchFieldLogList = searchLog.getSearchFieldLogList(); - if (!searchFieldLogList.isEmpty()) { - final List fieldLogList = new ArrayList(); - for (final SearchFieldLog fieldLog : searchFieldLogList) { - fieldLog.setSearchId(searchLog.getId()); - fieldLogList.add(fieldLog); - } - searchFieldLogBhv.batchInsert(fieldLogList); - } - } - - public void store(final List searchLogList) { - for (final SearchLog searchLog : searchLogList) { - searchLogBhv.insert(searchLog); - final List fieldLogList = new ArrayList(); - for (final SearchFieldLog fieldLog : searchLog.getSearchFieldLogList()) { - fieldLog.setSearchId(searchLog.getId()); - fieldLogList.add(fieldLog); - } - searchFieldLogBhv.batchInsert(fieldLogList); - } - } - -} diff --git a/src/main/java/org/codelibs/fess/service/StatsService.java b/src/main/java/org/codelibs/fess/service/StatsService.java deleted file mode 100644 index ac5e2d122..000000000 --- a/src/main/java/org/codelibs/fess/service/StatsService.java +++ /dev/null @@ -1,346 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.service; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; - -import org.codelibs.fess.crud.CommonConstants; -import org.codelibs.fess.db.exbhv.ClickLogBhv; -import org.codelibs.fess.db.exbhv.FavoriteLogBhv; -import org.codelibs.fess.db.exbhv.SearchLogBhv; -import org.codelibs.fess.db.exbhv.pmbean.ClickUrlRankingPmb; -import org.codelibs.fess.db.exbhv.pmbean.ClientIpRankingPmb; -import org.codelibs.fess.db.exbhv.pmbean.FavoriteUrlRankingPmb; -import org.codelibs.fess.db.exbhv.pmbean.RefererRankingPmb; -import org.codelibs.fess.db.exbhv.pmbean.SearchFieldRankingPmb; -import org.codelibs.fess.db.exbhv.pmbean.SearchQueryRankingPmb; -import org.codelibs.fess.db.exbhv.pmbean.SearchWordRankingPmb; -import org.codelibs.fess.db.exbhv.pmbean.SolrQueryRankingPmb; -import org.codelibs.fess.db.exbhv.pmbean.UserAgentRankingPmb; -import org.codelibs.fess.db.exentity.customize.ClickUrlRanking; -import org.codelibs.fess.db.exentity.customize.ClientIpRanking; -import org.codelibs.fess.db.exentity.customize.FavoriteUrlRanking; -import org.codelibs.fess.db.exentity.customize.RefererRanking; -import org.codelibs.fess.db.exentity.customize.SearchFieldRanking; -import org.codelibs.fess.db.exentity.customize.SearchQueryRanking; -import org.codelibs.fess.db.exentity.customize.SearchWordRanking; -import org.codelibs.fess.db.exentity.customize.SolrQueryRanking; -import org.codelibs.fess.db.exentity.customize.UserAgentRanking; -import org.codelibs.fess.pager.StatsPager; -import org.dbflute.cbean.result.PagingResultBean; -import org.seasar.framework.beans.util.Beans; - -public class StatsService implements Serializable { - - private static final long serialVersionUID = 1L; - - @Resource - protected SearchLogBhv searchLogBhv; - - @Resource - protected ClickLogBhv clicklogBhv; - - @Resource - protected SearchFieldLogService searchFieldLogService; - - @Resource - protected FavoriteLogBhv favoriteLogBhv; - - public List> getStatsList(final StatsPager statsPager) { - if ("searchWord".equals(statsPager.reportType)) { - return getSearchWordStatsList(statsPager); - } else if ("query".equals(statsPager.reportType)) { - return getSearchQueryStatsList(statsPager); - } else if ("solrQuery".equals(statsPager.reportType)) { - return getSolrQueryStatsList(statsPager); - } else if ("userAgent".equals(statsPager.reportType)) { - return getUserAgentStatsList(statsPager); - } else if ("referer".equals(statsPager.reportType)) { - return getRefererStatsList(statsPager); - } else if ("clientIp".equals(statsPager.reportType)) { - return getClientIpStatsList(statsPager); - } else if ("clickUrl".equals(statsPager.reportType)) { - return getClickUrlStatsList(statsPager); - } else if ("favoriteUrl".equals(statsPager.reportType)) { - return getFavoriteUrlStatsList(statsPager); - } else if (validReportType(statsPager.reportType)) { - return getGroupedFieldStatsList(statsPager); - } else { - statsPager.reportType = "searchWord"; - return getSearchWordStatsList(statsPager); - } - } - - protected boolean validReportType(final String reportType) { - for (final String type : searchFieldLogService.getGroupedFieldNames()) { - if (type.equals(reportType)) { - return true; - } - } - return false; - } - - protected List> getSearchWordStatsList(final StatsPager statsPager) { - - final SearchWordRankingPmb pmb = new SearchWordRankingPmb(); - - pmb.paging(statsPager.getPageSize(), statsPager.getCurrentPageNumber()); - - pmb.setFromRequestedTime(statsPager.getFromRequestedTime()); - pmb.setToRequestedTime(statsPager.getToRequestedTime()); - - final PagingResultBean statsList = searchLogBhv.outsideSql().selectPage(pmb); - - // update pager - Beans.copy(statsList, statsPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - statsPager.setPageNumberList(statsList.pageRange(op -> { - op.rangeSize(5); - }).createPageNumberList()); - - final List> mapList = new ArrayList>(); - for (final SearchWordRanking entity : statsList) { - final Map map = new HashMap(); - Beans.copy(entity, map).execute(); - mapList.add(map); - } - - return mapList; - } - - protected List> getSearchQueryStatsList(final StatsPager statsPager) { - - final SearchQueryRankingPmb pmb = new SearchQueryRankingPmb(); - - pmb.paging(statsPager.getPageSize(), statsPager.getCurrentPageNumber()); - - pmb.setFromRequestedTime(statsPager.getFromRequestedTime()); - pmb.setToRequestedTime(statsPager.getToRequestedTime()); - - final PagingResultBean statsList = searchLogBhv.outsideSql().selectPage(pmb); - - // update pager - Beans.copy(statsList, statsPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - statsPager.setPageNumberList(statsList.pageRange(op -> { - op.rangeSize(5); - }).createPageNumberList()); - - final List> mapList = new ArrayList>(); - for (final SearchQueryRanking entity : statsList) { - final Map map = new HashMap(); - Beans.copy(entity, map).execute(); - mapList.add(map); - } - - return mapList; - } - - protected List> getSolrQueryStatsList(final StatsPager statsPager) { - - final SolrQueryRankingPmb pmb = new SolrQueryRankingPmb(); - - pmb.paging(statsPager.getPageSize(), statsPager.getCurrentPageNumber()); - - pmb.setFromRequestedTime(statsPager.getFromRequestedTime()); - pmb.setToRequestedTime(statsPager.getToRequestedTime()); - - final PagingResultBean statsList = searchLogBhv.outsideSql().selectPage(pmb); - - // update pager - Beans.copy(statsList, statsPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - statsPager.setPageNumberList(statsList.pageRange(op -> { - op.rangeSize(5); - }).createPageNumberList()); - - final List> mapList = new ArrayList>(); - for (final SolrQueryRanking entity : statsList) { - final Map map = new HashMap(); - Beans.copy(entity, map).execute(); - mapList.add(map); - } - - return mapList; - } - - protected List> getUserAgentStatsList(final StatsPager statsPager) { - - final UserAgentRankingPmb pmb = new UserAgentRankingPmb(); - - pmb.paging(statsPager.getPageSize(), statsPager.getCurrentPageNumber()); - - pmb.setFromRequestedTime(statsPager.getFromRequestedTime()); - pmb.setToRequestedTime(statsPager.getToRequestedTime()); - - final PagingResultBean statsList = searchLogBhv.outsideSql().selectPage(pmb); - - // update pager - Beans.copy(statsList, statsPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - statsPager.setPageNumberList(statsList.pageRange(op -> { - op.rangeSize(5); - }).createPageNumberList()); - - final List> mapList = new ArrayList>(); - for (final UserAgentRanking entity : statsList) { - final Map map = new HashMap(); - Beans.copy(entity, map).execute(); - mapList.add(map); - } - - return mapList; - } - - protected List> getRefererStatsList(final StatsPager statsPager) { - - final RefererRankingPmb pmb = new RefererRankingPmb(); - - pmb.paging(statsPager.getPageSize(), statsPager.getCurrentPageNumber()); - - pmb.setFromRequestedTime(statsPager.getFromRequestedTime()); - pmb.setToRequestedTime(statsPager.getToRequestedTime()); - - final PagingResultBean statsList = searchLogBhv.outsideSql().selectPage(pmb); - - // update pager - Beans.copy(statsList, statsPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - statsPager.setPageNumberList(statsList.pageRange(op -> { - op.rangeSize(5); - }).createPageNumberList()); - - final List> mapList = new ArrayList>(); - for (final RefererRanking entity : statsList) { - final Map map = new HashMap(); - Beans.copy(entity, map).execute(); - mapList.add(map); - } - - return mapList; - } - - protected List> getClientIpStatsList(final StatsPager statsPager) { - - final ClientIpRankingPmb pmb = new ClientIpRankingPmb(); - - pmb.paging(statsPager.getPageSize(), statsPager.getCurrentPageNumber()); - - pmb.setFromRequestedTime(statsPager.getFromRequestedTime()); - pmb.setToRequestedTime(statsPager.getToRequestedTime()); - - final PagingResultBean statsList = searchLogBhv.outsideSql().selectPage(pmb); - - // update pager - Beans.copy(statsList, statsPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - statsPager.setPageNumberList(statsList.pageRange(op -> { - op.rangeSize(5); - }).createPageNumberList()); - - final List> mapList = new ArrayList>(); - for (final ClientIpRanking entity : statsList) { - final Map map = new HashMap(); - Beans.copy(entity, map).execute(); - mapList.add(map); - } - - return mapList; - } - - protected List> getClickUrlStatsList(final StatsPager statsPager) { - - final ClickUrlRankingPmb pmb = new ClickUrlRankingPmb(); - - pmb.paging(statsPager.getPageSize(), statsPager.getCurrentPageNumber()); - - pmb.setFromRequestedTime(statsPager.getFromRequestedTime()); - pmb.setToRequestedTime(statsPager.getToRequestedTime()); - - final PagingResultBean statsList = clicklogBhv.outsideSql().selectPage(pmb); - - // update pager - Beans.copy(statsList, statsPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - statsPager.setPageNumberList(statsList.pageRange(op -> { - op.rangeSize(5); - }).createPageNumberList()); - - final List> mapList = new ArrayList>(); - for (final ClickUrlRanking entity : statsList) { - final Map map = new HashMap(); - Beans.copy(entity, map).execute(); - mapList.add(map); - } - - return mapList; - } - - protected List> getFavoriteUrlStatsList(final StatsPager statsPager) { - - final FavoriteUrlRankingPmb pmb = new FavoriteUrlRankingPmb(); - - pmb.paging(statsPager.getPageSize(), statsPager.getCurrentPageNumber()); - - pmb.setFromCreatedTime(statsPager.getFromRequestedTime()); - pmb.setToCreatedTime(statsPager.getToRequestedTime()); - - final PagingResultBean statsList = favoriteLogBhv.outsideSql().selectPage(pmb); - - // update pager - Beans.copy(statsList, statsPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - statsPager.setPageNumberList(statsList.pageRange(op -> { - op.rangeSize(5); - }).createPageNumberList()); - - final List> mapList = new ArrayList>(); - for (final FavoriteUrlRanking entity : statsList) { - final Map map = new HashMap(); - Beans.copy(entity, map).execute(); - mapList.add(map); - } - - return mapList; - } - - protected List> getGroupedFieldStatsList(final StatsPager statsPager) { - - final SearchFieldRankingPmb pmb = new SearchFieldRankingPmb(); - - pmb.paging(statsPager.getPageSize(), statsPager.getCurrentPageNumber()); - - pmb.setSearchFieldName(statsPager.reportType); - pmb.setFromRequestedTime(statsPager.getFromRequestedTime()); - pmb.setToRequestedTime(statsPager.getToRequestedTime()); - - final PagingResultBean statsList = searchLogBhv.outsideSql().selectPage(pmb); - - // update pager - Beans.copy(statsList, statsPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - statsPager.setPageNumberList(statsList.pageRange(op -> { - op.rangeSize(5); - }).createPageNumberList()); - - final List> mapList = new ArrayList>(); - for (final SearchFieldRanking entity : statsList) { - final Map map = new HashMap(); - Beans.copy(entity, map).execute(); - mapList.add(map); - } - - return mapList; - } -} diff --git a/src/main/java/org/codelibs/fess/service/SuggestBadWordService.java b/src/main/java/org/codelibs/fess/service/SuggestBadWordService.java index 5750e6931..41002fc5b 100644 --- a/src/main/java/org/codelibs/fess/service/SuggestBadWordService.java +++ b/src/main/java/org/codelibs/fess/service/SuggestBadWordService.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.io.Reader; import java.io.Serializable; import java.io.Writer; -import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -32,9 +31,9 @@ import org.apache.commons.logging.LogFactory; import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.db.cbean.SuggestBadWordCB; -import org.codelibs.fess.db.exbhv.SuggestBadWordBhv; -import org.codelibs.fess.db.exentity.SuggestBadWord; +import org.codelibs.fess.es.cbean.SuggestBadWordCB; +import org.codelibs.fess.es.exbhv.SuggestBadWordBhv; +import org.codelibs.fess.es.exentity.SuggestBadWord; import org.codelibs.fess.pager.SuggestBadWordPager; import org.codelibs.fess.util.ComponentUtil; import org.dbflute.bhv.readable.EntityRowHandler; @@ -78,7 +77,7 @@ public class SuggestBadWordService implements Serializable { public SuggestBadWord getSuggestBadWord(final Map keys) { final SuggestBadWord suggestBadWord = suggestBadWordBhv.selectEntity(cb -> { - cb.query().setId_Equal(Long.parseLong(keys.get("id"))); + cb.query().docMeta().setId_Equal(keys.get("id")); setupEntityCondition(cb, keys); }).orElse(null);//TODO if (suggestBadWord == null) { @@ -105,12 +104,11 @@ public class SuggestBadWordService implements Serializable { protected void setupListCondition(final SuggestBadWordCB cb, final SuggestBadWordPager suggestBadWordPager) { if (suggestBadWordPager.id != null) { - cb.query().setId_Equal(Long.parseLong(suggestBadWordPager.id)); + cb.query().docMeta().setId_Equal(suggestBadWordPager.id); } // TODO Long, Integer, String supported only. // setup condition - cb.query().setDeletedBy_IsNull(); cb.query().addOrderBy_SuggestWord_Asc(); // search @@ -156,11 +154,9 @@ public class SuggestBadWordService implements Serializable { SuggestBadWord suggestBadWord = suggestBadWordBhv.selectEntity(cb -> { cb.query().setSuggestWord_Equal(target); }).orElse(null);//TODO - final LocalDateTime now = ComponentUtil.getSystemHelper().getCurrentTime(); + final long now = ComponentUtil.getSystemHelper().getCurrentTimeAsLong(); if (isDelete) { - suggestBadWord.setDeletedBy("system"); - suggestBadWord.setDeletedTime(now); - suggestBadWordBhv.update(suggestBadWord); + suggestBadWordBhv.delete(suggestBadWord); } else if (suggestBadWord == null) { suggestBadWord = new SuggestBadWord(); suggestBadWord.setSuggestWord(badWord); @@ -193,7 +189,7 @@ public class SuggestBadWordService implements Serializable { csvWriter.writeValues(list); suggestBadWordBhv.selectCursor(cb -> { - cb.query().setDeletedBy_IsNull(); + cb.query().matchAll(); }, new EntityRowHandler() { @Override public void handle(final SuggestBadWord entity) { diff --git a/src/main/java/org/codelibs/fess/service/SuggestElevateWordService.java b/src/main/java/org/codelibs/fess/service/SuggestElevateWordService.java index b00bab7e8..bdede1e77 100644 --- a/src/main/java/org/codelibs/fess/service/SuggestElevateWordService.java +++ b/src/main/java/org/codelibs/fess/service/SuggestElevateWordService.java @@ -20,8 +20,6 @@ import java.io.IOException; import java.io.Reader; import java.io.Serializable; import java.io.Writer; -import java.math.BigDecimal; -import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -33,9 +31,9 @@ import org.apache.commons.logging.LogFactory; import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.db.cbean.SuggestElevateWordCB; -import org.codelibs.fess.db.exbhv.SuggestElevateWordBhv; -import org.codelibs.fess.db.exentity.SuggestElevateWord; +import org.codelibs.fess.es.cbean.SuggestElevateWordCB; +import org.codelibs.fess.es.exbhv.SuggestElevateWordBhv; +import org.codelibs.fess.es.exentity.SuggestElevateWord; import org.codelibs.fess.pager.SuggestElevateWordPager; import org.codelibs.fess.util.ComponentUtil; import org.dbflute.bhv.readable.EntityRowHandler; @@ -77,7 +75,7 @@ public class SuggestElevateWordService implements Serializable { public SuggestElevateWord getSuggestElevateWord(final Map keys) { final SuggestElevateWord suggestElevateWord = suggestElevateWordBhv.selectEntity(cb -> { - cb.query().setId_Equal(Long.parseLong(keys.get("id"))); + cb.query().docMeta().setId_Equal(keys.get("id")); setupEntityCondition(cb, keys); }).orElse(null);//TODO if (suggestElevateWord == null) { @@ -104,12 +102,11 @@ public class SuggestElevateWordService implements Serializable { protected void setupListCondition(final SuggestElevateWordCB cb, final SuggestElevateWordPager suggestElevateWordPager) { if (suggestElevateWordPager.id != null) { - cb.query().setId_Equal(Long.parseLong(suggestElevateWordPager.id)); + cb.query().docMeta().setId_Equal(suggestElevateWordPager.id); } // TODO Long, Integer, String supported only. // setup condition - cb.query().setDeletedBy_IsNull(); cb.query().addOrderBy_SuggestWord_Asc(); // search @@ -159,24 +156,22 @@ public class SuggestElevateWordService implements Serializable { }).orElse(null);//TODO final String reading = getValue(list, 1); final String boost = getValue(list, 4); - final LocalDateTime now = ComponentUtil.getSystemHelper().getCurrentTime(); + final long now = ComponentUtil.getSystemHelper().getCurrentTimeAsLong(); if (suggestElevateWord == null) { suggestElevateWord = new SuggestElevateWord(); suggestElevateWord.setSuggestWord(suggestWord); suggestElevateWord.setReading(reading); suggestElevateWord.setTargetRole(role); suggestElevateWord.setTargetLabel(label); - suggestElevateWord.setBoost(StringUtil.isBlank(boost) ? BigDecimal.ONE : new BigDecimal(boost)); + suggestElevateWord.setBoost(StringUtil.isBlank(boost) ? 1.0f : Float.parseFloat(boost)); suggestElevateWord.setCreatedBy("system"); suggestElevateWord.setCreatedTime(now); suggestElevateWordBhv.insert(suggestElevateWord); } else if (StringUtil.isBlank(reading) && StringUtil.isBlank(boost)) { - suggestElevateWord.setDeletedBy("system"); - suggestElevateWord.setDeletedTime(now); - suggestElevateWordBhv.update(suggestElevateWord); + suggestElevateWordBhv.delete(suggestElevateWord); } else { suggestElevateWord.setReading(reading); - suggestElevateWord.setBoost(StringUtil.isBlank(boost) ? BigDecimal.ONE : new BigDecimal(boost)); + suggestElevateWord.setBoost(StringUtil.isBlank(boost) ? 1.0f : Float.parseFloat(boost)); suggestElevateWord.setUpdatedBy("system"); suggestElevateWord.setUpdatedTime(now); suggestElevateWordBhv.update(suggestElevateWord); @@ -206,7 +201,7 @@ public class SuggestElevateWordService implements Serializable { csvWriter.writeValues(list); suggestElevateWordBhv.selectCursor(cb -> { - cb.query().setDeletedBy_IsNull(); + cb.query().matchAll(); }, new EntityRowHandler() { @Override public void handle(final SuggestElevateWord entity) { diff --git a/src/main/java/org/codelibs/fess/service/UserInfoService.java b/src/main/java/org/codelibs/fess/service/UserInfoService.java deleted file mode 100644 index ab34b8170..000000000 --- a/src/main/java/org/codelibs/fess/service/UserInfoService.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.service; - -import java.io.Serializable; -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; - -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.crud.CommonConstants; -import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.db.cbean.UserInfoCB; -import org.codelibs.fess.db.exbhv.FavoriteLogBhv; -import org.codelibs.fess.db.exbhv.SearchLogBhv; -import org.codelibs.fess.db.exbhv.UserInfoBhv; -import org.codelibs.fess.db.exentity.SearchLog; -import org.codelibs.fess.db.exentity.UserInfo; -import org.codelibs.fess.pager.UserInfoPager; -import org.codelibs.fess.util.ComponentUtil; -import org.dbflute.cbean.result.PagingResultBean; -import org.seasar.framework.beans.util.Beans; - -public class UserInfoService implements Serializable { - - private static final long serialVersionUID = 1L; - - @Resource - protected SearchLogBhv searchLogBhv; - - @Resource - protected FavoriteLogBhv favoriteLogBhv; - - @Resource - protected UserInfoBhv userInfoBhv; - - public UserInfoService() { - super(); - } - - public List getUserInfoList(final UserInfoPager userInfoPager) { - - final PagingResultBean userInfoList = userInfoBhv.selectPage(cb -> { - cb.paging(userInfoPager.getPageSize(), userInfoPager.getCurrentPageNumber()); - setupListCondition(cb, userInfoPager); - }); - - // update pager - Beans.copy(userInfoList, userInfoPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - userInfoPager.setPageNumberList(userInfoList.pageRange(op -> { - op.rangeSize(5); - }).createPageNumberList()); - - return userInfoList; - } - - public UserInfo getUserInfo(final Map keys) { - final UserInfo userInfo = userInfoBhv.selectEntity(cb -> { - cb.query().setId_Equal(Long.parseLong(keys.get("id"))); - setupEntityCondition(cb, keys); - }).orElse(null);//TODO - if (userInfo == null) { - // TODO exception? - return null; - } - - return userInfo; - } - - public void store(final UserInfo userInfo) throws CrudMessageException { - setupStoreCondition(userInfo); - - userInfoBhv.insertOrUpdate(userInfo); - - } - - public void delete(final UserInfo userInfo) throws CrudMessageException { - setupDeleteCondition(userInfo); - - userInfoBhv.delete(userInfo); - - } - - protected void setupListCondition(final UserInfoCB cb, final UserInfoPager userInfoPager) { - // setup condition - cb.query().addOrderBy_UpdatedTime_Desc(); - - // search - if (StringUtil.isNotBlank(userInfoPager.code)) { - cb.query().setCode_Equal(userInfoPager.code); - } - } - - protected void setupEntityCondition(final UserInfoCB cb, final Map keys) { - - // setup condition - - } - - protected void setupStoreCondition(final UserInfo userInfo) { - - // setup condition - - } - - protected void setupDeleteCondition(final UserInfo userInfo) { - final Long userInfoId = userInfo.getId(); - final SearchLog searchLog = new SearchLog(); - searchLog.setUserId(null); - searchLogBhv.queryUpdate(searchLog, cb1 -> { - cb1.query().setUserId_Equal(userInfoId); - }); - - favoriteLogBhv.queryDelete(cb2 -> { - cb2.query().setUserId_Equal(userInfoId); - }); - - // setup condition - - } - - public UserInfo getUserInfo(final String userCode) { - return userInfoBhv.selectEntity(cb -> { - cb.query().setCode_Equal(userCode); - }).orElse(null);//TODO - } - - public void deleteAll(final UserInfoPager userInfoPager) { - deleteInternal(userInfoPager); - } - - public void deleteBefore(final int days) { - final UserInfoPager userInfoPager = new UserInfoPager(); - userInfoPager.updatedTimeBefore = ComponentUtil.getSystemHelper().getCurrentTime().minusDays(days); - deleteInternal(userInfoPager); - } - - protected void deleteInternal(final UserInfoPager userInfoPager) { - - final boolean hasCb = StringUtil.isNotBlank(userInfoPager.code) || userInfoPager.updatedTimeBefore != null; - - if (hasCb) { - final SearchLog searchLog = new SearchLog(); - searchLog.setUserId(null); - searchLogBhv.queryUpdate(searchLog, cb1 -> { - if (StringUtil.isNotBlank(userInfoPager.code)) { - cb1.query().queryUserInfo().setCode_Equal(userInfoPager.code); - } - - if (userInfoPager.updatedTimeBefore != null) { - cb1.query().queryUserInfo().setUpdatedTime_LessEqual(userInfoPager.updatedTimeBefore); - } - }); - - favoriteLogBhv.queryDelete(cb2 -> { - if (StringUtil.isNotBlank(userInfoPager.code)) { - cb2.query().queryUserInfo().setCode_Equal(userInfoPager.code); - } - - if (userInfoPager.updatedTimeBefore != null) { - cb2.query().queryUserInfo().setUpdatedTime_LessEqual(userInfoPager.updatedTimeBefore); - } - }); - } else { - final SearchLog searchLog = new SearchLog(); - searchLog.setUserId(null); - searchLogBhv.varyingQueryUpdate(searchLog, cb1 -> { - if (StringUtil.isNotBlank(userInfoPager.code)) { - cb1.query().queryUserInfo().setCode_Equal(userInfoPager.code); - } - - if (userInfoPager.updatedTimeBefore != null) { - cb1.query().queryUserInfo().setUpdatedTime_LessEqual(userInfoPager.updatedTimeBefore); - } - }, op -> op.allowNonQueryUpdate()); - - favoriteLogBhv.varyingQueryDelete(cb2 -> { - if (StringUtil.isNotBlank(userInfoPager.code)) { - cb2.query().queryUserInfo().setCode_Equal(userInfoPager.code); - } - - if (userInfoPager.updatedTimeBefore != null) { - cb2.query().queryUserInfo().setUpdatedTime_LessEqual(userInfoPager.updatedTimeBefore); - } - }, op -> op.allowNonQueryDelete()); - } - - userInfoBhv.varyingQueryDelete(cb -> { - if (StringUtil.isNotBlank(userInfoPager.code)) { - cb.query().setCode_Equal(userInfoPager.code); - } - - if (userInfoPager.updatedTimeBefore != null) { - cb.query().setUpdatedTime_LessEqual(userInfoPager.updatedTimeBefore); - } - }, op -> op.allowNonQueryDelete()); - } -} diff --git a/src/main/java/org/codelibs/fess/service/WebAuthenticationService.java b/src/main/java/org/codelibs/fess/service/WebAuthenticationService.java index 096e5f5be..7375931b0 100644 --- a/src/main/java/org/codelibs/fess/service/WebAuthenticationService.java +++ b/src/main/java/org/codelibs/fess/service/WebAuthenticationService.java @@ -24,9 +24,9 @@ import javax.annotation.Resource; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.db.cbean.WebAuthenticationCB; -import org.codelibs.fess.db.exbhv.WebAuthenticationBhv; -import org.codelibs.fess.db.exentity.WebAuthentication; +import org.codelibs.fess.es.cbean.WebAuthenticationCB; +import org.codelibs.fess.es.exbhv.WebAuthenticationBhv; +import org.codelibs.fess.es.exentity.WebAuthentication; import org.codelibs.fess.pager.WebAuthenticationPager; import org.dbflute.cbean.result.PagingResultBean; import org.seasar.framework.beans.util.Beans; @@ -60,7 +60,7 @@ public class WebAuthenticationService implements Serializable { public WebAuthentication getWebAuthentication(final Map keys) { final WebAuthentication webAuthentication = webAuthenticationBhv.selectEntity(cb -> { - cb.query().setId_Equal(Long.parseLong(keys.get("id"))); + cb.query().docMeta().setId_Equal(keys.get("id")); setupEntityCondition(cb, keys); }).orElse(null);//TODO if (webAuthentication == null) { @@ -74,27 +74,29 @@ public class WebAuthenticationService implements Serializable { public void store(final WebAuthentication webAuthentication) throws CrudMessageException { setupStoreCondition(webAuthentication); - webAuthenticationBhv.insertOrUpdate(webAuthentication); + webAuthenticationBhv.insertOrUpdate(webAuthentication, op -> { + op.setRefresh(true); + }); } public void delete(final WebAuthentication webAuthentication) throws CrudMessageException { setupDeleteCondition(webAuthentication); - webAuthenticationBhv.delete(webAuthentication); + webAuthenticationBhv.delete(webAuthentication, op -> { + op.setRefresh(true); + }); } protected void setupListCondition(final WebAuthenticationCB cb, final WebAuthenticationPager webAuthenticationPager) { if (webAuthenticationPager.id != null) { - cb.query().setId_Equal(Long.parseLong(webAuthenticationPager.id)); + cb.query().docMeta().setId_Equal(webAuthenticationPager.id); } // TODO Long, Integer, String supported only. // setup condition - cb.setupSelect_WebCrawlingConfig(); - cb.query().setDeletedBy_IsNull(); cb.query().addOrderBy_Hostname_Asc(); - cb.query().addOrderBy_WebCrawlingConfigId_Asc(); + cb.query().addOrderBy_WebConfigId_Asc(); // search @@ -103,7 +105,6 @@ public class WebAuthenticationService implements Serializable { protected void setupEntityCondition(final WebAuthenticationCB cb, final Map keys) { // setup condition - cb.query().setDeletedBy_IsNull(); } @@ -119,9 +120,9 @@ public class WebAuthenticationService implements Serializable { } - public List getWebAuthenticationList(final Long webCrawlingConfigId) { + public List getWebAuthenticationList(final String webConfigId) { return webAuthenticationBhv.selectList(cb -> { - cb.query().setWebCrawlingConfigId_Equal(webCrawlingConfigId); + cb.query().setWebConfigId_Equal(webConfigId); }); } diff --git a/src/main/java/org/codelibs/fess/service/WebConfigService.java b/src/main/java/org/codelibs/fess/service/WebConfigService.java new file mode 100644 index 000000000..737d5caca --- /dev/null +++ b/src/main/java/org/codelibs/fess/service/WebConfigService.java @@ -0,0 +1,281 @@ +/* + * Copyright 2009-2015 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 org.codelibs.fess.service; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import javax.annotation.Resource; + +import org.codelibs.fess.Constants; +import org.codelibs.fess.crud.CommonConstants; +import org.codelibs.fess.crud.CrudMessageException; +import org.codelibs.fess.es.cbean.WebConfigCB; +import org.codelibs.fess.es.exbhv.WebConfigBhv; +import org.codelibs.fess.es.exbhv.WebConfigToLabelBhv; +import org.codelibs.fess.es.exbhv.WebConfigToRoleBhv; +import org.codelibs.fess.es.exentity.WebConfig; +import org.codelibs.fess.es.exentity.WebConfigToLabel; +import org.codelibs.fess.es.exentity.WebConfigToRole; +import org.codelibs.fess.pager.WebConfigPager; +import org.dbflute.cbean.result.PagingResultBean; +import org.seasar.framework.beans.util.Beans; + +public class WebConfigService implements Serializable { + + private static final long serialVersionUID = 1L; + + @Resource + protected WebConfigToLabelBhv webConfigToLabelBhv; + + @Resource + protected WebConfigToRoleBhv webConfigToRoleBhv; + + @Resource + protected WebConfigBhv webConfigBhv; + + public WebConfigService() { + super(); + } + + public List getWebConfigList(final WebConfigPager webConfigPager) { + + final PagingResultBean webConfigList = webConfigBhv.selectPage(cb -> { + cb.paging(webConfigPager.getPageSize(), webConfigPager.getCurrentPageNumber()); + setupListCondition(cb, webConfigPager); + }); + + // update pager + Beans.copy(webConfigList, webConfigPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); + webConfigPager.setPageNumberList(webConfigList.pageRange(op -> { + op.rangeSize(5); + }).createPageNumberList()); + + return webConfigList; + } + + public void delete(final WebConfig webConfig) throws CrudMessageException { + setupDeleteCondition(webConfig); + + webConfigBhv.delete(webConfig, op -> { + op.setRefresh(true); + }); + + } + + public List getAllWebConfigList() { + return getAllWebConfigList(true, true, true, null); + } + + public List getWebConfigListByIds(final List idList) { + if (idList == null) { + return getAllWebConfigList(); + } else { + return getAllWebConfigList(true, true, false, idList); + } + } + + public List getAllWebConfigList(final boolean withLabelType, final boolean withRoleType, final boolean available, + final List idList) { + final List list = webConfigBhv.selectList(cb -> { + if (available) { + cb.query().setAvailable_Equal(Constants.T); + } + if (idList != null) { + cb.query().setId_InScope(idList); + } + }); + + return list; + } + + public WebConfig getWebConfig(final Map keys) { + final WebConfig webConfig = webConfigBhv.selectEntity(cb -> { + cb.query().docMeta().setId_Equal(keys.get("id")); + setupEntityCondition(cb, keys); + }).orElse(null);//TODO + + if (webConfig != null) { + final List wctltmList = webConfigToLabelBhv.selectList(wctltmCb -> { + wctltmCb.query().setWebConfigId_Equal(webConfig.getId()); + }); + if (!wctltmList.isEmpty()) { + final List labelTypeIds = new ArrayList(wctltmList.size()); + for (final WebConfigToLabel mapping : wctltmList) { + labelTypeIds.add(mapping.getLabelTypeId()); + } + webConfig.setLabelTypeIds(labelTypeIds.toArray(new String[labelTypeIds.size()])); + } + + final List wctrtmList = webConfigToRoleBhv.selectList(wctrtmCb -> { + wctrtmCb.query().setWebConfigId_Equal(webConfig.getId()); + }); + if (!wctrtmList.isEmpty()) { + final List roleTypeIds = new ArrayList(wctrtmList.size()); + for (final WebConfigToRole mapping : wctrtmList) { + roleTypeIds.add(mapping.getRoleTypeId()); + } + webConfig.setRoleTypeIds(roleTypeIds.toArray(new String[roleTypeIds.size()])); + } + } + + return webConfig; + } + + public void store(final WebConfig webConfig) { + final boolean isNew = webConfig.getId() == null; + final String[] labelTypeIds = webConfig.getLabelTypeIds(); + final String[] roleTypeIds = webConfig.getRoleTypeIds(); + setupStoreCondition(webConfig); + + webConfigBhv.insertOrUpdate(webConfig, op -> { + op.setRefresh(true); + }); + final String webConfigId = webConfig.getId(); + if (isNew) { + // Insert + if (labelTypeIds != null) { + final List wctltmList = new ArrayList(); + for (final String id : labelTypeIds) { + final WebConfigToLabel mapping = new WebConfigToLabel(); + mapping.setWebConfigId(webConfigId); + mapping.setLabelTypeId(id); + wctltmList.add(mapping); + } + webConfigToLabelBhv.batchInsert(wctltmList, op -> { + op.setRefresh(true); + }); + } + if (roleTypeIds != null) { + final List wctrtmList = new ArrayList(); + for (final String id : roleTypeIds) { + final WebConfigToRole mapping = new WebConfigToRole(); + mapping.setWebConfigId(webConfigId); + mapping.setRoleTypeId(id); + wctrtmList.add(mapping); + } + webConfigToRoleBhv.batchInsert(wctrtmList, op -> { + op.setRefresh(true); + }); + } + } else { + // Update + if (labelTypeIds != null) { + final List list = webConfigToLabelBhv.selectList(wctltmCb -> { + wctltmCb.query().setWebConfigId_Equal(webConfigId); + }); + final List newList = new ArrayList(); + final List matchedList = new ArrayList(); + for (final String id : labelTypeIds) { + boolean exist = false; + for (final WebConfigToLabel mapping : list) { + if (mapping.getLabelTypeId().equals(id)) { + exist = true; + matchedList.add(mapping); + break; + } + } + if (!exist) { + // new + final WebConfigToLabel mapping = new WebConfigToLabel(); + mapping.setWebConfigId(webConfigId); + mapping.setLabelTypeId(id); + newList.add(mapping); + } + } + list.removeAll(matchedList); + webConfigToLabelBhv.batchInsert(newList, op -> { + op.setRefresh(true); + }); + webConfigToLabelBhv.batchDelete(list, op -> { + op.setRefresh(true); + }); + } + if (roleTypeIds != null) { + final List list = webConfigToRoleBhv.selectList(wctrtmCb -> { + wctrtmCb.query().setWebConfigId_Equal(webConfigId); + }); + final List newList = new ArrayList(); + final List matchedList = new ArrayList(); + for (final String id : roleTypeIds) { + boolean exist = false; + for (final WebConfigToRole mapping : list) { + if (mapping.getRoleTypeId().equals(id)) { + exist = true; + matchedList.add(mapping); + break; + } + } + if (!exist) { + // new + final WebConfigToRole mapping = new WebConfigToRole(); + mapping.setWebConfigId(webConfigId); + mapping.setRoleTypeId(id); + newList.add(mapping); + } + } + list.removeAll(matchedList); + webConfigToRoleBhv.batchInsert(newList, op -> { + op.setRefresh(true); + }); + webConfigToRoleBhv.batchDelete(list, op -> { + op.setRefresh(true); + }); + } + } + } + + protected void setupListCondition(final WebConfigCB cb, final WebConfigPager webConfigPager) { + if (webConfigPager.id != null) { + cb.query().docMeta().setId_Equal(webConfigPager.id); + } + // TODO Long, Integer, String supported only. + + // setup condition + cb.query().addOrderBy_SortOrder_Asc(); + cb.query().addOrderBy_Name_Asc(); + + // search + + } + + protected void setupEntityCondition(final WebConfigCB cb, final Map keys) { + + // setup condition + + } + + protected void setupStoreCondition(final WebConfig webConfig) { + + // setup condition + + } + + protected void setupDeleteCondition(final WebConfig webConfig) { + + // setup condition + + } + + public WebConfig getWebConfig(final String id) { + return webConfigBhv.selectEntity(cb -> { + cb.query().docMeta().setId_Equal(id); + }).orElse(null);//TODO + } +} diff --git a/src/main/java/org/codelibs/fess/service/WebCrawlingConfigService.java b/src/main/java/org/codelibs/fess/service/WebCrawlingConfigService.java deleted file mode 100644 index 6a1b02ca7..000000000 --- a/src/main/java/org/codelibs/fess/service/WebCrawlingConfigService.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.service; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; - -import org.codelibs.fess.Constants; -import org.codelibs.fess.crud.CommonConstants; -import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.db.cbean.WebCrawlingConfigCB; -import org.codelibs.fess.db.exbhv.WebConfigToLabelTypeMappingBhv; -import org.codelibs.fess.db.exbhv.WebConfigToRoleTypeMappingBhv; -import org.codelibs.fess.db.exbhv.WebCrawlingConfigBhv; -import org.codelibs.fess.db.exentity.WebConfigToLabelTypeMapping; -import org.codelibs.fess.db.exentity.WebConfigToRoleTypeMapping; -import org.codelibs.fess.db.exentity.WebCrawlingConfig; -import org.codelibs.fess.pager.WebCrawlingConfigPager; -import org.dbflute.cbean.result.PagingResultBean; -import org.seasar.framework.beans.util.Beans; - -public class WebCrawlingConfigService implements Serializable { - - private static final long serialVersionUID = 1L; - - @Resource - protected WebConfigToLabelTypeMappingBhv webConfigToLabelTypeMappingBhv; - - @Resource - protected WebConfigToRoleTypeMappingBhv webConfigToRoleTypeMappingBhv; - - @Resource - protected WebCrawlingConfigBhv webCrawlingConfigBhv; - - public WebCrawlingConfigService() { - super(); - } - - public List getWebCrawlingConfigList(final WebCrawlingConfigPager webCrawlingConfigPager) { - - final PagingResultBean webCrawlingConfigList = webCrawlingConfigBhv.selectPage(cb -> { - cb.paging(webCrawlingConfigPager.getPageSize(), webCrawlingConfigPager.getCurrentPageNumber()); - setupListCondition(cb, webCrawlingConfigPager); - }); - - // update pager - Beans.copy(webCrawlingConfigList, webCrawlingConfigPager).includes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - webCrawlingConfigPager.setPageNumberList(webCrawlingConfigList.pageRange(op -> { - op.rangeSize(5); - }).createPageNumberList()); - - return webCrawlingConfigList; - } - - public void delete(final WebCrawlingConfig webCrawlingConfig) throws CrudMessageException { - setupDeleteCondition(webCrawlingConfig); - - webCrawlingConfigBhv.delete(webCrawlingConfig); - - } - - public List getAllWebCrawlingConfigList() { - return getAllWebCrawlingConfigList(true, true, true, null); - } - - public List getWebCrawlingConfigListByIds(final List idList) { - if (idList == null) { - return getAllWebCrawlingConfigList(); - } else { - return getAllWebCrawlingConfigList(true, true, false, idList); - } - } - - public List getAllWebCrawlingConfigList(final boolean withLabelType, final boolean withRoleType, - final boolean available, final List idList) { - final List list = webCrawlingConfigBhv.selectList(cb -> { - cb.query().setDeletedBy_IsNull(); - if (available) { - cb.query().setAvailable_Equal(Constants.T); - } - if (idList != null) { - cb.query().setId_InScope(idList); - } - }); - if (withLabelType) { - webCrawlingConfigBhv.loadWebConfigToLabelTypeMapping(list, cb -> { - cb.setupSelect_LabelType(); - cb.query().queryLabelType().setDeletedBy_IsNull(); - cb.query().queryLabelType().addOrderBy_SortOrder_Asc(); - }); - } - if (withRoleType) { - webCrawlingConfigBhv.loadWebConfigToRoleTypeMapping(list, cb -> { - cb.setupSelect_RoleType(); - cb.query().queryRoleType().setDeletedBy_IsNull(); - cb.query().queryRoleType().addOrderBy_SortOrder_Asc(); - }); - } - return list; - } - - public WebCrawlingConfig getWebCrawlingConfig(final Map keys) { - final WebCrawlingConfig webCrawlingConfig = webCrawlingConfigBhv.selectEntity(cb -> { - cb.query().setId_Equal(Long.parseLong(keys.get("id"))); - setupEntityCondition(cb, keys); - }).orElse(null);//TODO - - if (webCrawlingConfig != null) { - final List wctltmList = webConfigToLabelTypeMappingBhv.selectList(wctltmCb -> { - wctltmCb.query().setWebConfigId_Equal(webCrawlingConfig.getId()); - wctltmCb.query().queryLabelType().setDeletedBy_IsNull(); - wctltmCb.query().queryWebCrawlingConfig().setDeletedBy_IsNull(); - }); - if (!wctltmList.isEmpty()) { - final List labelTypeIds = new ArrayList(wctltmList.size()); - for (final WebConfigToLabelTypeMapping mapping : wctltmList) { - labelTypeIds.add(Long.toString(mapping.getLabelTypeId())); - } - webCrawlingConfig.setLabelTypeIds(labelTypeIds.toArray(new String[labelTypeIds.size()])); - } - - final List wctrtmList = webConfigToRoleTypeMappingBhv.selectList(wctrtmCb -> { - wctrtmCb.query().setWebConfigId_Equal(webCrawlingConfig.getId()); - wctrtmCb.query().queryRoleType().setDeletedBy_IsNull(); - wctrtmCb.query().queryWebCrawlingConfig().setDeletedBy_IsNull(); - }); - if (!wctrtmList.isEmpty()) { - final List roleTypeIds = new ArrayList(wctrtmList.size()); - for (final WebConfigToRoleTypeMapping mapping : wctrtmList) { - roleTypeIds.add(Long.toString(mapping.getRoleTypeId())); - } - webCrawlingConfig.setRoleTypeIds(roleTypeIds.toArray(new String[roleTypeIds.size()])); - } - } - - return webCrawlingConfig; - } - - public void store(final WebCrawlingConfig webCrawlingConfig) { - final boolean isNew = webCrawlingConfig.getId() == null; - final String[] labelTypeIds = webCrawlingConfig.getLabelTypeIds(); - final String[] roleTypeIds = webCrawlingConfig.getRoleTypeIds(); - setupStoreCondition(webCrawlingConfig); - - webCrawlingConfigBhv.insertOrUpdate(webCrawlingConfig); - final Long webConfigId = webCrawlingConfig.getId(); - if (isNew) { - // Insert - if (labelTypeIds != null) { - final List wctltmList = new ArrayList(); - for (final String id : labelTypeIds) { - final WebConfigToLabelTypeMapping mapping = new WebConfigToLabelTypeMapping(); - mapping.setWebConfigId(webConfigId); - mapping.setLabelTypeId(Long.parseLong(id)); - wctltmList.add(mapping); - } - webConfigToLabelTypeMappingBhv.batchInsert(wctltmList); - } - if (roleTypeIds != null) { - final List wctrtmList = new ArrayList(); - for (final String id : roleTypeIds) { - final WebConfigToRoleTypeMapping mapping = new WebConfigToRoleTypeMapping(); - mapping.setWebConfigId(webConfigId); - mapping.setRoleTypeId(Long.parseLong(id)); - wctrtmList.add(mapping); - } - webConfigToRoleTypeMappingBhv.batchInsert(wctrtmList); - } - } else { - // Update - if (labelTypeIds != null) { - final List list = webConfigToLabelTypeMappingBhv.selectList(wctltmCb -> { - wctltmCb.query().setWebConfigId_Equal(webConfigId); - }); - final List newList = new ArrayList(); - final List matchedList = new ArrayList(); - for (final String id : labelTypeIds) { - final Long labelTypeId = Long.parseLong(id); - boolean exist = false; - for (final WebConfigToLabelTypeMapping mapping : list) { - if (mapping.getLabelTypeId().equals(labelTypeId)) { - exist = true; - matchedList.add(mapping); - break; - } - } - if (!exist) { - // new - final WebConfigToLabelTypeMapping mapping = new WebConfigToLabelTypeMapping(); - mapping.setWebConfigId(webConfigId); - mapping.setLabelTypeId(Long.parseLong(id)); - newList.add(mapping); - } - } - list.removeAll(matchedList); - webConfigToLabelTypeMappingBhv.batchInsert(newList); - webConfigToLabelTypeMappingBhv.batchDelete(list); - } - if (roleTypeIds != null) { - final List list = webConfigToRoleTypeMappingBhv.selectList(wctrtmCb -> { - wctrtmCb.query().setWebConfigId_Equal(webConfigId); - }); - final List newList = new ArrayList(); - final List matchedList = new ArrayList(); - for (final String id : roleTypeIds) { - final Long roleTypeId = Long.parseLong(id); - boolean exist = false; - for (final WebConfigToRoleTypeMapping mapping : list) { - if (mapping.getRoleTypeId().equals(roleTypeId)) { - exist = true; - matchedList.add(mapping); - break; - } - } - if (!exist) { - // new - final WebConfigToRoleTypeMapping mapping = new WebConfigToRoleTypeMapping(); - mapping.setWebConfigId(webConfigId); - mapping.setRoleTypeId(Long.parseLong(id)); - newList.add(mapping); - } - } - list.removeAll(matchedList); - webConfigToRoleTypeMappingBhv.batchInsert(newList); - webConfigToRoleTypeMappingBhv.batchDelete(list); - } - } - } - - protected void setupListCondition(final WebCrawlingConfigCB cb, final WebCrawlingConfigPager webCrawlingConfigPager) { - if (webCrawlingConfigPager.id != null) { - cb.query().setId_Equal(Long.parseLong(webCrawlingConfigPager.id)); - } - // TODO Long, Integer, String supported only. - - // setup condition - cb.query().setDeletedBy_IsNull(); - cb.query().addOrderBy_SortOrder_Asc(); - cb.query().addOrderBy_Name_Asc(); - - // search - - } - - protected void setupEntityCondition(final WebCrawlingConfigCB cb, final Map keys) { - - // setup condition - cb.query().setDeletedBy_IsNull(); - - } - - protected void setupStoreCondition(final WebCrawlingConfig webCrawlingConfig) { - - // setup condition - - } - - protected void setupDeleteCondition(final WebCrawlingConfig webCrawlingConfig) { - - // setup condition - - } - - public WebCrawlingConfig getWebCrawlingConfig(final long id) { - return webCrawlingConfigBhv.selectEntity(cb -> { - cb.query().setId_Equal(id); - cb.query().setDeletedBy_IsNull(); - }).orElse(null);//TODO - } -} diff --git a/src/main/java/org/codelibs/fess/solr/IndexUpdater.java b/src/main/java/org/codelibs/fess/solr/IndexUpdater.java index dd672c117..4959fcedf 100644 --- a/src/main/java/org/codelibs/fess/solr/IndexUpdater.java +++ b/src/main/java/org/codelibs/fess/solr/IndexUpdater.java @@ -27,13 +27,12 @@ import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.Constants; import org.codelibs.fess.FessSystemException; import org.codelibs.fess.client.FessEsClient; -import org.codelibs.fess.db.exbhv.ClickLogBhv; -import org.codelibs.fess.db.exbhv.FavoriteLogBhv; -import org.codelibs.fess.db.exbhv.pmbean.FavoriteUrlCountPmb; -import org.codelibs.fess.db.exentity.customize.FavoriteUrlCount; +import org.codelibs.fess.es.exbhv.ClickLogBhv; +import org.codelibs.fess.es.exbhv.FavoriteLogBhv; import org.codelibs.fess.helper.FieldHelper; import org.codelibs.fess.helper.IndexingHelper; import org.codelibs.fess.helper.IntervalControlHelper; +import org.codelibs.fess.helper.SearchLogHelper; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.util.ComponentUtil; import org.codelibs.robot.S2Robot; @@ -423,9 +422,8 @@ public class IndexUpdater extends Thread { protected void addClickCountField(final Map doc) { final String url = (String) doc.get(fieldHelper.urlField); if (StringUtil.isNotBlank(url)) { - final int count = clickLogBhv.selectCount(cb -> { - cb.query().setUrl_Equal(url); - }); + final SearchLogHelper searchLogHelper = ComponentUtil.getSearchLogHelper(); + final int count = searchLogHelper.getClickCount(url); doc.put(fieldHelper.clickCountField, count); if (logger.isDebugEnabled()) { logger.debug("Click Count: " + count + ", url: " + url); @@ -436,15 +434,8 @@ public class IndexUpdater extends Thread { protected void addFavoriteCountField(final Map map) { final String url = (String) map.get(fieldHelper.urlField); if (StringUtil.isNotBlank(url)) { - final FavoriteUrlCountPmb pmb = new FavoriteUrlCountPmb(); - pmb.setUrl(url); - final List list = favoriteLogBhv.outsideSql().selectList(pmb); - - long count = 0; - if (!list.isEmpty()) { - count = list.get(0).getCnt().longValue(); - } - + final SearchLogHelper searchLogHelper = ComponentUtil.getSearchLogHelper(); + final long count = searchLogHelper.getFavoriteCount(url); map.put(fieldHelper.favoriteCountField, count); if (logger.isDebugEnabled()) { logger.debug("Favorite Count: " + count + ", url: " + url); diff --git a/src/main/java/org/codelibs/fess/transformer/AbstractFessFileTransformer.java b/src/main/java/org/codelibs/fess/transformer/AbstractFessFileTransformer.java index 2570e7186..add3ef132 100644 --- a/src/main/java/org/codelibs/fess/transformer/AbstractFessFileTransformer.java +++ b/src/main/java/org/codelibs/fess/transformer/AbstractFessFileTransformer.java @@ -19,9 +19,9 @@ package org.codelibs.fess.transformer; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; -import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Collections; +import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -35,8 +35,8 @@ import org.apache.tika.metadata.TikaMetadataKeys; import org.codelibs.core.lang.StringUtil; import org.codelibs.core.misc.DynamicProperties; import org.codelibs.fess.Constants; -import org.codelibs.fess.db.exentity.CrawlingConfig; -import org.codelibs.fess.db.exentity.CrawlingConfig.ConfigName; +import org.codelibs.fess.es.exentity.CrawlingConfig; +import org.codelibs.fess.es.exentity.CrawlingConfig.ConfigName; import org.codelibs.fess.helper.CrawlingConfigHelper; import org.codelibs.fess.helper.CrawlingSessionHelper; import org.codelibs.fess.helper.FieldHelper; @@ -162,7 +162,7 @@ public abstract class AbstractFessFileTransformer extends AbstractFessXpathTrans final CrawlingSessionHelper crawlingSessionHelper = ComponentUtil.getCrawlingSessionHelper(); final String sessionId = crawlingSessionHelper.getCanonicalSessionId(responseData.getSessionId()); - final LocalDateTime documentExpires = crawlingSessionHelper.getDocumentExpires(); + final Long documentExpires = crawlingSessionHelper.getDocumentExpires(); final PathMappingHelper pathMappingHelper = ComponentUtil.getPathMappingHelper(); final SambaHelper sambaHelper = ComponentUtil.getSambaHelper(); final DynamicProperties crawlerProperties = ComponentUtil.getCrawlerProperties(); @@ -192,7 +192,7 @@ public abstract class AbstractFessFileTransformer extends AbstractFessXpathTrans } // expires if (documentExpires != null) { - putResultDataBody(dataMap, fieldHelper.expiresField, FessFunctions.formatDate(documentExpires)); + putResultDataBody(dataMap, fieldHelper.expiresField, new Date(documentExpires)); } // segment putResultDataBody(dataMap, fieldHelper.segmentField, sessionId); diff --git a/src/main/java/org/codelibs/fess/transformer/FessXpathTransformer.java b/src/main/java/org/codelibs/fess/transformer/FessXpathTransformer.java index 4740a30df..3e116d857 100644 --- a/src/main/java/org/codelibs/fess/transformer/FessXpathTransformer.java +++ b/src/main/java/org/codelibs/fess/transformer/FessXpathTransformer.java @@ -22,8 +22,8 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.net.MalformedURLException; import java.net.URL; -import java.time.LocalDateTime; import java.util.ArrayList; +import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -37,8 +37,8 @@ import org.apache.commons.lang.StringUtils; import org.apache.xpath.objects.XObject; import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.Constants; -import org.codelibs.fess.db.exentity.CrawlingConfig; -import org.codelibs.fess.db.exentity.CrawlingConfig.ConfigName; +import org.codelibs.fess.es.exentity.CrawlingConfig; +import org.codelibs.fess.es.exentity.CrawlingConfig.ConfigName; import org.codelibs.fess.helper.CrawlingConfigHelper; import org.codelibs.fess.helper.CrawlingSessionHelper; import org.codelibs.fess.helper.FieldHelper; @@ -196,7 +196,7 @@ public class FessXpathTransformer extends AbstractFessXpathTransformer { final CrawlingSessionHelper crawlingSessionHelper = ComponentUtil.getCrawlingSessionHelper(); final String sessionId = crawlingSessionHelper.getCanonicalSessionId(responseData.getSessionId()); - final LocalDateTime documentExpires = crawlingSessionHelper.getDocumentExpires(); + final Long documentExpires = crawlingSessionHelper.getDocumentExpires(); final PathMappingHelper pathMappingHelper = ComponentUtil.getPathMappingHelper(); final CrawlingConfigHelper crawlingConfigHelper = ComponentUtil.getCrawlingConfigHelper(); final CrawlingConfig crawlingConfig = crawlingConfigHelper.get(responseData.getSessionId()); @@ -224,7 +224,7 @@ public class FessXpathTransformer extends AbstractFessXpathTransformer { } // expires if (documentExpires != null) { - putResultDataBody(dataMap, fieldHelper.expiresField, FessFunctions.formatDate(documentExpires)); + putResultDataBody(dataMap, fieldHelper.expiresField, new Date(documentExpires)); } // lang final String lang = systemHelper.normalizeLang(getSingleNodeValue(document, langXpath, true)); diff --git a/src/main/java/org/codelibs/fess/util/ParameterUtil.java b/src/main/java/org/codelibs/fess/util/ParameterUtil.java index ea986b00b..5d9e680f8 100644 --- a/src/main/java/org/codelibs/fess/util/ParameterUtil.java +++ b/src/main/java/org/codelibs/fess/util/ParameterUtil.java @@ -21,7 +21,7 @@ import java.util.Map; import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.FessSystemException; -import org.codelibs.fess.db.exentity.CrawlingConfig.ConfigName; +import org.codelibs.fess.es.exentity.CrawlingConfig.ConfigName; public class ParameterUtil { protected static final String XPATH_PREFIX = "field.xpath."; diff --git a/src/main/java/org/codelibs/fess/web/IndexAction.java b/src/main/java/org/codelibs/fess/web/IndexAction.java index 5f609ee20..39acda24e 100644 --- a/src/main/java/org/codelibs/fess/web/IndexAction.java +++ b/src/main/java/org/codelibs/fess/web/IndexAction.java @@ -27,9 +27,6 @@ import java.net.URLDecoder; import java.net.URLEncoder; import java.text.NumberFormat; import java.time.Clock; -import java.time.Instant; -import java.time.LocalDateTime; -import java.time.ZoneId; import java.util.ArrayList; import java.util.Arrays; import java.util.Enumeration; @@ -58,11 +55,10 @@ import org.codelibs.fess.ResultOffsetExceededException; import org.codelibs.fess.UnsupportedSearchException; import org.codelibs.fess.client.FessEsClient; import org.codelibs.fess.client.FessEsClient.SearchConditionBuilder; -import org.codelibs.fess.db.allcommon.CDef; -import org.codelibs.fess.db.exentity.ClickLog; -import org.codelibs.fess.db.exentity.SearchLog; -import org.codelibs.fess.db.exentity.UserInfo; import org.codelibs.fess.entity.LoginInfo; +import org.codelibs.fess.es.exentity.ClickLog; +import org.codelibs.fess.es.exentity.SearchLog; +import org.codelibs.fess.es.exentity.UserInfo; import org.codelibs.fess.helper.CrawlingConfigHelper; import org.codelibs.fess.helper.FieldHelper; import org.codelibs.fess.helper.HotSearchWordHelper; @@ -76,7 +72,6 @@ import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.helper.UserInfoHelper; import org.codelibs.fess.helper.ViewHelper; import org.codelibs.fess.screenshot.ScreenShotManager; -import org.codelibs.fess.service.FavoriteLogService; import org.codelibs.fess.util.ComponentUtil; import org.codelibs.fess.util.FacetResponse; import org.codelibs.fess.util.MoreLikeThisResponse; @@ -86,7 +81,6 @@ import org.codelibs.robot.util.CharUtil; import org.codelibs.sastruts.core.SSCConstants; import org.codelibs.sastruts.core.exception.SSCActionMessagesException; import org.dbflute.optional.OptionalEntity; -import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.TermQueryBuilder; import org.seasar.framework.beans.util.Beans; @@ -133,9 +127,6 @@ public class IndexAction { @Resource protected FessEsClient fessEsClient; - @Resource - protected FavoriteLogService favoriteLogService; - @Binding(bindingType = BindingType.MAY) @Resource protected ScreenShotManager screenShotManager; @@ -389,10 +380,9 @@ public class IndexAction { final SearchLogHelper searchLogHelper = ComponentUtil.getSearchLogHelper(); final ClickLog clickLog = new ClickLog(); clickLog.setUrl(url); - final LocalDateTime now = systemHelper.getCurrentTime(); + final long now = systemHelper.getCurrentTimeAsLong(); clickLog.setRequestedTime(now); - clickLog.setQueryRequestedTime(LocalDateTime.ofInstant(Instant.ofEpochMilli(Long.parseLong(indexForm.rt)), - ZoneId.systemDefault())); + clickLog.setQueryRequestedTime(Long.parseLong(indexForm.rt)); clickLog.setUserSessionId(userSessionId); clickLog.setDocId(indexForm.docId); long clickCount = 0; @@ -697,7 +687,8 @@ public class IndexAction { return null; } - if (!favoriteLogService.addUrl(userCode, favoriteUrl)) { + final SearchLogHelper searchLogHelper = ComponentUtil.getSearchLogHelper(); + if (!searchLogHelper.addfavoriteLog(userCode, favoriteUrl)) { WebApiUtil.setError(4, "Failed to add url: " + favoriteUrl); return null; } @@ -718,67 +709,6 @@ public class IndexAction { } - @Execute(validator = false) - public String favoritesApi() { - if (Constants.FALSE.equals(crawlerProperties.getProperty(Constants.USER_FAVORITE_PROPERTY, Constants.FALSE))) { - WebApiUtil.setError(9, "Unsupported operation."); - return null; - } - - try { - final String userCode = userInfoHelper.getUserCode(); - - if (StringUtil.isBlank(userCode)) { - WebApiUtil.setError(2, "No user session."); - return null; - } else if (StringUtil.isBlank(indexForm.queryId)) { - WebApiUtil.setError(3, "Query ID is null."); - return null; - } - - final String[] docIds = userInfoHelper.getResultDocIds(indexForm.queryId); - final List> docList = - fessEsClient.getDocumentList(fieldHelper.docIndex, fieldHelper.docType, queryRequstBuilder -> { - if (docIds == null || docIds.length == 0) { - return false; - } - - queryRequstBuilder.setFrom(0).setSize(getMaxPageSize()); - queryRequstBuilder.addFields(queryHelper.getResponseFields()); - final BoolQueryBuilder boolQuery = QueryBuilders.boolQuery(); - for (int i = 0; i < docIds.length && i < getMaxPageSize(); i++) { - boolQuery.should(QueryBuilders.termQuery(fieldHelper.docIdField, docIds[i])); - } - queryRequstBuilder.setQuery(boolQuery); - return true; - }); - List urlList = new ArrayList(docList.size()); - for (final Map doc : docList) { - final Object urlObj = doc.get(fieldHelper.urlField); - if (urlObj != null) { - urlList.add(urlObj.toString()); - } - } - urlList = favoriteLogService.getUrlList(userCode, urlList); - final List docIdList = new ArrayList(urlList.size()); - for (final Map doc : docList) { - final Object urlObj = doc.get(fieldHelper.urlField); - if (urlObj != null && urlList.contains(urlObj.toString())) { - final Object docIdObj = doc.get(fieldHelper.docIdField); - if (docIdObj != null) { - docIdList.add(docIdObj.toString()); - } - } - } - - WebApiUtil.setObject("docIdList", docIdList); - } catch (final Exception e) { - WebApiUtil.setError(1, e); - } - return null; - - } - @Execute(validator = false) public String osdd() { openSearchHelper.write(ResponseUtil.getResponse()); @@ -941,7 +871,7 @@ public class IndexAction { // search log if (searchLogSupport) { - final LocalDateTime now = systemHelper.getCurrentTime(); + final long now = systemHelper.getCurrentTimeAsLong(); final SearchLogHelper searchLogHelper = ComponentUtil.getSearchLogHelper(); final SearchLog searchLog = new SearchLog(); @@ -974,25 +904,14 @@ public class IndexAction { searchLog.setUserSessionId(userCode); } final Object accessType = request.getAttribute(Constants.SEARCH_LOG_ACCESS_TYPE); - if (accessType instanceof CDef.AccessType) { - switch ((CDef.AccessType) accessType) { - case Json: - searchLog.setAccessType_Json(); - searchLog.setAccessType_Others(); - searchLog.setAccessType_Xml(); - break; - case Xml: - searchLog.setAccessType_Xml(); - break; - case Others: - searchLog.setAccessType_Others(); - break; - default: - searchLog.setAccessType_Web(); - break; - } + if (Constants.SEARCH_LOG_ACCESS_TYPE_JSON.equals(accessType)) { + searchLog.setAccessType(Constants.SEARCH_LOG_ACCESS_TYPE_JSON); + } else if (Constants.SEARCH_LOG_ACCESS_TYPE_XML.equals(accessType)) { + searchLog.setAccessType(Constants.SEARCH_LOG_ACCESS_TYPE_XML); + } else if (Constants.SEARCH_LOG_ACCESS_TYPE_OTHER.equals(accessType)) { + searchLog.setAccessType(Constants.SEARCH_LOG_ACCESS_TYPE_OTHER); } else { - searchLog.setAccessType_Web(); + searchLog.setAccessType(Constants.SEARCH_LOG_ACCESS_TYPE_WEB); } @SuppressWarnings("unchecked") diff --git a/src/main/java/org/codelibs/fess/web/admin/BoostDocumentRuleAction.java b/src/main/java/org/codelibs/fess/web/admin/BoostDocumentRuleAction.java index 375b16872..129629a9a 100644 --- a/src/main/java/org/codelibs/fess/web/admin/BoostDocumentRuleAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/BoostDocumentRuleAction.java @@ -16,7 +16,6 @@ package org.codelibs.fess.web.admin; -import java.time.LocalDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/src/main/java/org/codelibs/fess/web/admin/CrawlingSessionAction.java b/src/main/java/org/codelibs/fess/web/admin/CrawlingSessionAction.java index d0684bdb6..19950bf1f 100644 --- a/src/main/java/org/codelibs/fess/web/admin/CrawlingSessionAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/CrawlingSessionAction.java @@ -26,8 +26,8 @@ import javax.annotation.Resource; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.CrawlingSession; -import org.codelibs.fess.db.exentity.CrawlingSessionInfo; +import org.codelibs.fess.es.exentity.CrawlingSession; +import org.codelibs.fess.es.exentity.CrawlingSessionInfo; import org.codelibs.fess.helper.JobHelper; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.pager.CrawlingSessionPager; @@ -88,7 +88,7 @@ public class CrawlingSessionAction extends FessAdminAction { public List getCrawlingSessionInfoItems() { if (crawlingSessionForm.id != null) { - return crawlingSessionService.getCrawlingSessionInfoList(Long.parseLong(crawlingSessionForm.id)); + return crawlingSessionService.getCrawlingSessionInfoList(crawlingSessionForm.id); } return Collections.emptyList(); } diff --git a/src/main/java/org/codelibs/fess/web/admin/CrawlingSessionForm.java b/src/main/java/org/codelibs/fess/web/admin/CrawlingSessionForm.java index 8ab7ef11e..cb096305d 100644 --- a/src/main/java/org/codelibs/fess/web/admin/CrawlingSessionForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/CrawlingSessionForm.java @@ -22,7 +22,6 @@ import java.util.Map; import org.seasar.struts.annotation.DateType; import org.seasar.struts.annotation.IntegerType; -import org.seasar.struts.annotation.LongType; import org.seasar.struts.annotation.Maxbytelength; import org.seasar.struts.annotation.Required; @@ -43,7 +42,7 @@ public class CrawlingSessionForm implements Serializable { } @Required(target = "confirmfromupdate,update,delete") - @LongType + @Maxbytelength(maxbytelength = 1000) public String id; @Required(target = "confirmfromupdate,update,delete") diff --git a/src/main/java/org/codelibs/fess/web/admin/DataAction.java b/src/main/java/org/codelibs/fess/web/admin/DataAction.java index 42fede4e0..c960b71af 100644 --- a/src/main/java/org/codelibs/fess/web/admin/DataAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/DataAction.java @@ -41,9 +41,7 @@ import org.codelibs.fess.Constants; import org.codelibs.fess.FessSystemException; import org.codelibs.fess.crud.util.SAStrutsUtil; import org.codelibs.fess.helper.SystemHelper; -import org.codelibs.fess.service.ClickLogService; import org.codelibs.fess.service.CrawlingSessionService; -import org.codelibs.fess.service.SearchLogService; import org.codelibs.robot.util.StreamUtil; import org.codelibs.sastruts.core.exception.SSCActionMessagesException; import org.seasar.struts.annotation.ActionForm; @@ -66,12 +64,6 @@ public class DataAction implements Serializable { @Resource protected CrawlingSessionService crawlingSessionService; - @Resource - protected SearchLogService searchLogService; - - @Resource - protected ClickLogService clickLogService; - @Resource protected DynamicProperties crawlerProperties; @@ -117,62 +109,6 @@ public class DataAction implements Serializable { } } - @Execute(validator = false) - public String downloadSearchLog() { - final DateFormat df = new SimpleDateFormat(CoreLibConstants.DATE_FORMAT_DIGIT_ONLY); - final StringBuilder buf = new StringBuilder(); - buf.append("backup-sl-"); - buf.append(df.format(new Date())); - buf.append(".csv"); - - final HttpServletResponse response = ResponseUtil.getResponse(); - response.setContentType("application/octet-stream"); - response.setHeader("Content-Disposition", "attachment; filename=\"" + buf.toString() + "\""); - - Writer writer = null; - try { - writer = - new BufferedWriter(new OutputStreamWriter(response.getOutputStream(), crawlerProperties.getProperty( - Constants.CSV_FILE_ENCODING_PROPERTY, Constants.UTF_8))); - searchLogService.exportCsv(writer); - writer.flush(); - return null; - } catch (final Exception e) { - logger.error("Failed to export data.", e); - throw new SSCActionMessagesException(e, "errors.failed_to_export_data"); - } finally { - IOUtils.closeQuietly(writer); - } - } - - @Execute(validator = false) - public String downloadClickLog() { - final DateFormat df = new SimpleDateFormat(CoreLibConstants.DATE_FORMAT_DIGIT_ONLY); - final StringBuilder buf = new StringBuilder(); - buf.append("backup-cl-"); - buf.append(df.format(new Date())); - buf.append(".csv"); - - final HttpServletResponse response = ResponseUtil.getResponse(); - response.setContentType("application/octet-stream"); - response.setHeader("Content-Disposition", "attachment; filename=\"" + buf.toString() + "\""); - - Writer writer = null; - try { - writer = - new BufferedWriter(new OutputStreamWriter(response.getOutputStream(), crawlerProperties.getProperty( - Constants.CSV_FILE_ENCODING_PROPERTY, Constants.UTF_8))); - clickLogService.exportCsv(writer); - writer.flush(); - return null; - } catch (final Exception e) { - logger.error("Failed to export data.", e); - throw new SSCActionMessagesException(e, "errors.failed_to_export_data"); - } finally { - IOUtils.closeQuietly(writer); - } - } - @Execute(validator = true, input = "index") public String upload() { final String fileName = dataForm.uploadedFile.getFileName(); @@ -205,7 +141,7 @@ public class DataAction implements Serializable { final File oFile = tempFile; try { final String head = new String(b, Constants.UTF_8); - if (!head.startsWith("SessionId,") && !head.startsWith("SearchWord,") && !head.startsWith("SearchId,")) { + if (!head.startsWith("SessionId,")) { logger.error("Unknown file: " + dataForm.uploadedFile); throw new SSCActionMessagesException("errors.unknown_import_file"); } @@ -217,12 +153,6 @@ public class DataAction implements Serializable { if (head.startsWith("SessionId,")) { // Crawling Session crawlingSessionService.importCsv(reader); - } else if (head.startsWith("SearchWord,")) { - // Search Log - searchLogService.importCsv(reader); - } else if (head.startsWith("SearchId,")) { - // Click Log - clickLogService.importCsv(reader); } } catch (final Exception e) { logger.error("Failed to import data.", e); diff --git a/src/main/java/org/codelibs/fess/web/admin/DataCrawlingConfigAction.java b/src/main/java/org/codelibs/fess/web/admin/DataConfigAction.java similarity index 64% rename from src/main/java/org/codelibs/fess/web/admin/DataCrawlingConfigAction.java rename to src/main/java/org/codelibs/fess/web/admin/DataConfigAction.java index 674521a1b..c7e5e17ea 100644 --- a/src/main/java/org/codelibs/fess/web/admin/DataCrawlingConfigAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/DataConfigAction.java @@ -16,7 +16,6 @@ package org.codelibs.fess.web.admin; -import java.time.LocalDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -29,13 +28,13 @@ import org.codelibs.fess.beans.FessBeans; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.DataCrawlingConfig; -import org.codelibs.fess.db.exentity.LabelType; -import org.codelibs.fess.db.exentity.RoleType; import org.codelibs.fess.ds.DataStoreFactory; +import org.codelibs.fess.es.exentity.DataConfig; +import org.codelibs.fess.es.exentity.LabelType; +import org.codelibs.fess.es.exentity.RoleType; import org.codelibs.fess.helper.SystemHelper; -import org.codelibs.fess.pager.DataCrawlingConfigPager; -import org.codelibs.fess.service.DataCrawlingConfigService; +import org.codelibs.fess.pager.DataConfigPager; +import org.codelibs.fess.service.DataConfigService; import org.codelibs.fess.service.FailureUrlService; import org.codelibs.fess.service.LabelTypeService; import org.codelibs.fess.service.RoleTypeService; @@ -50,25 +49,25 @@ import org.seasar.struts.exception.ActionMessagesException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class DataCrawlingConfigAction extends FessAdminAction { +public class DataConfigAction extends FessAdminAction { - private static final Logger logger = LoggerFactory.getLogger(DataCrawlingConfigAction.class); + private static final Logger logger = LoggerFactory.getLogger(DataConfigAction.class); // for list - public List dataCrawlingConfigItems; + public List dataConfigItems; // for edit/confirm/delete @ActionForm @Resource - protected DataCrawlingConfigForm dataCrawlingConfigForm; + protected DataConfigForm dataConfigForm; @Resource - protected DataCrawlingConfigService dataCrawlingConfigService; + protected DataConfigService dataConfigService; @Resource - protected DataCrawlingConfigPager dataCrawlingConfigPager; + protected DataConfigPager dataConfigPager; @Resource protected RoleTypeService roleTypeService; @@ -86,15 +85,15 @@ public class DataCrawlingConfigAction extends FessAdminAction { protected SystemHelper systemHelper; public String getHelpLink() { - return systemHelper.getHelpLink("dataCrawlingConfig"); + return systemHelper.getHelpLink("dataConfig"); } protected String displayList(final boolean redirect) { // page navi - dataCrawlingConfigItems = dataCrawlingConfigService.getDataCrawlingConfigList(dataCrawlingConfigPager); + dataConfigItems = dataConfigService.getDataConfigList(dataConfigPager); // restore from pager - Beans.copy(dataCrawlingConfigPager, dataCrawlingConfigForm.searchParams).excludes(CommonConstants.PAGER_CONVERSION_RULE) + Beans.copy(dataConfigPager, dataConfigForm.searchParams).excludes(CommonConstants.PAGER_CONVERSION_RULE) .execute(); @@ -113,12 +112,12 @@ public class DataCrawlingConfigAction extends FessAdminAction { @Execute(validator = false, input = "error.jsp", urlPattern = "list/{pageNumber}") public String list() { // page navi - if (StringUtil.isNotBlank(dataCrawlingConfigForm.pageNumber)) { + if (StringUtil.isNotBlank(dataConfigForm.pageNumber)) { try { - dataCrawlingConfigPager.setCurrentPageNumber(Integer.parseInt(dataCrawlingConfigForm.pageNumber)); + dataConfigPager.setCurrentPageNumber(Integer.parseInt(dataConfigForm.pageNumber)); } catch (final NumberFormatException e) { if (logger.isDebugEnabled()) { - logger.debug("Invalid value: " + dataCrawlingConfigForm.pageNumber, e); + logger.debug("Invalid value: " + dataConfigForm.pageNumber, e); } } } @@ -128,7 +127,7 @@ public class DataCrawlingConfigAction extends FessAdminAction { @Execute(validator = false, input = "error.jsp") public String search() { - Beans.copy(dataCrawlingConfigForm.searchParams, dataCrawlingConfigPager).excludes(CommonConstants.PAGER_CONVERSION_RULE) + Beans.copy(dataConfigForm.searchParams, dataConfigPager).excludes(CommonConstants.PAGER_CONVERSION_RULE) .execute(); @@ -137,7 +136,7 @@ public class DataCrawlingConfigAction extends FessAdminAction { @Execute(validator = false, input = "error.jsp") public String reset() { - dataCrawlingConfigPager.clear(); + dataConfigPager.clear(); return displayList(false); } @@ -155,12 +154,12 @@ public class DataCrawlingConfigAction extends FessAdminAction { @Execute(validator = false, input = "error.jsp", urlPattern = "confirmpage/{crudMode}/{id}") public String confirmpage() { - if (dataCrawlingConfigForm.crudMode != CommonConstants.CONFIRM_MODE) { + if (dataConfigForm.crudMode != CommonConstants.CONFIRM_MODE) { throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.CONFIRM_MODE, - dataCrawlingConfigForm.crudMode }); + dataConfigForm.crudMode }); } - loadDataCrawlingConfig(); + loadDataConfig(); return "confirm.jsp"; } @@ -169,8 +168,8 @@ public class DataCrawlingConfigAction extends FessAdminAction { @Execute(validator = false, input = "error.jsp") public String createpage() { // page navi - dataCrawlingConfigForm.initialize(); - dataCrawlingConfigForm.crudMode = CommonConstants.CREATE_MODE; + dataConfigForm.initialize(); + dataConfigForm.crudMode = CommonConstants.CREATE_MODE; return "edit.jsp"; } @@ -178,12 +177,12 @@ public class DataCrawlingConfigAction extends FessAdminAction { @Token(save = true, validate = false) @Execute(validator = false, input = "error.jsp", urlPattern = "editpage/{crudMode}/{id}") public String editpage() { - if (dataCrawlingConfigForm.crudMode != CommonConstants.EDIT_MODE) { - throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.EDIT_MODE, - dataCrawlingConfigForm.crudMode }); + if (dataConfigForm.crudMode != CommonConstants.EDIT_MODE) { + throw new ActionMessagesException("errors.crud_invalid_mode", + new Object[] { CommonConstants.EDIT_MODE, dataConfigForm.crudMode }); } - loadDataCrawlingConfig(); + loadDataConfig(); return "edit.jsp"; } @@ -191,9 +190,9 @@ public class DataCrawlingConfigAction extends FessAdminAction { @Token(save = true, validate = false) @Execute(validator = false, input = "error.jsp") public String editfromconfirm() { - dataCrawlingConfigForm.crudMode = CommonConstants.EDIT_MODE; + dataConfigForm.crudMode = CommonConstants.EDIT_MODE; - loadDataCrawlingConfig(); + loadDataConfig(); return "edit.jsp"; } @@ -213,12 +212,12 @@ public class DataCrawlingConfigAction extends FessAdminAction { @Token(save = true, validate = false) @Execute(validator = false, input = "error.jsp", urlPattern = "deletepage/{crudMode}/{id}") public String deletepage() { - if (dataCrawlingConfigForm.crudMode != CommonConstants.DELETE_MODE) { + if (dataConfigForm.crudMode != CommonConstants.DELETE_MODE) { throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.DELETE_MODE, - dataCrawlingConfigForm.crudMode }); + dataConfigForm.crudMode }); } - loadDataCrawlingConfig(); + loadDataConfig(); return "confirm.jsp"; } @@ -226,9 +225,9 @@ public class DataCrawlingConfigAction extends FessAdminAction { @Token(save = true, validate = false) @Execute(validator = false, input = "error.jsp") public String deletefromconfirm() { - dataCrawlingConfigForm.crudMode = CommonConstants.DELETE_MODE; + dataConfigForm.crudMode = CommonConstants.DELETE_MODE; - loadDataCrawlingConfig(); + loadDataConfig(); return "confirm.jsp"; } @@ -237,8 +236,8 @@ public class DataCrawlingConfigAction extends FessAdminAction { @Execute(validator = true, input = "edit.jsp") public String create() { try { - final DataCrawlingConfig dataCrawlingConfig = createDataCrawlingConfig(); - dataCrawlingConfigService.store(dataCrawlingConfig); + final DataConfig dataConfig = createDataConfig(); + dataConfigService.store(dataConfig); SAStrutsUtil.addSessionMessage("success.crud_create_crud_table"); return displayList(true); @@ -258,8 +257,8 @@ public class DataCrawlingConfigAction extends FessAdminAction { @Execute(validator = true, input = "edit.jsp") public String update() { try { - final DataCrawlingConfig dataCrawlingConfig = createDataCrawlingConfig(); - dataCrawlingConfigService.store(dataCrawlingConfig); + final DataConfig dataConfig = createDataConfig(); + dataConfigService.store(dataConfig); SAStrutsUtil.addSessionMessage("success.crud_update_crud_table"); return displayList(true); @@ -278,70 +277,66 @@ public class DataCrawlingConfigAction extends FessAdminAction { protected Map createKeyMap() { final Map keys = new HashMap(); - keys.put("id", dataCrawlingConfigForm.id); + keys.put("id", dataConfigForm.id); return keys; } - protected void loadDataCrawlingConfig() { + protected void loadDataConfig() { - final DataCrawlingConfig dataCrawlingConfig = dataCrawlingConfigService.getDataCrawlingConfig(createKeyMap()); - if (dataCrawlingConfig == null) { + final DataConfig dataConfig = dataConfigService.getDataConfig(createKeyMap()); + if (dataConfig == null) { // throw an exception - throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { dataCrawlingConfigForm.id }); + throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { dataConfigForm.id }); } - FessBeans.copy(dataCrawlingConfig, dataCrawlingConfigForm).commonColumnDateConverter().excludes("searchParams", "mode").execute(); + FessBeans.copy(dataConfig, dataConfigForm).commonColumnDateConverter().excludes("searchParams", "mode").execute(); // normalize boost - if (dataCrawlingConfigForm.boost != null && dataCrawlingConfigForm.boost.indexOf('.') > 0) { - dataCrawlingConfigForm.boost = dataCrawlingConfigForm.boost.substring(0, dataCrawlingConfigForm.boost.indexOf('.')); + if (dataConfigForm.boost != null && dataConfigForm.boost.indexOf('.') > 0) { + dataConfigForm.boost = dataConfigForm.boost.substring(0, dataConfigForm.boost.indexOf('.')); } } - protected DataCrawlingConfig createDataCrawlingConfig() { - DataCrawlingConfig dataCrawlingConfig; + protected DataConfig createDataConfig() { + DataConfig dataConfig; final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); - if (dataCrawlingConfigForm.crudMode == CommonConstants.EDIT_MODE) { - dataCrawlingConfig = dataCrawlingConfigService.getDataCrawlingConfig(createKeyMap()); - if (dataCrawlingConfig == null) { + final long currentTime = systemHelper.getCurrentTimeAsLong(); + if (dataConfigForm.crudMode == CommonConstants.EDIT_MODE) { + dataConfig = dataConfigService.getDataConfig(createKeyMap()); + if (dataConfig == null) { // throw an exception - throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { dataCrawlingConfigForm.id }); + throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { dataConfigForm.id }); } } else { - dataCrawlingConfig = new DataCrawlingConfig(); - dataCrawlingConfig.setCreatedBy(username); - dataCrawlingConfig.setCreatedTime(currentTime); + dataConfig = new DataConfig(); + dataConfig.setCreatedBy(username); + dataConfig.setCreatedTime(currentTime); } - dataCrawlingConfig.setUpdatedBy(username); - dataCrawlingConfig.setUpdatedTime(currentTime); - FessBeans.copy(dataCrawlingConfigForm, dataCrawlingConfig).excludesCommonColumns().execute(); + dataConfig.setUpdatedBy(username); + dataConfig.setUpdatedTime(currentTime); + FessBeans.copy(dataConfigForm, dataConfig).excludesCommonColumns().execute(); - return dataCrawlingConfig; + return dataConfig; } @Execute(validator = false, input = "error.jsp") public String delete() { - if (dataCrawlingConfigForm.crudMode != CommonConstants.DELETE_MODE) { + if (dataConfigForm.crudMode != CommonConstants.DELETE_MODE) { throw new SSCActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.DELETE_MODE, - dataCrawlingConfigForm.crudMode }); + dataConfigForm.crudMode }); } try { - final DataCrawlingConfig dataCrawlingConfig = dataCrawlingConfigService.getDataCrawlingConfig(createKeyMap()); - if (dataCrawlingConfig == null) { + final DataConfig dataConfig = dataConfigService.getDataConfig(createKeyMap()); + if (dataConfig == null) { // throw an exception - throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { dataCrawlingConfigForm.id }); + throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { dataConfigForm.id }); } - failureUrlService.deleteByConfigId(dataCrawlingConfig.getConfigId()); + failureUrlService.deleteByConfigId(dataConfig.getConfigId()); - final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); - dataCrawlingConfig.setDeletedBy(username); - dataCrawlingConfig.setDeletedTime(currentTime); - dataCrawlingConfigService.store(dataCrawlingConfig); + dataConfigService.delete(dataConfig); SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table"); return displayList(true); diff --git a/src/main/java/org/codelibs/fess/web/admin/DataCrawlingConfigForm.java b/src/main/java/org/codelibs/fess/web/admin/DataConfigForm.java similarity index 79% rename from src/main/java/org/codelibs/fess/web/admin/DataCrawlingConfigForm.java rename to src/main/java/org/codelibs/fess/web/admin/DataConfigForm.java index 7543c039c..33329b9c9 100644 --- a/src/main/java/org/codelibs/fess/web/admin/DataCrawlingConfigForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/DataConfigForm.java @@ -17,20 +17,17 @@ package org.codelibs.fess.web.admin; import java.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; import java.util.HashMap; import java.util.Map; -import org.codelibs.fess.Constants; -import org.seasar.struts.annotation.DateType; +import org.codelibs.fess.util.ComponentUtil; 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 class DataCrawlingConfigForm implements Serializable { +public class DataConfigForm implements Serializable { private static final long serialVersionUID = 1L; @@ -51,7 +48,7 @@ public class DataCrawlingConfigForm implements Serializable { } @Required(target = "confirmfromupdate,update,delete") - @LongType + @Maxbytelength(maxbytelength = 1000) public String id; @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") @@ -72,7 +69,7 @@ public class DataCrawlingConfigForm implements Serializable { public String boost; @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - @Maxbytelength(maxbytelength = 1) + @Maxbytelength(maxbytelength = 5) public String available; @Required(target = "confirmfromupdate,update,delete") @@ -85,21 +82,15 @@ public class DataCrawlingConfigForm implements Serializable { public String createdBy; @Required(target = "confirmfromupdate,update,delete") - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType public String createdTime; @Maxbytelength(maxbytelength = 255) public String updatedBy; - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType 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; @@ -113,17 +104,11 @@ public class DataCrawlingConfigForm implements Serializable { boost = "1"; available = null; sortOrder = null; - createdBy = null; - createdTime = null; + createdBy = "system"; + createdTime = Long.toString(ComponentUtil.getSystemHelper().getCurrentTimeAsLong()); updatedBy = null; updatedTime = null; - deletedBy = null; - deletedTime = null; versionNo = null; sortOrder = "0"; - // Temporary data - createdBy = "system"; - final SimpleDateFormat sdf = new SimpleDateFormat(Constants.DEFAULT_DATETIME_FORMAT); - createdTime = sdf.format(new Date()); } } diff --git a/src/main/java/org/codelibs/fess/web/admin/FailureUrlAction.java b/src/main/java/org/codelibs/fess/web/admin/FailureUrlAction.java index 91311649b..7c1227d31 100644 --- a/src/main/java/org/codelibs/fess/web/admin/FailureUrlAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/FailureUrlAction.java @@ -25,7 +25,7 @@ import javax.annotation.Resource; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.FailureUrl; +import org.codelibs.fess.es.exentity.FailureUrl; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.pager.FailureUrlPager; import org.codelibs.fess.service.FailureUrlService; diff --git a/src/main/java/org/codelibs/fess/web/admin/FailureUrlForm.java b/src/main/java/org/codelibs/fess/web/admin/FailureUrlForm.java index f4b9da3e0..90932576a 100644 --- a/src/main/java/org/codelibs/fess/web/admin/FailureUrlForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/FailureUrlForm.java @@ -23,7 +23,7 @@ import java.util.Map; import org.codelibs.fess.Constants; import org.seasar.struts.annotation.DateType; import org.seasar.struts.annotation.IntegerType; -import org.seasar.struts.annotation.LongType; +import org.seasar.struts.annotation.Maxbytelength; import org.seasar.struts.annotation.Required; public class FailureUrlForm implements Serializable { @@ -47,7 +47,7 @@ public class FailureUrlForm implements Serializable { } @Required(target = "confirmfromupdate,update,delete") - @LongType + @Maxbytelength(maxbytelength = 1000) public String id; @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") @@ -68,6 +68,7 @@ public class FailureUrlForm implements Serializable { @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) public String lastAccessTime; + @Maxbytelength(maxbytelength = 1000) public String configId; public void initialize() { diff --git a/src/main/java/org/codelibs/fess/web/admin/FavoriteLogAction.java b/src/main/java/org/codelibs/fess/web/admin/FavoriteLogAction.java deleted file mode 100644 index 8b3301f5a..000000000 --- a/src/main/java/org/codelibs/fess/web/admin/FavoriteLogAction.java +++ /dev/null @@ -1,385 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.web.admin; - -import java.io.BufferedWriter; -import java.io.OutputStreamWriter; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.io.IOUtils; -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.Constants; -import org.codelibs.fess.crud.CommonConstants; -import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.FavoriteLog; -import org.codelibs.fess.helper.SystemHelper; -import org.codelibs.fess.pager.FavoriteLogPager; -import org.codelibs.fess.service.FavoriteLogService; -import org.codelibs.fess.web.base.FessAdminAction; -import org.codelibs.sastruts.core.annotation.Token; -import org.codelibs.sastruts.core.exception.SSCActionMessagesException; -import org.seasar.framework.beans.util.Beans; -import org.seasar.struts.annotation.ActionForm; -import org.seasar.struts.annotation.Execute; -import org.seasar.struts.exception.ActionMessagesException; -import org.seasar.struts.util.RequestUtil; -import org.seasar.struts.util.ResponseUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.ibm.icu.text.SimpleDateFormat; - -public class FavoriteLogAction extends FessAdminAction { - - private static final Logger logger = LoggerFactory.getLogger(FavoriteLogAction.class); - - // for list - - public List favoriteLogItems; - - // for edit/confirm/delete - - @ActionForm - @Resource - protected FavoriteLogForm favoriteLogForm; - - @Resource - protected FavoriteLogService favoriteLogService; - - @Resource - protected FavoriteLogPager favoriteLogPager; - - @Resource - protected SystemHelper systemHelper; - - public String getHelpLink() { - return systemHelper.getHelpLink("favoriteLog"); - } - - protected String displayList(final boolean redirect) { - // page navi - favoriteLogItems = favoriteLogService.getFavoriteLogList(favoriteLogPager); - - // restore from pager - Beans.copy(favoriteLogPager, favoriteLogForm.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(favoriteLogForm.pageNumber)) { - try { - favoriteLogPager.setCurrentPageNumber(Integer.parseInt(favoriteLogForm.pageNumber)); - } catch (final NumberFormatException e) { - if (logger.isDebugEnabled()) { - logger.debug("Invalid value: " + favoriteLogForm.pageNumber, e); - } - } - } - - return displayList(false); - } - - @Execute(validator = false, input = "error.jsp") - public String search() { - Beans.copy(favoriteLogForm.searchParams, favoriteLogPager).excludes(CommonConstants.PAGER_CONVERSION_RULE) - - .execute(); - - return displayList(false); - } - - @Execute(validator = false, input = "error.jsp") - public String reset() { - favoriteLogPager.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 (favoriteLogForm.crudMode != CommonConstants.CONFIRM_MODE) { - throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.CONFIRM_MODE, - favoriteLogForm.crudMode }); - } - - loadFavoriteLog(); - - return "confirm.jsp"; - } - - @Token(save = true, validate = false) - @Execute(validator = false, input = "error.jsp") - public String createpage() { - // page navi - favoriteLogForm.initialize(); - favoriteLogForm.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 (favoriteLogForm.crudMode != CommonConstants.EDIT_MODE) { - throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.EDIT_MODE, - favoriteLogForm.crudMode }); - } - - loadFavoriteLog(); - - return "edit.jsp"; - } - - @Token(save = true, validate = false) - @Execute(validator = false, input = "error.jsp") - public String editfromconfirm() { - favoriteLogForm.crudMode = CommonConstants.EDIT_MODE; - - loadFavoriteLog(); - - 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 (favoriteLogForm.crudMode != CommonConstants.DELETE_MODE) { - throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.DELETE_MODE, - favoriteLogForm.crudMode }); - } - - loadFavoriteLog(); - - return "confirm.jsp"; - } - - @Token(save = true, validate = false) - @Execute(validator = false, input = "error.jsp") - public String deletefromconfirm() { - favoriteLogForm.crudMode = CommonConstants.DELETE_MODE; - - loadFavoriteLog(); - - return "confirm.jsp"; - } - - @Token(save = false, validate = true) - @Execute(validator = true, input = "edit.jsp") - public String create() { - try { - final FavoriteLog favoriteLog = createFavoriteLog(); - favoriteLogService.store(favoriteLog); - SAStrutsUtil.addSessionMessage("success.crud_create_crud_table"); - - return displayList(true); - } catch (final ActionMessagesException e) { - logger.error(e.getMessage(), e); - throw e; - } catch (final CrudMessageException e) { - logger.error(e.getMessage(), e); - throw new ActionMessagesException(e.getMessageId(), e.getArgs()); - } catch (final Exception e) { - logger.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 FavoriteLog favoriteLog = createFavoriteLog(); - favoriteLogService.store(favoriteLog); - SAStrutsUtil.addSessionMessage("success.crud_update_crud_table"); - - return displayList(true); - } catch (final ActionMessagesException e) { - logger.error(e.getMessage(), e); - throw e; - } catch (final CrudMessageException e) { - logger.error(e.getMessage(), e); - throw new ActionMessagesException(e.getMessageId(), e.getArgs()); - } catch (final Exception e) { - logger.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 (favoriteLogForm.crudMode != CommonConstants.DELETE_MODE) { - throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.DELETE_MODE, - favoriteLogForm.crudMode }); - } - - try { - final FavoriteLog favoriteLog = favoriteLogService.getFavoriteLog(createKeyMap()); - if (favoriteLog == null) { - // throw an exception - throw new ActionMessagesException("errors.crud_could_not_find_crud_table", - - new Object[] { favoriteLogForm.id }); - - } - - favoriteLogService.delete(favoriteLog); - SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table"); - - return displayList(true); - } catch (final ActionMessagesException e) { - logger.error(e.getMessage(), e); - throw e; - } catch (final CrudMessageException e) { - logger.error(e.getMessage(), e); - throw new ActionMessagesException(e.getMessageId(), e.getArgs()); - } catch (final Exception e) { - logger.error(e.getMessage(), e); - throw new ActionMessagesException("errors.crud_failed_to_delete_crud_table"); - } - } - - protected void loadFavoriteLog() { - - final FavoriteLog favoriteLog = favoriteLogService.getFavoriteLog(createKeyMap()); - if (favoriteLog == null) { - // throw an exception - throw new ActionMessagesException("errors.crud_could_not_find_crud_table", - - new Object[] { favoriteLogForm.id }); - - } - - Beans.copy(favoriteLog, favoriteLogForm).excludes("searchParams", "mode") - - .execute(); - } - - protected FavoriteLog createFavoriteLog() { - FavoriteLog favoriteLog; - if (favoriteLogForm.crudMode == CommonConstants.EDIT_MODE) { - favoriteLog = favoriteLogService.getFavoriteLog(createKeyMap()); - if (favoriteLog == null) { - // throw an exception - throw new ActionMessagesException("errors.crud_could_not_find_crud_table", - - new Object[] { favoriteLogForm.id }); - - } - } else { - favoriteLog = new FavoriteLog(); - } - Beans.copy(favoriteLogForm, favoriteLog).excludes("searchParams", "mode") - - .execute(); - - return favoriteLog; - } - - protected Map createKeyMap() { - final Map keys = new HashMap(); - - keys.put("id", favoriteLogForm.id); - - return keys; - } - - @Execute(validator = false, input = "error.jsp") - public String deleteall() { - favoriteLogService.deleteAll(favoriteLogPager); - SAStrutsUtil.addSessionMessage("success.favorite_log_delete_all"); - return displayList(true); - } - - @Execute(validator = false, input = "error.jsp") - public String download() { - BufferedWriter writer = null; - final SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); - final String fileName = "FessFavoriteLog_" + sdf.format(new Date()) + ".csv"; - final HttpServletResponse response = ResponseUtil.getResponse(); - response.setContentType("text/csv"); - response.setHeader("Content-disposition", "attachment; filename=\"" + fileName + "\""); - try { - writer = new BufferedWriter(new OutputStreamWriter(response.getOutputStream(), getCsvEncoding())); - favoriteLogService.dump(writer, favoriteLogPager); - writer.flush(); - } catch (final Exception e) { - logger.error("Could not create FessSearchLog.csv.", e); - throw new SSCActionMessagesException(e, "errors.could_not_create_search_log_csv"); - } finally { - IOUtils.closeQuietly(writer); - } - return null; - } - - private String getCsvEncoding() { - if (StringUtil.isNotBlank(favoriteLogForm.csvEncoding)) { - return favoriteLogForm.csvEncoding; - } - final Locale locale = RequestUtil.getRequest().getLocale(); - if ("ja".equals(locale.getLanguage())) { - return Constants.MS932; - } - return Constants.UTF_8; - } - -} diff --git a/src/main/java/org/codelibs/fess/web/admin/FavoriteLogForm.java b/src/main/java/org/codelibs/fess/web/admin/FavoriteLogForm.java deleted file mode 100644 index aad2138c3..000000000 --- a/src/main/java/org/codelibs/fess/web/admin/FavoriteLogForm.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.web.admin; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.Map; - -import org.codelibs.fess.Constants; -import org.seasar.struts.annotation.DateType; -import org.seasar.struts.annotation.IntegerType; -import org.seasar.struts.annotation.LongType; -import org.seasar.struts.annotation.Required; - -public class FavoriteLogForm implements Serializable { - - private static final long serialVersionUID = 1L; - - public String csvEncoding; - - @IntegerType - public String pageNumber; - - public Map searchParams = new HashMap(); - - @IntegerType - public int crudMode; - - public String getCurrentPageNumber() { - return pageNumber; - } - - @Required(target = "confirmfromupdate,update,delete") - @LongType - public String id; - - @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - @LongType - public String userId; - - @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - public String url; - - @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) - public String createdTime; - - public void initialize() { - id = null; - userId = null; - url = null; - createdTime = null; - } - -} diff --git a/src/main/java/org/codelibs/fess/web/admin/FileAuthenticationAction.java b/src/main/java/org/codelibs/fess/web/admin/FileAuthenticationAction.java index 0cca1630a..5a58d194a 100644 --- a/src/main/java/org/codelibs/fess/web/admin/FileAuthenticationAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/FileAuthenticationAction.java @@ -16,7 +16,6 @@ package org.codelibs.fess.web.admin; -import java.time.LocalDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -30,12 +29,12 @@ import org.codelibs.fess.beans.FessBeans; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.FileAuthentication; -import org.codelibs.fess.db.exentity.FileCrawlingConfig; +import org.codelibs.fess.es.exentity.FileAuthentication; +import org.codelibs.fess.es.exentity.FileConfig; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.pager.FileAuthenticationPager; import org.codelibs.fess.service.FileAuthenticationService; -import org.codelibs.fess.service.FileCrawlingConfigService; +import org.codelibs.fess.service.FileConfigService; import org.codelibs.fess.web.base.FessAdminAction; import org.codelibs.sastruts.core.annotation.Token; import org.codelibs.sastruts.core.exception.SSCActionMessagesException; @@ -59,14 +58,14 @@ public class FileAuthenticationAction extends FessAdminAction { @ActionForm @Resource - protected FileCrawlingConfigService fileCrawlingConfigService; + protected FileAuthenticationForm fileAuthenticationForm; + + @Resource + protected FileConfigService fileConfigService; @Resource protected SystemHelper systemHelper; - @Resource - protected FileAuthenticationForm fileAuthenticationForm; - @Resource protected FileAuthenticationService fileAuthenticationService; @@ -280,7 +279,7 @@ public class FileAuthenticationAction extends FessAdminAction { protected FileAuthentication createFileAuthentication() { FileAuthentication fileAuthentication; final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); + final long currentTime = systemHelper.getCurrentTimeAsLong(); if (fileAuthenticationForm.crudMode == CommonConstants.EDIT_MODE) { fileAuthentication = fileAuthenticationService.getFileAuthentication(createKeyMap()); if (fileAuthentication == null) { @@ -316,12 +315,7 @@ public class FileAuthenticationAction extends FessAdminAction { throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { fileAuthenticationForm.id }); } - // fileAuthenticationService.delete(fileAuthentication); - final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); - fileAuthentication.setDeletedBy(username); - fileAuthentication.setDeletedTime(currentTime); - fileAuthenticationService.store(fileAuthentication); + fileAuthenticationService.delete(fileAuthentication); SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table"); return displayList(true); @@ -346,15 +340,14 @@ public class FileAuthenticationAction extends FessAdminAction { } public boolean isDisplayCreateLink() { - return !fileCrawlingConfigService.getAllFileCrawlingConfigList(false, false, false, null).isEmpty(); + return !fileConfigService.getAllFileConfigList(false, false, false, null).isEmpty(); } - public List> getFileCrawlingConfigItems() { + public List> getFileConfigItems() { final List> items = new ArrayList>(); - final List fileCrawlingConfigList = - fileCrawlingConfigService.getAllFileCrawlingConfigList(false, false, false, null); - for (final FileCrawlingConfig fileCrawlingConfig : fileCrawlingConfigList) { - items.add(createItem(fileCrawlingConfig.getName(), fileCrawlingConfig.getId().toString())); + final List fileConfigList = fileConfigService.getAllFileConfigList(false, false, false, null); + for (final FileConfig fileConfig : fileConfigList) { + items.add(createItem(fileConfig.getName(), fileConfig.getId().toString())); } return items; } diff --git a/src/main/java/org/codelibs/fess/web/admin/FileAuthenticationForm.java b/src/main/java/org/codelibs/fess/web/admin/FileAuthenticationForm.java index b6dfa335e..f2730d4e2 100644 --- a/src/main/java/org/codelibs/fess/web/admin/FileAuthenticationForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/FileAuthenticationForm.java @@ -17,13 +17,10 @@ package org.codelibs.fess.web.admin; import java.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; import java.util.HashMap; import java.util.Map; -import org.codelibs.fess.Constants; -import org.seasar.struts.annotation.DateType; +import org.codelibs.fess.util.ComponentUtil; import org.seasar.struts.annotation.IntRange; import org.seasar.struts.annotation.IntegerType; import org.seasar.struts.annotation.LongType; @@ -47,7 +44,7 @@ public class FileAuthenticationForm implements Serializable { } @Required(target = "confirmfromupdate,update,delete") - @LongType + @Maxbytelength(maxbytelength = 1000) public String id; @Maxbytelength(maxbytelength = 100) @@ -71,28 +68,22 @@ public class FileAuthenticationForm implements Serializable { @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") @LongType - public String fileCrawlingConfigId; + public String fileConfigId; @Required(target = "confirmfromupdate,update,delete") @Maxbytelength(maxbytelength = 255) public String createdBy; @Required(target = "confirmfromupdate,update,delete") - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType public String createdTime; @Maxbytelength(maxbytelength = 255) public String updatedBy; - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType 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; @@ -105,18 +96,12 @@ public class FileAuthenticationForm implements Serializable { username = null; password = null; parameters = null; - fileCrawlingConfigId = null; - createdBy = null; - createdTime = null; + fileConfigId = null; + createdBy = "system"; + createdTime = Long.toString(ComponentUtil.getSystemHelper().getCurrentTimeAsLong()); updatedBy = null; updatedTime = null; - deletedBy = null; - deletedTime = null; versionNo = null; - - createdBy = "system"; - final SimpleDateFormat sdf = new SimpleDateFormat(Constants.DEFAULT_DATETIME_FORMAT); - createdTime = sdf.format(new Date()); } } diff --git a/src/main/java/org/codelibs/fess/web/admin/WebCrawlingConfigAction.java b/src/main/java/org/codelibs/fess/web/admin/FileConfigAction.java similarity index 62% rename from src/main/java/org/codelibs/fess/web/admin/WebCrawlingConfigAction.java rename to src/main/java/org/codelibs/fess/web/admin/FileConfigAction.java index 6434865ba..98e888417 100644 --- a/src/main/java/org/codelibs/fess/web/admin/WebCrawlingConfigAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/FileConfigAction.java @@ -16,7 +16,6 @@ package org.codelibs.fess.web.admin; -import java.time.LocalDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -27,16 +26,15 @@ import org.codelibs.fess.beans.FessBeans; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.CrawlingConfig; -import org.codelibs.fess.db.exentity.LabelType; -import org.codelibs.fess.db.exentity.RoleType; -import org.codelibs.fess.db.exentity.WebCrawlingConfig; +import org.codelibs.fess.es.exentity.FileConfig; +import org.codelibs.fess.es.exentity.LabelType; +import org.codelibs.fess.es.exentity.RoleType; import org.codelibs.fess.helper.SystemHelper; -import org.codelibs.fess.pager.WebCrawlingConfigPager; +import org.codelibs.fess.pager.FileConfigPager; import org.codelibs.fess.service.FailureUrlService; +import org.codelibs.fess.service.FileConfigService; import org.codelibs.fess.service.LabelTypeService; import org.codelibs.fess.service.RoleTypeService; -import org.codelibs.fess.service.WebCrawlingConfigService; import org.codelibs.fess.web.base.FessAdminAction; import org.codelibs.sastruts.core.annotation.Token; import org.codelibs.sastruts.core.exception.SSCActionMessagesException; @@ -48,25 +46,25 @@ import org.seasar.struts.exception.ActionMessagesException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class WebCrawlingConfigAction extends FessAdminAction { +public class FileConfigAction extends FessAdminAction { - private static final Logger logger = LoggerFactory.getLogger(WebCrawlingConfigAction.class); + private static final Logger logger = LoggerFactory.getLogger(FileConfigAction.class); // for list - public List webCrawlingConfigItems; + public List fileConfigItems; // for edit/confirm/delete @ActionForm @Resource - protected WebCrawlingConfigForm webCrawlingConfigForm; + protected FileConfigForm fileConfigForm; @Resource - protected WebCrawlingConfigService webCrawlingConfigService; + protected FileConfigService fileConfigService; @Resource - protected WebCrawlingConfigPager webCrawlingConfigPager; + protected FileConfigPager fileConfigPager; @Resource protected RoleTypeService roleTypeService; @@ -81,15 +79,15 @@ public class WebCrawlingConfigAction extends FessAdminAction { protected SystemHelper systemHelper; public String getHelpLink() { - return systemHelper.getHelpLink("webCrawlingConfig"); + return systemHelper.getHelpLink("fileConfig"); } protected String displayList(final boolean redirect) { // page navi - webCrawlingConfigItems = webCrawlingConfigService.getWebCrawlingConfigList(webCrawlingConfigPager); + fileConfigItems = fileConfigService.getFileConfigList(fileConfigPager); // restore from pager - Beans.copy(webCrawlingConfigPager, webCrawlingConfigForm.searchParams).excludes(CommonConstants.PAGER_CONVERSION_RULE) + Beans.copy(fileConfigPager, fileConfigForm.searchParams).excludes(CommonConstants.PAGER_CONVERSION_RULE) .execute(); @@ -108,12 +106,12 @@ public class WebCrawlingConfigAction extends FessAdminAction { @Execute(validator = false, input = "error.jsp", urlPattern = "list/{pageNumber}") public String list() { // page navi - if (StringUtil.isNotBlank(webCrawlingConfigForm.pageNumber)) { + if (StringUtil.isNotBlank(fileConfigForm.pageNumber)) { try { - webCrawlingConfigPager.setCurrentPageNumber(Integer.parseInt(webCrawlingConfigForm.pageNumber)); + fileConfigPager.setCurrentPageNumber(Integer.parseInt(fileConfigForm.pageNumber)); } catch (final NumberFormatException e) { if (logger.isDebugEnabled()) { - logger.debug("Invalid value: " + webCrawlingConfigForm.pageNumber, e); + logger.debug("Invalid value: " + fileConfigForm.pageNumber, e); } } } @@ -123,7 +121,7 @@ public class WebCrawlingConfigAction extends FessAdminAction { @Execute(validator = false, input = "error.jsp") public String search() { - Beans.copy(webCrawlingConfigForm.searchParams, webCrawlingConfigPager).excludes(CommonConstants.PAGER_CONVERSION_RULE) + Beans.copy(fileConfigForm.searchParams, fileConfigPager).excludes(CommonConstants.PAGER_CONVERSION_RULE) .execute(); @@ -132,7 +130,7 @@ public class WebCrawlingConfigAction extends FessAdminAction { @Execute(validator = false, input = "error.jsp") public String reset() { - webCrawlingConfigPager.clear(); + fileConfigPager.clear(); return displayList(false); } @@ -150,12 +148,12 @@ public class WebCrawlingConfigAction extends FessAdminAction { @Execute(validator = false, input = "error.jsp", urlPattern = "confirmpage/{crudMode}/{id}") public String confirmpage() { - if (webCrawlingConfigForm.crudMode != CommonConstants.CONFIRM_MODE) { + if (fileConfigForm.crudMode != CommonConstants.CONFIRM_MODE) { throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.CONFIRM_MODE, - webCrawlingConfigForm.crudMode }); + fileConfigForm.crudMode }); } - loadWebCrawlingConfig(); + loadFileConfig(); return "confirm.jsp"; } @@ -164,8 +162,8 @@ public class WebCrawlingConfigAction extends FessAdminAction { @Execute(validator = false, input = "error.jsp") public String createpage() { // page navi - webCrawlingConfigForm.initialize(); - webCrawlingConfigForm.crudMode = CommonConstants.CREATE_MODE; + fileConfigForm.initialize(); + fileConfigForm.crudMode = CommonConstants.CREATE_MODE; return "edit.jsp"; } @@ -173,12 +171,12 @@ public class WebCrawlingConfigAction extends FessAdminAction { @Token(save = true, validate = false) @Execute(validator = false, input = "error.jsp", urlPattern = "editpage/{crudMode}/{id}") public String editpage() { - if (webCrawlingConfigForm.crudMode != CommonConstants.EDIT_MODE) { - throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.EDIT_MODE, - webCrawlingConfigForm.crudMode }); + if (fileConfigForm.crudMode != CommonConstants.EDIT_MODE) { + throw new ActionMessagesException("errors.crud_invalid_mode", + new Object[] { CommonConstants.EDIT_MODE, fileConfigForm.crudMode }); } - loadWebCrawlingConfig(); + loadFileConfig(); return "edit.jsp"; } @@ -186,9 +184,9 @@ public class WebCrawlingConfigAction extends FessAdminAction { @Token(save = true, validate = false) @Execute(validator = false, input = "error.jsp") public String editfromconfirm() { - webCrawlingConfigForm.crudMode = CommonConstants.EDIT_MODE; + fileConfigForm.crudMode = CommonConstants.EDIT_MODE; - loadWebCrawlingConfig(); + loadFileConfig(); return "edit.jsp"; } @@ -208,12 +206,12 @@ public class WebCrawlingConfigAction extends FessAdminAction { @Token(save = true, validate = false) @Execute(validator = false, input = "error.jsp", urlPattern = "deletepage/{crudMode}/{id}") public String deletepage() { - if (webCrawlingConfigForm.crudMode != CommonConstants.DELETE_MODE) { + if (fileConfigForm.crudMode != CommonConstants.DELETE_MODE) { throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.DELETE_MODE, - webCrawlingConfigForm.crudMode }); + fileConfigForm.crudMode }); } - loadWebCrawlingConfig(); + loadFileConfig(); return "confirm.jsp"; } @@ -221,9 +219,9 @@ public class WebCrawlingConfigAction extends FessAdminAction { @Token(save = true, validate = false) @Execute(validator = false, input = "error.jsp") public String deletefromconfirm() { - webCrawlingConfigForm.crudMode = CommonConstants.DELETE_MODE; + fileConfigForm.crudMode = CommonConstants.DELETE_MODE; - loadWebCrawlingConfig(); + loadFileConfig(); return "confirm.jsp"; } @@ -232,8 +230,8 @@ public class WebCrawlingConfigAction extends FessAdminAction { @Execute(validator = true, input = "edit.jsp") public String create() { try { - final WebCrawlingConfig webCrawlingConfig = createWebCrawlingConfig(); - webCrawlingConfigService.store(webCrawlingConfig); + final FileConfig fileConfig = createFileConfig(); + fileConfigService.store(fileConfig); SAStrutsUtil.addSessionMessage("success.crud_create_crud_table"); return displayList(true); @@ -253,8 +251,8 @@ public class WebCrawlingConfigAction extends FessAdminAction { @Execute(validator = true, input = "edit.jsp") public String update() { try { - final WebCrawlingConfig webCrawlingConfig = createWebCrawlingConfig(); - webCrawlingConfigService.store(webCrawlingConfig); + final FileConfig fileConfig = createFileConfig(); + fileConfigService.store(fileConfig); SAStrutsUtil.addSessionMessage("success.crud_update_crud_table"); return displayList(true); @@ -273,71 +271,66 @@ public class WebCrawlingConfigAction extends FessAdminAction { protected Map createKeyMap() { final Map keys = new HashMap(); - keys.put("id", webCrawlingConfigForm.id); + keys.put("id", fileConfigForm.id); return keys; } - protected void loadWebCrawlingConfig() { + protected void loadFileConfig() { - final CrawlingConfig webCrawlingConfig = webCrawlingConfigService.getWebCrawlingConfig(createKeyMap()); - if (webCrawlingConfig == null) { + final FileConfig fileConfig = fileConfigService.getFileConfig(createKeyMap()); + if (fileConfig == null) { // throw an exception - throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { webCrawlingConfigForm.id }); + throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { fileConfigForm.id }); } - FessBeans.copy(webCrawlingConfig, webCrawlingConfigForm).commonColumnDateConverter().excludes("searchParams", "mode").execute(); + FessBeans.copy(fileConfig, fileConfigForm).commonColumnDateConverter().excludes("searchParams", "mode").execute(); // normalize boost - if (webCrawlingConfigForm.boost != null && webCrawlingConfigForm.boost.indexOf('.') > 0) { - webCrawlingConfigForm.boost = webCrawlingConfigForm.boost.substring(0, webCrawlingConfigForm.boost.indexOf('.')); + if (fileConfigForm.boost != null && fileConfigForm.boost.indexOf('.') > 0) { + fileConfigForm.boost = fileConfigForm.boost.substring(0, fileConfigForm.boost.indexOf('.')); } } - protected WebCrawlingConfig createWebCrawlingConfig() { - WebCrawlingConfig webCrawlingConfig; + protected FileConfig createFileConfig() { + FileConfig fileConfig; final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); - if (webCrawlingConfigForm.crudMode == CommonConstants.EDIT_MODE) { - webCrawlingConfig = webCrawlingConfigService.getWebCrawlingConfig(createKeyMap()); - if (webCrawlingConfig == null) { + final long currentTime = systemHelper.getCurrentTimeAsLong(); + if (fileConfigForm.crudMode == CommonConstants.EDIT_MODE) { + fileConfig = fileConfigService.getFileConfig(createKeyMap()); + if (fileConfig == null) { // throw an exception - throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { webCrawlingConfigForm.id }); + throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { fileConfigForm.id }); } } else { - webCrawlingConfig = new WebCrawlingConfig(); - webCrawlingConfig.setCreatedBy(username); - webCrawlingConfig.setCreatedTime(currentTime); + fileConfig = new FileConfig(); + fileConfig.setCreatedBy(username); + fileConfig.setCreatedTime(currentTime); } - webCrawlingConfig.setUpdatedBy(username); - webCrawlingConfig.setUpdatedTime(currentTime); - FessBeans.copy(webCrawlingConfigForm, webCrawlingConfig).excludesCommonColumns().execute(); + fileConfig.setUpdatedBy(username); + fileConfig.setUpdatedTime(currentTime); + FessBeans.copy(fileConfigForm, fileConfig).excludesCommonColumns().execute(); - return webCrawlingConfig; + return fileConfig; } @Execute(validator = false, input = "error.jsp") public String delete() { - if (webCrawlingConfigForm.crudMode != CommonConstants.DELETE_MODE) { + if (fileConfigForm.crudMode != CommonConstants.DELETE_MODE) { throw new SSCActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.DELETE_MODE, - webCrawlingConfigForm.crudMode }); + fileConfigForm.crudMode }); } try { - final WebCrawlingConfig webCrawlingConfig = webCrawlingConfigService.getWebCrawlingConfig(createKeyMap()); - if (webCrawlingConfig == null) { + final FileConfig fileConfig = fileConfigService.getFileConfig(createKeyMap()); + if (fileConfig == null) { // throw an exception - throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { webCrawlingConfigForm.id }); + throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { fileConfigForm.id }); } - failureUrlService.deleteByConfigId(webCrawlingConfig.getConfigId()); + failureUrlService.deleteByConfigId(fileConfig.getConfigId()); - // webCrawlingConfigService.delete(webCrawlingConfig); - final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); - webCrawlingConfig.setDeletedBy(username); - webCrawlingConfig.setDeletedTime(currentTime); - webCrawlingConfigService.store(webCrawlingConfig); + fileConfigService.delete(fileConfig); SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table"); return displayList(true); @@ -360,4 +353,5 @@ public class WebCrawlingConfigAction extends FessAdminAction { public List getLabelTypeItems() { return labelTypeService.getLabelTypeList(); } + } diff --git a/src/main/java/org/codelibs/fess/web/admin/FileCrawlingConfigForm.java b/src/main/java/org/codelibs/fess/web/admin/FileConfigForm.java similarity index 84% rename from src/main/java/org/codelibs/fess/web/admin/FileCrawlingConfigForm.java rename to src/main/java/org/codelibs/fess/web/admin/FileConfigForm.java index fbc95a545..020533776 100644 --- a/src/main/java/org/codelibs/fess/web/admin/FileCrawlingConfigForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/FileConfigForm.java @@ -17,14 +17,12 @@ package org.codelibs.fess.web.admin; import java.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; import java.util.HashMap; import java.util.Map; import org.codelibs.fess.Constants; import org.codelibs.fess.annotation.UriType; -import org.seasar.struts.annotation.DateType; +import org.codelibs.fess.util.ComponentUtil; import org.seasar.struts.annotation.IntRange; import org.seasar.struts.annotation.IntegerType; import org.seasar.struts.annotation.LongRange; @@ -32,7 +30,7 @@ import org.seasar.struts.annotation.LongType; import org.seasar.struts.annotation.Maxbytelength; import org.seasar.struts.annotation.Required; -public class FileCrawlingConfigForm implements Serializable { +public class FileConfigForm implements Serializable { private static final long serialVersionUID = 1L; @@ -53,7 +51,7 @@ public class FileCrawlingConfigForm implements Serializable { } @Required(target = "confirmfromupdate,update,delete") - @LongType + @Maxbytelength(maxbytelength = 1000) public String id; @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") @@ -99,7 +97,7 @@ public class FileCrawlingConfigForm implements Serializable { public String boost; @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - @Maxbytelength(maxbytelength = 1) + @Maxbytelength(maxbytelength = 5) public String available; @Required(target = "confirmfromupdate,update,delete") @@ -112,21 +110,15 @@ public class FileCrawlingConfigForm implements Serializable { public String createdBy; @Required(target = "confirmfromupdate,update,delete") - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType public String createdTime; @Maxbytelength(maxbytelength = 255) public String updatedBy; - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType 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; @@ -147,19 +139,13 @@ public class FileCrawlingConfigForm implements Serializable { boost = "1"; available = null; sortOrder = null; - createdBy = null; - createdTime = null; + createdBy = "system"; + createdTime = Long.toString(ComponentUtil.getSystemHelper().getCurrentTimeAsLong()); updatedBy = null; updatedTime = null; - deletedBy = null; - deletedTime = null; versionNo = null; sortOrder = "0"; numOfThread = Integer.toString(Constants.DEFAULT_NUM_OF_THREAD_FOR_FS); intervalTime = Integer.toString(Constants.DEFAULT_INTERVAL_TIME_FOR_FS); - // Temporary data - createdBy = "system"; - final SimpleDateFormat sdf = new SimpleDateFormat(Constants.DEFAULT_DATETIME_FORMAT); - createdTime = sdf.format(new Date()); } } diff --git a/src/main/java/org/codelibs/fess/web/admin/JobLogAction.java b/src/main/java/org/codelibs/fess/web/admin/JobLogAction.java index dfc0115c7..66c17969f 100644 --- a/src/main/java/org/codelibs/fess/web/admin/JobLogAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/JobLogAction.java @@ -27,7 +27,7 @@ import org.codelibs.fess.Constants; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.JobLog; +import org.codelibs.fess.es.exentity.JobLog; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.pager.JobLogPager; import org.codelibs.fess.service.JobLogService; diff --git a/src/main/java/org/codelibs/fess/web/admin/KeyMatchAction.java b/src/main/java/org/codelibs/fess/web/admin/KeyMatchAction.java index 3d8d320fd..0cf23a1cd 100644 --- a/src/main/java/org/codelibs/fess/web/admin/KeyMatchAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/KeyMatchAction.java @@ -16,7 +16,6 @@ package org.codelibs.fess.web.admin; -import java.time.LocalDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/src/main/java/org/codelibs/fess/web/admin/KeyMatchForm.java b/src/main/java/org/codelibs/fess/web/admin/KeyMatchForm.java index fb311f67c..d4507b433 100644 --- a/src/main/java/org/codelibs/fess/web/admin/KeyMatchForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/KeyMatchForm.java @@ -20,9 +20,7 @@ import java.io.Serializable; import java.util.HashMap; import java.util.Map; -import org.codelibs.fess.Constants; import org.codelibs.fess.util.ComponentUtil; -import org.seasar.struts.annotation.DateType; import org.seasar.struts.annotation.IntRange; import org.seasar.struts.annotation.IntegerType; import org.seasar.struts.annotation.LongType; diff --git a/src/main/java/org/codelibs/fess/web/admin/LabelTypeAction.java b/src/main/java/org/codelibs/fess/web/admin/LabelTypeAction.java index ed2d74c80..3b12eb774 100644 --- a/src/main/java/org/codelibs/fess/web/admin/LabelTypeAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/LabelTypeAction.java @@ -16,7 +16,6 @@ package org.codelibs.fess.web.admin; -import java.time.LocalDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -27,8 +26,8 @@ import org.codelibs.fess.beans.FessBeans; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.LabelType; -import org.codelibs.fess.db.exentity.RoleType; +import org.codelibs.fess.es.exentity.LabelType; +import org.codelibs.fess.es.exentity.RoleType; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.pager.LabelTypePager; import org.codelibs.fess.service.LabelTypeService; @@ -282,7 +281,7 @@ public class LabelTypeAction extends FessAdminAction { protected LabelType createLabelType() { LabelType labelType; final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); + final long currentTime = systemHelper.getCurrentTimeAsLong(); if (labelTypeForm.crudMode == CommonConstants.EDIT_MODE) { labelType = labelTypeService.getLabelType(createKeyMap()); if (labelType == null) { @@ -315,12 +314,7 @@ public class LabelTypeAction extends FessAdminAction { throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { labelTypeForm.id }); } - // labelTypeService.delete(labelType); - final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); - labelType.setDeletedBy(username); - labelType.setDeletedTime(currentTime); - labelTypeService.store(labelType); + labelTypeService.delete(labelType); SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table"); return displayList(true); diff --git a/src/main/java/org/codelibs/fess/web/admin/LabelTypeForm.java b/src/main/java/org/codelibs/fess/web/admin/LabelTypeForm.java index 04fb7dd0c..22fb2b941 100644 --- a/src/main/java/org/codelibs/fess/web/admin/LabelTypeForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/LabelTypeForm.java @@ -17,13 +17,10 @@ package org.codelibs.fess.web.admin; import java.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; import java.util.HashMap; import java.util.Map; -import org.codelibs.fess.Constants; -import org.seasar.struts.annotation.DateType; +import org.codelibs.fess.util.ComponentUtil; import org.seasar.struts.annotation.IntRange; import org.seasar.struts.annotation.IntegerType; import org.seasar.struts.annotation.LongType; @@ -51,7 +48,7 @@ public class LabelTypeForm implements Serializable { } @Required(target = "confirmfromupdate,update,delete") - @LongType + @Maxbytelength(maxbytelength = 1000) public String id; @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") @@ -78,21 +75,15 @@ public class LabelTypeForm implements Serializable { public String createdBy; @Required(target = "confirmfromupdate,update,delete") - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType public String createdTime; @Maxbytelength(maxbytelength = 255) public String updatedBy; - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType 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; @@ -104,17 +95,11 @@ public class LabelTypeForm implements Serializable { includedPaths = null; excludedPaths = null; sortOrder = null; - createdBy = null; - createdTime = null; + createdBy = "system"; + createdTime = Long.toString(ComponentUtil.getSystemHelper().getCurrentTimeAsLong()); updatedBy = null; updatedTime = null; - deletedBy = null; - deletedTime = null; versionNo = null; sortOrder = "0"; - // Temporary data - createdBy = "system"; - final SimpleDateFormat sdf = new SimpleDateFormat(Constants.DEFAULT_DATETIME_FORMAT); - createdTime = sdf.format(new Date()); } } diff --git a/src/main/java/org/codelibs/fess/web/admin/OverlappingHostAction.java b/src/main/java/org/codelibs/fess/web/admin/OverlappingHostAction.java index 0f42e67cb..b1e3f0a82 100644 --- a/src/main/java/org/codelibs/fess/web/admin/OverlappingHostAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/OverlappingHostAction.java @@ -16,7 +16,6 @@ package org.codelibs.fess.web.admin; -import java.time.LocalDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/src/main/java/org/codelibs/fess/web/admin/OverlappingHostForm.java b/src/main/java/org/codelibs/fess/web/admin/OverlappingHostForm.java index f357ae022..a9d1808f0 100644 --- a/src/main/java/org/codelibs/fess/web/admin/OverlappingHostForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/OverlappingHostForm.java @@ -17,14 +17,10 @@ package org.codelibs.fess.web.admin; import java.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; import java.util.HashMap; import java.util.Map; -import org.codelibs.fess.Constants; import org.codelibs.fess.util.ComponentUtil; -import org.seasar.struts.annotation.DateType; import org.seasar.struts.annotation.IntRange; import org.seasar.struts.annotation.IntegerType; import org.seasar.struts.annotation.LongType; diff --git a/src/main/java/org/codelibs/fess/web/admin/PathMappingForm.java b/src/main/java/org/codelibs/fess/web/admin/PathMappingForm.java index b9cb68df0..5ea009dcb 100644 --- a/src/main/java/org/codelibs/fess/web/admin/PathMappingForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/PathMappingForm.java @@ -86,14 +86,11 @@ public class PathMappingForm implements Serializable { replacement = null; processType = null; sortOrder = null; - createdBy = null; - createdTime = null; + createdBy = "system"; + createdTime = Long.toString(ComponentUtil.getSystemHelper().getCurrentTimeAsLong()); updatedBy = null; updatedTime = null; versionNo = null; sortOrder = "0"; - // Temporary data - createdBy = "system"; - createdTime = Long.toString(ComponentUtil.getSystemHelper().getCurrentTimeAsLong()); } } diff --git a/src/main/java/org/codelibs/fess/web/admin/RequestHeaderAction.java b/src/main/java/org/codelibs/fess/web/admin/RequestHeaderAction.java index d83e437e6..cc5ed3df7 100644 --- a/src/main/java/org/codelibs/fess/web/admin/RequestHeaderAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/RequestHeaderAction.java @@ -16,7 +16,6 @@ package org.codelibs.fess.web.admin; -import java.time.LocalDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -29,11 +28,11 @@ import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; import org.codelibs.fess.crud.util.SAStrutsUtil; import org.codelibs.fess.es.exentity.RequestHeader; -import org.codelibs.fess.db.exentity.WebCrawlingConfig; +import org.codelibs.fess.es.exentity.WebConfig; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.pager.RequestHeaderPager; import org.codelibs.fess.service.RequestHeaderService; -import org.codelibs.fess.service.WebCrawlingConfigService; +import org.codelibs.fess.service.WebConfigService; import org.codelibs.fess.web.base.FessAdminAction; import org.codelibs.sastruts.core.annotation.Token; import org.codelibs.sastruts.core.exception.SSCActionMessagesException; @@ -68,7 +67,7 @@ public class RequestHeaderAction extends FessAdminAction { protected RequestHeaderPager requestHeaderPager; @Resource - protected WebCrawlingConfigService webCrawlingConfigService; + protected WebConfigService webConfigService; @Resource protected SystemHelper systemHelper; @@ -334,12 +333,11 @@ public class RequestHeaderAction extends FessAdminAction { } } - public List> getWebCrawlingConfigItems() { + public List> getWebConfigItems() { final List> items = new ArrayList>(); - final List webCrawlingConfigList = - webCrawlingConfigService.getAllWebCrawlingConfigList(false, false, false, null); - for (final WebCrawlingConfig webCrawlingConfig : webCrawlingConfigList) { - items.add(createItem(webCrawlingConfig.getName(), webCrawlingConfig.getId().toString())); + final List webConfigList = webConfigService.getAllWebConfigList(false, false, false, null); + for (final WebConfig webConfig : webConfigList) { + items.add(createItem(webConfig.getName(), webConfig.getId().toString())); } return items; } @@ -361,6 +359,6 @@ public class RequestHeaderAction extends FessAdminAction { } public boolean isDisplayCreateLink() { - return !webCrawlingConfigService.getAllWebCrawlingConfigList(false, false, false, null).isEmpty(); + return !webConfigService.getAllWebConfigList(false, false, false, null).isEmpty(); } } diff --git a/src/main/java/org/codelibs/fess/web/admin/RequestHeaderForm.java b/src/main/java/org/codelibs/fess/web/admin/RequestHeaderForm.java index 27ab7f106..cacbea4a3 100644 --- a/src/main/java/org/codelibs/fess/web/admin/RequestHeaderForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/RequestHeaderForm.java @@ -17,14 +17,10 @@ package org.codelibs.fess.web.admin; import java.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; import java.util.HashMap; import java.util.Map; -import org.codelibs.fess.Constants; import org.codelibs.fess.util.ComponentUtil; -import org.seasar.struts.annotation.DateType; import org.seasar.struts.annotation.IntegerType; import org.seasar.struts.annotation.LongType; import org.seasar.struts.annotation.Maxbytelength; @@ -59,8 +55,8 @@ public class RequestHeaderForm implements Serializable { public String value; @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - @LongType - public String webCrawlingConfigId; + @Maxbytelength(maxbytelength = 1000) + public String webConfigId; @Required(target = "confirmfromupdate,update,delete") @Maxbytelength(maxbytelength = 255) @@ -84,7 +80,7 @@ public class RequestHeaderForm implements Serializable { id = null; name = null; value = null; - webCrawlingConfigId = null; + webConfigId = null; createdBy = "system"; createdTime = Long.toString(ComponentUtil.getSystemHelper().getCurrentTimeAsLong()); updatedBy = null; diff --git a/src/main/java/org/codelibs/fess/web/admin/RoleTypeAction.java b/src/main/java/org/codelibs/fess/web/admin/RoleTypeAction.java index ef3b4e322..d0f8e7cfa 100644 --- a/src/main/java/org/codelibs/fess/web/admin/RoleTypeAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/RoleTypeAction.java @@ -16,7 +16,6 @@ package org.codelibs.fess.web.admin; -import java.time.LocalDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -27,7 +26,7 @@ import org.codelibs.fess.beans.FessBeans; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.RoleType; +import org.codelibs.fess.es.exentity.RoleType; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.pager.RoleTypePager; import org.codelibs.fess.service.RoleTypeService; @@ -260,7 +259,7 @@ public class RoleTypeAction extends FessAdminAction { protected RoleType createRoleType() { RoleType roleType; final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); + final long currentTime = systemHelper.getCurrentTimeAsLong(); if (roleTypeForm.crudMode == CommonConstants.EDIT_MODE) { roleType = roleTypeService.getRoleType(createKeyMap()); if (roleType == null) { @@ -295,12 +294,7 @@ public class RoleTypeAction extends FessAdminAction { throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { roleTypeForm.id }); } - // roleTypeService.delete(roleType); - final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); - roleType.setDeletedBy(username); - roleType.setDeletedTime(currentTime); - roleTypeService.store(roleType); + roleTypeService.delete(roleType); SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table"); return displayList(true); diff --git a/src/main/java/org/codelibs/fess/web/admin/RoleTypeForm.java b/src/main/java/org/codelibs/fess/web/admin/RoleTypeForm.java index c85d52adc..2b41639f5 100644 --- a/src/main/java/org/codelibs/fess/web/admin/RoleTypeForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/RoleTypeForm.java @@ -17,13 +17,10 @@ package org.codelibs.fess.web.admin; import java.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; import java.util.HashMap; import java.util.Map; -import org.codelibs.fess.Constants; -import org.seasar.struts.annotation.DateType; +import org.codelibs.fess.util.ComponentUtil; import org.seasar.struts.annotation.IntRange; import org.seasar.struts.annotation.IntegerType; import org.seasar.struts.annotation.LongType; @@ -49,7 +46,7 @@ public class RoleTypeForm implements Serializable { } @Required(target = "confirmfromupdate,update,delete") - @LongType + @Maxbytelength(maxbytelength = 1000) public String id; @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") @@ -70,21 +67,15 @@ public class RoleTypeForm implements Serializable { public String createdBy; @Required(target = "confirmfromupdate,update,delete") - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType public String createdTime; @Maxbytelength(maxbytelength = 255) public String updatedBy; - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType 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; @@ -94,17 +85,11 @@ public class RoleTypeForm implements Serializable { name = null; value = null; sortOrder = null; - createdBy = null; - createdTime = null; + createdBy = "system"; + createdTime = Long.toString(ComponentUtil.getSystemHelper().getCurrentTimeAsLong()); updatedBy = null; updatedTime = null; - deletedBy = null; - deletedTime = null; versionNo = null; sortOrder = "0"; - // Temporary data - createdBy = "system"; - final SimpleDateFormat sdf = new SimpleDateFormat(Constants.DEFAULT_DATETIME_FORMAT); - createdTime = sdf.format(new Date()); } } diff --git a/src/main/java/org/codelibs/fess/web/admin/ScheduledJobAction.java b/src/main/java/org/codelibs/fess/web/admin/ScheduledJobAction.java index 530a0af8e..0ff265dd0 100644 --- a/src/main/java/org/codelibs/fess/web/admin/ScheduledJobAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/ScheduledJobAction.java @@ -16,7 +16,6 @@ package org.codelibs.fess.web.admin; -import java.time.LocalDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -28,8 +27,8 @@ import org.codelibs.fess.beans.FessBeans; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.RoleType; -import org.codelibs.fess.db.exentity.ScheduledJob; +import org.codelibs.fess.es.exentity.RoleType; +import org.codelibs.fess.es.exentity.ScheduledJob; import org.codelibs.fess.helper.JobHelper; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.job.JobExecutor; @@ -96,7 +95,7 @@ public class ScheduledJobAction extends FessAdminAction { protected ScheduledJob createScheduledJob() { ScheduledJob scheduledJob; final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); + final long currentTime = systemHelper.getCurrentTimeAsLong(); if (scheduledJobForm.crudMode == CommonConstants.EDIT_MODE) { scheduledJob = scheduledJobService.getScheduledJob(createKeyMap()); if (scheduledJob == null) { @@ -128,11 +127,7 @@ public class ScheduledJobAction extends FessAdminAction { try { final ScheduledJob scheduledJob = getScheduledJob(); - final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); - scheduledJob.setDeletedBy(username); - scheduledJob.setDeletedTime(currentTime); - scheduledJobService.store(scheduledJob); + scheduledJobService.delete(scheduledJob); SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table"); return displayList(true); diff --git a/src/main/java/org/codelibs/fess/web/admin/ScheduledJobForm.java b/src/main/java/org/codelibs/fess/web/admin/ScheduledJobForm.java index 7bcf14a10..3a455d9da 100644 --- a/src/main/java/org/codelibs/fess/web/admin/ScheduledJobForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/ScheduledJobForm.java @@ -17,14 +17,12 @@ package org.codelibs.fess.web.admin; import java.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; import java.util.HashMap; import java.util.Map; import org.codelibs.fess.Constants; import org.codelibs.fess.annotation.CronExpression; -import org.seasar.struts.annotation.DateType; +import org.codelibs.fess.util.ComponentUtil; import org.seasar.struts.annotation.IntRange; import org.seasar.struts.annotation.IntegerType; import org.seasar.struts.annotation.LongType; @@ -48,7 +46,7 @@ public class ScheduledJobForm implements Serializable { } @Required(target = "confirmfromupdate,update,delete") - @LongType + @Maxbytelength(maxbytelength = 1000) public String id; @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") @@ -89,19 +87,14 @@ public class ScheduledJobForm implements Serializable { public String createdBy; @Required(target = "confirmfromupdate,update,delete") - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType public String createdTime; public String updatedBy; - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType public String updatedTime; - public String deletedBy; - - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) - public String deletedTime; - @Required(target = "confirmfromupdate,update,delete") @IntegerType public String versionNo; @@ -117,20 +110,14 @@ public class ScheduledJobForm implements Serializable { jobLogging = null; available = null; sortOrder = null; - createdBy = null; - createdTime = null; + createdBy = "system"; + createdTime = Long.toString(ComponentUtil.getSystemHelper().getCurrentTimeAsLong()); updatedBy = null; updatedTime = null; - deletedBy = null; - deletedTime = null; versionNo = null; target = Constants.DEFAULT_JOB_TARGET; cronExpression = Constants.DEFAULT_CRON_EXPRESSION; scriptType = Constants.DEFAULT_JOB_SCRIPT_TYPE; sortOrder = "0"; - // Temporary data - createdBy = "system"; - final SimpleDateFormat sdf = new SimpleDateFormat(Constants.DEFAULT_DATETIME_FORMAT); - createdTime = sdf.format(new Date()); } } diff --git a/src/main/java/org/codelibs/fess/web/admin/SearchLogAction.java b/src/main/java/org/codelibs/fess/web/admin/SearchLogAction.java deleted file mode 100644 index 8f0bc0b69..000000000 --- a/src/main/java/org/codelibs/fess/web/admin/SearchLogAction.java +++ /dev/null @@ -1,389 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.web.admin; - -import java.io.BufferedWriter; -import java.io.OutputStreamWriter; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.io.IOUtils; -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.Constants; -import org.codelibs.fess.crud.CommonConstants; -import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.SearchLog; -import org.codelibs.fess.helper.SystemHelper; -import org.codelibs.fess.pager.SearchLogPager; -import org.codelibs.fess.service.SearchLogService; -import org.codelibs.fess.web.base.FessAdminAction; -import org.codelibs.sastruts.core.annotation.Token; -import org.codelibs.sastruts.core.exception.SSCActionMessagesException; -import org.seasar.framework.beans.util.Beans; -import org.seasar.struts.annotation.ActionForm; -import org.seasar.struts.annotation.Execute; -import org.seasar.struts.exception.ActionMessagesException; -import org.seasar.struts.util.RequestUtil; -import org.seasar.struts.util.ResponseUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.ibm.icu.text.SimpleDateFormat; - -public class SearchLogAction extends FessAdminAction { - private static final Logger logger = LoggerFactory.getLogger(SearchLogAction.class); - - // for list - - public List searchLogItems; - - // for edit/confirm/delete - - @ActionForm - @Resource - protected SearchLogForm searchLogForm; - - @Resource - protected SearchLogService searchLogService; - - @Resource - protected SearchLogPager searchLogPager; - - @Resource - protected SystemHelper systemHelper; - - protected String displayList(final boolean redirect) { - // page navi - searchLogItems = searchLogService.getSearchLogList(searchLogPager); - - // restore from pager - Beans.copy(searchLogPager, searchLogForm.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(searchLogForm.pageNumber)) { - try { - searchLogPager.setCurrentPageNumber(Integer.parseInt(searchLogForm.pageNumber)); - } catch (final NumberFormatException e) { - if (logger.isDebugEnabled()) { - logger.debug("Invalid value: " + searchLogForm.pageNumber, e); - } - } - } - - return displayList(false); - } - - @Execute(validator = false, input = "error.jsp") - public String reset() { - searchLogPager.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 (searchLogForm.crudMode != CommonConstants.CONFIRM_MODE) { - throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.CONFIRM_MODE, - searchLogForm.crudMode }); - } - - loadSearchLog(); - - return "confirm.jsp"; - } - - @Token(save = true, validate = false) - @Execute(validator = false, input = "error.jsp") - public String createpage() { - // page navi - searchLogForm.initialize(); - searchLogForm.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 (searchLogForm.crudMode != CommonConstants.EDIT_MODE) { - throw new ActionMessagesException("errors.crud_invalid_mode", - new Object[] { CommonConstants.EDIT_MODE, searchLogForm.crudMode }); - } - - loadSearchLog(); - - return "edit.jsp"; - } - - @Token(save = true, validate = false) - @Execute(validator = false, input = "error.jsp") - public String editfromconfirm() { - searchLogForm.crudMode = CommonConstants.EDIT_MODE; - - loadSearchLog(); - - 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 (searchLogForm.crudMode != CommonConstants.DELETE_MODE) { - throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.DELETE_MODE, - searchLogForm.crudMode }); - } - - loadSearchLog(); - - return "confirm.jsp"; - } - - @Token(save = true, validate = false) - @Execute(validator = false, input = "error.jsp") - public String deletefromconfirm() { - searchLogForm.crudMode = CommonConstants.DELETE_MODE; - - loadSearchLog(); - - return "confirm.jsp"; - } - - @Token(save = false, validate = true) - @Execute(validator = true, input = "edit.jsp") - public String create() { - try { - final SearchLog searchLog = createSearchLog(); - searchLogService.store(searchLog); - SAStrutsUtil.addSessionMessage("success.crud_create_crud_table"); - - return displayList(true); - } catch (final ActionMessagesException e) { - logger.error(e.getMessage(), e); - throw e; - } catch (final CrudMessageException e) { - logger.error(e.getMessage(), e); - throw new ActionMessagesException(e.getMessageId(), e.getArgs()); - } catch (final Exception e) { - logger.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 SearchLog searchLog = createSearchLog(); - searchLogService.store(searchLog); - SAStrutsUtil.addSessionMessage("success.crud_update_crud_table"); - - return displayList(true); - } catch (final ActionMessagesException e) { - logger.error(e.getMessage(), e); - throw e; - } catch (final CrudMessageException e) { - logger.error(e.getMessage(), e); - throw new ActionMessagesException(e.getMessageId(), e.getArgs()); - } catch (final Exception e) { - logger.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 (searchLogForm.crudMode != CommonConstants.DELETE_MODE) { - throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.DELETE_MODE, - searchLogForm.crudMode }); - } - - try { - final SearchLog searchLog = searchLogService.getSearchLog(createKeyMap()); - if (searchLog == null) { - // throw an exception - throw new ActionMessagesException("errors.crud_could_not_find_crud_table", - - new Object[] { searchLogForm.id }); - - } - - searchLogService.delete(searchLog); - SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table"); - - return displayList(true); - } catch (final ActionMessagesException e) { - logger.error(e.getMessage(), e); - throw e; - } catch (final CrudMessageException e) { - logger.error(e.getMessage(), e); - throw new ActionMessagesException(e.getMessageId(), e.getArgs()); - } catch (final Exception e) { - logger.error(e.getMessage(), e); - throw new ActionMessagesException("errors.crud_failed_to_delete_crud_table"); - } - } - - protected void loadSearchLog() { - - final SearchLog searchLog = searchLogService.getSearchLog(createKeyMap()); - if (searchLog == null) { - // throw an exception - throw new ActionMessagesException("errors.crud_could_not_find_crud_table", - - new Object[] { searchLogForm.id }); - - } - - Beans.copy(searchLog, searchLogForm).excludes("searchParams", "mode") - - .execute(); - } - - protected SearchLog createSearchLog() { - SearchLog searchLog; - if (searchLogForm.crudMode == CommonConstants.EDIT_MODE) { - searchLog = searchLogService.getSearchLog(createKeyMap()); - if (searchLog == null) { - // throw an exception - throw new ActionMessagesException("errors.crud_could_not_find_crud_table", - - new Object[] { searchLogForm.id }); - - } - } else { - searchLog = new SearchLog(); - } - Beans.copy(searchLogForm, searchLog).excludes("searchParams", "mode") - - .execute(); - - return searchLog; - } - - protected Map createKeyMap() { - final Map keys = new HashMap(); - - keys.put("id", searchLogForm.id); - - return keys; - } - - public String getHelpLink() { - return systemHelper.getHelpLink("searchLog"); - } - - @Execute(validator = false, input = "error.jsp") - public String search() { - final Map searchParams = searchLogForm.searchParams; - if (!searchParams.containsKey("startPage")) { - searchParams.put("startPage", StringUtil.EMPTY); - } - Beans.copy(searchParams, searchLogPager).excludes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - - return displayList(false); - } - - @Execute(validator = false, input = "error.jsp") - public String deleteall() { - searchLogService.deleteAll(searchLogPager); - SAStrutsUtil.addSessionMessage("success.search_log_delete_all"); - return displayList(true); - } - - @Execute(validator = false, input = "error.jsp") - public String download() { - BufferedWriter writer = null; - final SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); - final String fileName = "FessSearchLog_" + sdf.format(new Date()) + ".csv"; - final HttpServletResponse response = ResponseUtil.getResponse(); - response.setContentType("text/csv"); - response.setHeader("Content-disposition", "attachment; filename=\"" + fileName + "\""); - try { - writer = new BufferedWriter(new OutputStreamWriter(response.getOutputStream(), getCsvEncoding())); - searchLogService.dump(writer, searchLogPager); - writer.flush(); - } catch (final Exception e) { - logger.error("Could not create FessSearchLog.csv.", e); - throw new SSCActionMessagesException(e, "errors.could_not_create_search_log_csv"); - } finally { - IOUtils.closeQuietly(writer); - } - return null; - } - - private String getCsvEncoding() { - if (StringUtil.isNotBlank(searchLogForm.csvEncoding)) { - return searchLogForm.csvEncoding; - } - final Locale locale = RequestUtil.getRequest().getLocale(); - if ("ja".equals(locale.getLanguage())) { - return Constants.MS932; - } - return Constants.UTF_8; - } - - public boolean isHasClickLog() { - return searchLogForm.clickLogList != null && !searchLogForm.clickLogList.isEmpty(); - } -} diff --git a/src/main/java/org/codelibs/fess/web/admin/SearchLogForm.java b/src/main/java/org/codelibs/fess/web/admin/SearchLogForm.java deleted file mode 100644 index e31ffa6b1..000000000 --- a/src/main/java/org/codelibs/fess/web/admin/SearchLogForm.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.web.admin; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.codelibs.fess.db.exentity.ClickLog; -import org.seasar.struts.annotation.DateType; -import org.seasar.struts.annotation.IntegerType; -import org.seasar.struts.annotation.LongType; -import org.seasar.struts.annotation.Required; - -public class SearchLogForm implements Serializable { - - private static final long serialVersionUID = 1L; - - public String csvEncoding; - - public List clickLogList; - - @IntegerType - public String pageNumber; - - public Map searchParams = new HashMap(); - - @IntegerType - public int crudMode; - - public String getCurrentPageNumber() { - return pageNumber; - } - - @Required(target = "confirmfromupdate,update,delete") - @LongType - public String id; - - public String searchWord; - - @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - @DateType - public String requestedTime; - - @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - @IntegerType - public String responseTime; - - @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - @LongType - public String hitCount; - - @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - @IntegerType - public String queryOffset; - - @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - @IntegerType - public String queryPageSize; - - public String userAgent; - - public String referer; - - public String clientIp; - - public String userSessionId; - - @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - public String accessType; - - @LongType - public String userId; - - public void initialize() { - id = null; - searchWord = null; - requestedTime = null; - responseTime = null; - hitCount = null; - queryOffset = null; - queryPageSize = null; - userAgent = null; - referer = null; - clientIp = null; - userSessionId = null; - accessType = null; - userId = null; - } -} diff --git a/src/main/java/org/codelibs/fess/web/admin/StatsAction.java b/src/main/java/org/codelibs/fess/web/admin/StatsAction.java deleted file mode 100644 index 9f6c7d167..000000000 --- a/src/main/java/org/codelibs/fess/web/admin/StatsAction.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.web.admin; - -import java.io.Serializable; -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.crud.CommonConstants; -import org.codelibs.fess.helper.SystemHelper; -import org.codelibs.fess.pager.StatsPager; -import org.codelibs.fess.service.SearchFieldLogService; -import org.codelibs.fess.service.StatsService; -import org.seasar.framework.beans.util.Beans; -import org.seasar.struts.annotation.ActionForm; -import org.seasar.struts.annotation.Execute; - -public class StatsAction implements Serializable { - private static final long serialVersionUID = 1L; - - private static final Log log = LogFactory.getLog(StatsAction.class); - - public List> statsItems; - - @ActionForm - @Resource - protected StatsForm statsForm; - - @Resource - protected StatsService statsService; - - @Resource - protected SearchFieldLogService searchFieldLogService; - - @Resource - protected StatsPager statsPager; - - @Resource - protected SystemHelper systemHelper; - - public String[] reportTypeItems; - - public String getHelpLink() { - return systemHelper.getHelpLink("stats"); - } - - protected String displayList(final boolean redirect) { - // page navi - statsItems = statsService.getStatsList(statsPager); - reportTypeItems = searchFieldLogService.getGroupedFieldNames(); - - // restore from pager - Beans.copy(statsPager, statsForm.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(statsForm.pageNumber)) { - try { - statsPager.setCurrentPageNumber(Integer.parseInt(statsForm.pageNumber)); - } catch (final NumberFormatException e) { - if (log.isDebugEnabled()) { - log.debug("Invalid value: " + statsForm.pageNumber, e); - } - } - } - - return displayList(false); - } - - @Execute(validator = false, input = "error.jsp") - public String search() { - Beans.copy(statsForm.searchParams, statsPager).excludes(CommonConstants.PAGER_CONVERSION_RULE).execute(); - - return displayList(false); - } - - @Execute(validator = false, input = "error.jsp") - public String reset() { - statsPager.clear(); - - return displayList(false); - } - -} diff --git a/src/main/java/org/codelibs/fess/web/admin/StatsForm.java b/src/main/java/org/codelibs/fess/web/admin/StatsForm.java deleted file mode 100644 index dd38e6c96..000000000 --- a/src/main/java/org/codelibs/fess/web/admin/StatsForm.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.web.admin; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.Map; - -import org.codelibs.core.lang.StringUtil; -import org.codelibs.fess.Constants; -import org.seasar.struts.annotation.IntegerType; - -public class StatsForm implements Serializable { - - private static final long serialVersionUID = 1L; - - @IntegerType - public String pageNumber; - - public Map searchParams = new HashMap(); - - public StatsForm() { - final String reportType = searchParams.get(Constants.STATS_REPORT_TYPE); - if (StringUtil.isBlank(reportType)) { - searchParams.put(Constants.STATS_REPORT_TYPE, "searchWord"); - } - } - - public String getCurrentPageNumber() { - return pageNumber; - } - - public void initialize() { - // nothing - } -} diff --git a/src/main/java/org/codelibs/fess/web/admin/SuggestBadWordAction.java b/src/main/java/org/codelibs/fess/web/admin/SuggestBadWordAction.java index 678ab0ce4..dc87b14ba 100644 --- a/src/main/java/org/codelibs/fess/web/admin/SuggestBadWordAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/SuggestBadWordAction.java @@ -26,7 +26,6 @@ import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.Reader; import java.io.Writer; -import java.time.LocalDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -42,7 +41,7 @@ import org.codelibs.fess.beans.FessBeans; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.SuggestBadWord; +import org.codelibs.fess.es.exentity.SuggestBadWord; import org.codelibs.fess.helper.SuggestHelper; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.pager.SuggestBadWordPager; @@ -259,7 +258,7 @@ public class SuggestBadWordAction extends FessAdminAction { protected SuggestBadWord createSuggestBadWord() { SuggestBadWord suggestBadWord; final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); + final long currentTime = systemHelper.getCurrentTimeAsLong(); if (suggestBadWordForm.crudMode == CommonConstants.EDIT_MODE) { suggestBadWord = suggestBadWordService.getSuggestBadWord(createKeyMap()); if (suggestBadWord == null) { @@ -292,12 +291,7 @@ public class SuggestBadWordAction extends FessAdminAction { throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { suggestBadWordForm.id }); } - // suggestBadWordService.delete(suggestBadWord); - final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); - suggestBadWord.setDeletedBy(username); - suggestBadWord.setDeletedTime(currentTime); - suggestBadWordService.store(suggestBadWord); + suggestBadWordService.delete(suggestBadWord); suggestHelper.deleteAllBadWord(); suggestHelper.updateSolrBadwordFile(); SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table"); diff --git a/src/main/java/org/codelibs/fess/web/admin/SuggestBadWordForm.java b/src/main/java/org/codelibs/fess/web/admin/SuggestBadWordForm.java index d899d9506..1ce0768a9 100644 --- a/src/main/java/org/codelibs/fess/web/admin/SuggestBadWordForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/SuggestBadWordForm.java @@ -21,8 +21,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.struts.upload.FormFile; -import org.codelibs.fess.Constants; -import org.seasar.struts.annotation.DateType; +import org.codelibs.fess.util.ComponentUtil; import org.seasar.struts.annotation.IntegerType; import org.seasar.struts.annotation.LongType; import org.seasar.struts.annotation.Maxbytelength; @@ -45,7 +44,7 @@ public class SuggestBadWordForm implements Serializable { } @Required(target = "confirmfromupdate,update,delete") - @LongType + @Maxbytelength(maxbytelength = 1000) public String id; @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") @@ -60,20 +59,15 @@ public class SuggestBadWordForm implements Serializable { public String createdBy; @Required(target = "confirmfromupdate,update,delete") - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType public String createdTime; @Maxbytelength(maxbytelength = 255) public String updatedBy; - @DateType + @LongType public String updatedTime; - public String deletedBy; - - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) - public String deletedTime; - @Required(target = "confirmfromupdate,update,delete") @IntegerType public String versionNo; @@ -86,12 +80,10 @@ public class SuggestBadWordForm implements Serializable { suggestWord = null; targetRole = null; targetLabel = null; - createdBy = null; - createdTime = null; + createdBy = "system"; + createdTime = Long.toString(ComponentUtil.getSystemHelper().getCurrentTimeAsLong()); updatedBy = null; updatedTime = null; - deletedBy = null; - deletedTime = null; versionNo = null; } } diff --git a/src/main/java/org/codelibs/fess/web/admin/SuggestElevateWordAction.java b/src/main/java/org/codelibs/fess/web/admin/SuggestElevateWordAction.java index 9d136503f..6a0f66ae4 100644 --- a/src/main/java/org/codelibs/fess/web/admin/SuggestElevateWordAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/SuggestElevateWordAction.java @@ -26,7 +26,6 @@ import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.Reader; import java.io.Writer; -import java.time.LocalDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -42,7 +41,7 @@ import org.codelibs.fess.beans.FessBeans; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.SuggestElevateWord; +import org.codelibs.fess.es.exentity.SuggestElevateWord; import org.codelibs.fess.helper.SuggestHelper; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.pager.SuggestElevateWordPager; @@ -259,7 +258,7 @@ public class SuggestElevateWordAction extends FessAdminAction { protected SuggestElevateWord createSuggestElevateWord() { SuggestElevateWord suggestElevateWord; final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); + final long currentTime = systemHelper.getCurrentTimeAsLong(); if (suggestElevateWordForm.crudMode == CommonConstants.EDIT_MODE) { suggestElevateWord = suggestElevateWordService.getSuggestElevateWord(createKeyMap()); if (suggestElevateWord == null) { @@ -336,12 +335,7 @@ public class SuggestElevateWordAction extends FessAdminAction { throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { suggestElevateWordForm.id }); } - // suggestElevateWordService.delete(suggestElevateWord); - final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); - suggestElevateWord.setDeletedBy(username); - suggestElevateWord.setDeletedTime(currentTime); - suggestElevateWordService.store(suggestElevateWord); + suggestElevateWordService.delete(suggestElevateWord); suggestHelper.storeAllElevateWords(); SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table"); diff --git a/src/main/java/org/codelibs/fess/web/admin/SuggestElevateWordForm.java b/src/main/java/org/codelibs/fess/web/admin/SuggestElevateWordForm.java index 399fa6e4c..54bb5701d 100644 --- a/src/main/java/org/codelibs/fess/web/admin/SuggestElevateWordForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/SuggestElevateWordForm.java @@ -21,9 +21,8 @@ import java.util.HashMap; import java.util.Map; import org.apache.struts.upload.FormFile; -import org.codelibs.fess.Constants; -import org.seasar.struts.annotation.DateType; -import org.seasar.struts.annotation.IntRange; +import org.codelibs.fess.util.ComponentUtil; +import org.seasar.struts.annotation.FloatType; import org.seasar.struts.annotation.IntegerType; import org.seasar.struts.annotation.LongType; import org.seasar.struts.annotation.Maxbytelength; @@ -49,7 +48,7 @@ public class SuggestElevateWordForm implements Serializable { } @Required(target = "confirmfromupdate,update,delete") - @LongType + @Maxbytelength(maxbytelength = 1000) public String id; @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") @@ -62,7 +61,7 @@ public class SuggestElevateWordForm implements Serializable { public String targetLabel; @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - @IntRange(min = 0, max = 2147483647) + @FloatType public String boost; @Required(target = "confirmfromupdate,update,delete") @@ -70,20 +69,15 @@ public class SuggestElevateWordForm implements Serializable { public String createdBy; @Required(target = "confirmfromupdate,update,delete") - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType public String createdTime; @Maxbytelength(maxbytelength = 255) public String updatedBy; - @DateType + @LongType public String updatedTime; - public String deletedBy; - - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) - public String deletedTime; - @Required(target = "confirmfromupdate,update,delete") @IntegerType public String versionNo; @@ -95,12 +89,10 @@ public class SuggestElevateWordForm implements Serializable { targetRole = null; targetLabel = null; boost = null; - createdBy = null; - createdTime = null; + createdBy = "system"; + createdTime = Long.toString(ComponentUtil.getSystemHelper().getCurrentTimeAsLong()); updatedBy = null; updatedTime = null; - deletedBy = null; - deletedTime = null; versionNo = null; boost = "100"; } diff --git a/src/main/java/org/codelibs/fess/web/admin/SystemAction.java b/src/main/java/org/codelibs/fess/web/admin/SystemAction.java index 4e9a4bc2c..1ab876f8d 100644 --- a/src/main/java/org/codelibs/fess/web/admin/SystemAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/SystemAction.java @@ -26,7 +26,7 @@ import javax.servlet.http.HttpSession; import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.client.FessEsClient; import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.ScheduledJob; +import org.codelibs.fess.es.exentity.ScheduledJob; import org.codelibs.fess.helper.JobHelper; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.service.ScheduledJobService; diff --git a/src/main/java/org/codelibs/fess/web/admin/UserInfoAction.java b/src/main/java/org/codelibs/fess/web/admin/UserInfoAction.java deleted file mode 100644 index 762381634..000000000 --- a/src/main/java/org/codelibs/fess/web/admin/UserInfoAction.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.web.admin; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; - -import org.codelibs.fess.Constants; -import org.codelibs.fess.crud.CommonConstants; -import org.codelibs.fess.crud.CrudMessageException; -import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.UserInfo; -import org.codelibs.fess.helper.SystemHelper; -import org.codelibs.fess.pager.UserInfoPager; -import org.codelibs.fess.service.UserInfoService; -import org.codelibs.fess.web.base.FessAdminAction; -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; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class UserInfoAction extends FessAdminAction { - - private static final Logger logger = LoggerFactory.getLogger(UserInfoAction.class); - - // for list - - public List userInfoItems; - - // for edit/confirm/delete - - @ActionForm - @Resource - protected UserInfoForm userInfoForm; - - @Resource - protected UserInfoService userInfoService; - - @Resource - protected UserInfoPager userInfoPager; - - @Resource - protected SystemHelper systemHelper; - - protected String displayList(final boolean redirect) { - // page navi - userInfoItems = userInfoService.getUserInfoList(userInfoPager); - - // restore from pager - Beans.copy(userInfoPager, userInfoForm.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(userInfoForm.pageNumber)) { - try { - userInfoPager.setCurrentPageNumber(Integer.parseInt(userInfoForm.pageNumber)); - } catch (final NumberFormatException e) { - if (logger.isDebugEnabled()) { - logger.debug("Invalid value: " + userInfoForm.pageNumber, e); - } - } - } - - return displayList(false); - } - - @Execute(validator = false, input = "error.jsp") - public String search() { - Beans.copy(userInfoForm.searchParams, userInfoPager).excludes(CommonConstants.PAGER_CONVERSION_RULE) - - .execute(); - - return displayList(false); - } - - @Execute(validator = false, input = "error.jsp") - public String reset() { - userInfoPager.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 (userInfoForm.crudMode != CommonConstants.CONFIRM_MODE) { - throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.CONFIRM_MODE, - userInfoForm.crudMode }); - } - - loadUserInfo(); - - return "confirm.jsp"; - } - - @Token(save = true, validate = false) - @Execute(validator = false, input = "error.jsp") - public String createpage() { - // page navi - userInfoForm.initialize(); - userInfoForm.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 (userInfoForm.crudMode != CommonConstants.EDIT_MODE) { - throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.EDIT_MODE, userInfoForm.crudMode }); - } - - loadUserInfo(); - - return "edit.jsp"; - } - - @Token(save = true, validate = false) - @Execute(validator = false, input = "error.jsp") - public String editfromconfirm() { - userInfoForm.crudMode = CommonConstants.EDIT_MODE; - - loadUserInfo(); - - 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 (userInfoForm.crudMode != CommonConstants.DELETE_MODE) { - throw new ActionMessagesException("errors.crud_invalid_mode", - new Object[] { CommonConstants.DELETE_MODE, userInfoForm.crudMode }); - } - - loadUserInfo(); - - return "confirm.jsp"; - } - - @Token(save = true, validate = false) - @Execute(validator = false, input = "error.jsp") - public String deletefromconfirm() { - userInfoForm.crudMode = CommonConstants.DELETE_MODE; - - loadUserInfo(); - - return "confirm.jsp"; - } - - @Token(save = false, validate = true) - @Execute(validator = true, input = "edit.jsp") - public String create() { - try { - final UserInfo userInfo = createUserInfo(); - userInfoService.store(userInfo); - SAStrutsUtil.addSessionMessage("success.crud_create_crud_table"); - - return displayList(true); - } catch (final ActionMessagesException e) { - logger.error(e.getMessage(), e); - throw e; - } catch (final CrudMessageException e) { - logger.error(e.getMessage(), e); - throw new ActionMessagesException(e.getMessageId(), e.getArgs()); - } catch (final Exception e) { - logger.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 UserInfo userInfo = createUserInfo(); - userInfoService.store(userInfo); - SAStrutsUtil.addSessionMessage("success.crud_update_crud_table"); - - return displayList(true); - } catch (final ActionMessagesException e) { - logger.error(e.getMessage(), e); - throw e; - } catch (final CrudMessageException e) { - logger.error(e.getMessage(), e); - throw new ActionMessagesException(e.getMessageId(), e.getArgs()); - } catch (final Exception e) { - logger.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 (userInfoForm.crudMode != CommonConstants.DELETE_MODE) { - throw new ActionMessagesException("errors.crud_invalid_mode", - new Object[] { CommonConstants.DELETE_MODE, userInfoForm.crudMode }); - } - - try { - final UserInfo userInfo = userInfoService.getUserInfo(createKeyMap()); - if (userInfo == null) { - // throw an exception - throw new ActionMessagesException("errors.crud_could_not_find_crud_table", - - new Object[] { userInfoForm.id }); - - } - - userInfoService.delete(userInfo); - SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table"); - - return displayList(true); - } catch (final ActionMessagesException e) { - logger.error(e.getMessage(), e); - throw e; - } catch (final CrudMessageException e) { - logger.error(e.getMessage(), e); - throw new ActionMessagesException(e.getMessageId(), e.getArgs()); - } catch (final Exception e) { - logger.error(e.getMessage(), e); - throw new ActionMessagesException("errors.crud_failed_to_delete_crud_table"); - } - } - - protected void loadUserInfo() { - - final UserInfo userInfo = userInfoService.getUserInfo(createKeyMap()); - if (userInfo == null) { - // throw an exception - throw new ActionMessagesException("errors.crud_could_not_find_crud_table", - - new Object[] { userInfoForm.id }); - - } - - Beans.copy(userInfo, userInfoForm).excludes("searchParams", "mode") - - .timestampConverter(Constants.DEFAULT_DATETIME_FORMAT, "createdTime", "updatedTime").execute(); - } - - protected UserInfo createUserInfo() { - UserInfo userInfo; - if (userInfoForm.crudMode == CommonConstants.EDIT_MODE) { - userInfo = userInfoService.getUserInfo(createKeyMap()); - if (userInfo == null) { - // throw an exception - throw new ActionMessagesException("errors.crud_could_not_find_crud_table", - - new Object[] { userInfoForm.id }); - - } - } else { - userInfo = new UserInfo(); - } - Beans.copy(userInfoForm, userInfo).excludes("searchParams", "mode") - - .timestampConverter(Constants.DEFAULT_DATETIME_FORMAT, "createdTime", "updatedTime").execute(); - - return userInfo; - } - - protected Map createKeyMap() { - final Map keys = new HashMap(); - - keys.put("id", userInfoForm.id); - - return keys; - } - - public String getHelpLink() { - return systemHelper.getHelpLink("userInfo"); - } - - @Execute(validator = false, input = "error.jsp") - public String deleteall() { - userInfoService.deleteAll(userInfoPager); - SAStrutsUtil.addSessionMessage("success.user_info_delete_all"); - return displayList(true); - } -} diff --git a/src/main/java/org/codelibs/fess/web/admin/UserInfoForm.java b/src/main/java/org/codelibs/fess/web/admin/UserInfoForm.java deleted file mode 100644 index 221266c4a..000000000 --- a/src/main/java/org/codelibs/fess/web/admin/UserInfoForm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2009-2015 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 org.codelibs.fess.web.admin; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.Map; - -import org.codelibs.fess.Constants; -import org.seasar.struts.annotation.DateType; -import org.seasar.struts.annotation.IntegerType; -import org.seasar.struts.annotation.LongType; -import org.seasar.struts.annotation.Required; - -public class UserInfoForm implements Serializable { - - private static final long serialVersionUID = 1L; - - @IntegerType - public String pageNumber; - - public Map searchParams = new HashMap(); - - @IntegerType - public int crudMode; - - public String getCurrentPageNumber() { - return pageNumber; - } - - @Required(target = "confirmfromupdate,update,delete") - @LongType - public String id; - - @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - public String code; - - @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) - public String createdTime; - - @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) - public String updatedTime; - - public void initialize() { - id = null; - code = null; - createdTime = null; - updatedTime = null; - } -} diff --git a/src/main/java/org/codelibs/fess/web/admin/WebAuthenticationAction.java b/src/main/java/org/codelibs/fess/web/admin/WebAuthenticationAction.java index 5843a4416..244205930 100644 --- a/src/main/java/org/codelibs/fess/web/admin/WebAuthenticationAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/WebAuthenticationAction.java @@ -16,7 +16,6 @@ package org.codelibs.fess.web.admin; -import java.time.LocalDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -30,12 +29,12 @@ import org.codelibs.fess.beans.FessBeans; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.WebAuthentication; -import org.codelibs.fess.db.exentity.WebCrawlingConfig; +import org.codelibs.fess.es.exentity.WebAuthentication; +import org.codelibs.fess.es.exentity.WebConfig; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.pager.WebAuthenticationPager; import org.codelibs.fess.service.WebAuthenticationService; -import org.codelibs.fess.service.WebCrawlingConfigService; +import org.codelibs.fess.service.WebConfigService; import org.codelibs.fess.web.base.FessAdminAction; import org.codelibs.sastruts.core.annotation.Token; import org.codelibs.sastruts.core.exception.SSCActionMessagesException; @@ -69,7 +68,7 @@ public class WebAuthenticationAction extends FessAdminAction { protected WebAuthenticationPager webAuthenticationPager; @Resource - protected WebCrawlingConfigService webCrawlingConfigService; + protected WebConfigService webConfigService; @Resource protected SystemHelper systemHelper; @@ -289,7 +288,7 @@ public class WebAuthenticationAction extends FessAdminAction { protected WebAuthentication createWebAuthentication() { WebAuthentication webAuthentication; final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); + final long currentTime = systemHelper.getCurrentTimeAsLong(); if (webAuthenticationForm.crudMode == CommonConstants.EDIT_MODE) { webAuthentication = webAuthenticationService.getWebAuthentication(createKeyMap()); if (webAuthentication == null) { @@ -326,12 +325,7 @@ public class WebAuthenticationAction extends FessAdminAction { throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { webAuthenticationForm.id }); } - // webAuthenticationService.delete(webAuthentication); - final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); - webAuthentication.setDeletedBy(username); - webAuthentication.setDeletedTime(currentTime); - webAuthenticationService.store(webAuthentication); + webAuthenticationService.delete(webAuthentication); SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table"); return displayList(true); @@ -348,15 +342,14 @@ public class WebAuthenticationAction extends FessAdminAction { } public boolean isDisplayCreateLink() { - return !webCrawlingConfigService.getAllWebCrawlingConfigList(false, false, false, null).isEmpty(); + return !webConfigService.getAllWebConfigList(false, false, false, null).isEmpty(); } - public List> getWebCrawlingConfigItems() { + public List> getWebConfigItems() { final List> items = new ArrayList>(); - final List webCrawlingConfigList = - webCrawlingConfigService.getAllWebCrawlingConfigList(false, false, false, null); - for (final WebCrawlingConfig webCrawlingConfig : webCrawlingConfigList) { - items.add(createItem(webCrawlingConfig.getName(), webCrawlingConfig.getId().toString())); + final List webConfigList = webConfigService.getAllWebConfigList(false, false, false, null); + for (final WebConfig webConfig : webConfigList) { + items.add(createItem(webConfig.getName(), webConfig.getId().toString())); } return items; } diff --git a/src/main/java/org/codelibs/fess/web/admin/WebAuthenticationForm.java b/src/main/java/org/codelibs/fess/web/admin/WebAuthenticationForm.java index 6abaae9f9..caecdd552 100644 --- a/src/main/java/org/codelibs/fess/web/admin/WebAuthenticationForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/WebAuthenticationForm.java @@ -17,13 +17,10 @@ package org.codelibs.fess.web.admin; import java.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; import java.util.HashMap; import java.util.Map; -import org.codelibs.fess.Constants; -import org.seasar.struts.annotation.DateType; +import org.codelibs.fess.util.ComponentUtil; import org.seasar.struts.annotation.IntRange; import org.seasar.struts.annotation.IntegerType; import org.seasar.struts.annotation.LongType; @@ -47,7 +44,7 @@ public class WebAuthenticationForm implements Serializable { } @Required(target = "confirmfromupdate,update,delete") - @LongType + @Maxbytelength(maxbytelength = 1000) public String id; @Maxbytelength(maxbytelength = 100) @@ -73,29 +70,23 @@ public class WebAuthenticationForm implements Serializable { public String parameters; @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - @LongType - public String webCrawlingConfigId; + @Maxbytelength(maxbytelength = 1000) + public String webConfigId; @Required(target = "confirmfromupdate,update,delete") @Maxbytelength(maxbytelength = 255) public String createdBy; @Required(target = "confirmfromupdate,update,delete") - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType public String createdTime; @Maxbytelength(maxbytelength = 255) public String updatedBy; - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType 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; @@ -109,16 +100,11 @@ public class WebAuthenticationForm implements Serializable { username = null; password = null; parameters = null; - webCrawlingConfigId = null; - createdBy = null; - createdTime = null; + webConfigId = null; + createdBy = "system"; + createdTime = Long.toString(ComponentUtil.getSystemHelper().getCurrentTimeAsLong()); updatedBy = null; updatedTime = null; - deletedBy = null; - deletedTime = null; versionNo = null; - createdBy = "system"; - final SimpleDateFormat sdf = new SimpleDateFormat(Constants.DEFAULT_DATETIME_FORMAT); - createdTime = sdf.format(new Date()); } } diff --git a/src/main/java/org/codelibs/fess/web/admin/FileCrawlingConfigAction.java b/src/main/java/org/codelibs/fess/web/admin/WebConfigAction.java similarity index 62% rename from src/main/java/org/codelibs/fess/web/admin/FileCrawlingConfigAction.java rename to src/main/java/org/codelibs/fess/web/admin/WebConfigAction.java index 104ba3658..8149e2353 100644 --- a/src/main/java/org/codelibs/fess/web/admin/FileCrawlingConfigAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/WebConfigAction.java @@ -16,7 +16,6 @@ package org.codelibs.fess.web.admin; -import java.time.LocalDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -27,15 +26,16 @@ import org.codelibs.fess.beans.FessBeans; import org.codelibs.fess.crud.CommonConstants; import org.codelibs.fess.crud.CrudMessageException; import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.FileCrawlingConfig; -import org.codelibs.fess.db.exentity.LabelType; -import org.codelibs.fess.db.exentity.RoleType; +import org.codelibs.fess.es.exentity.CrawlingConfig; +import org.codelibs.fess.es.exentity.LabelType; +import org.codelibs.fess.es.exentity.RoleType; +import org.codelibs.fess.es.exentity.WebConfig; import org.codelibs.fess.helper.SystemHelper; -import org.codelibs.fess.pager.FileCrawlingConfigPager; +import org.codelibs.fess.pager.WebConfigPager; import org.codelibs.fess.service.FailureUrlService; -import org.codelibs.fess.service.FileCrawlingConfigService; import org.codelibs.fess.service.LabelTypeService; import org.codelibs.fess.service.RoleTypeService; +import org.codelibs.fess.service.WebConfigService; import org.codelibs.fess.web.base.FessAdminAction; import org.codelibs.sastruts.core.annotation.Token; import org.codelibs.sastruts.core.exception.SSCActionMessagesException; @@ -47,25 +47,25 @@ import org.seasar.struts.exception.ActionMessagesException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class FileCrawlingConfigAction extends FessAdminAction { +public class WebConfigAction extends FessAdminAction { - private static final Logger logger = LoggerFactory.getLogger(FileCrawlingConfigAction.class); + private static final Logger logger = LoggerFactory.getLogger(WebConfigAction.class); // for list - public List fileCrawlingConfigItems; + public List webConfigItems; // for edit/confirm/delete @ActionForm @Resource - protected FileCrawlingConfigForm fileCrawlingConfigForm; + protected WebConfigForm webConfigForm; @Resource - protected FileCrawlingConfigService fileCrawlingConfigService; + protected WebConfigService webConfigService; @Resource - protected FileCrawlingConfigPager fileCrawlingConfigPager; + protected WebConfigPager webConfigPager; @Resource protected RoleTypeService roleTypeService; @@ -80,15 +80,15 @@ public class FileCrawlingConfigAction extends FessAdminAction { protected SystemHelper systemHelper; public String getHelpLink() { - return systemHelper.getHelpLink("fileCrawlingConfig"); + return systemHelper.getHelpLink("webConfig"); } protected String displayList(final boolean redirect) { // page navi - fileCrawlingConfigItems = fileCrawlingConfigService.getFileCrawlingConfigList(fileCrawlingConfigPager); + webConfigItems = webConfigService.getWebConfigList(webConfigPager); // restore from pager - Beans.copy(fileCrawlingConfigPager, fileCrawlingConfigForm.searchParams).excludes(CommonConstants.PAGER_CONVERSION_RULE) + Beans.copy(webConfigPager, webConfigForm.searchParams).excludes(CommonConstants.PAGER_CONVERSION_RULE) .execute(); @@ -107,12 +107,12 @@ public class FileCrawlingConfigAction extends FessAdminAction { @Execute(validator = false, input = "error.jsp", urlPattern = "list/{pageNumber}") public String list() { // page navi - if (StringUtil.isNotBlank(fileCrawlingConfigForm.pageNumber)) { + if (StringUtil.isNotBlank(webConfigForm.pageNumber)) { try { - fileCrawlingConfigPager.setCurrentPageNumber(Integer.parseInt(fileCrawlingConfigForm.pageNumber)); + webConfigPager.setCurrentPageNumber(Integer.parseInt(webConfigForm.pageNumber)); } catch (final NumberFormatException e) { if (logger.isDebugEnabled()) { - logger.debug("Invalid value: " + fileCrawlingConfigForm.pageNumber, e); + logger.debug("Invalid value: " + webConfigForm.pageNumber, e); } } } @@ -122,7 +122,7 @@ public class FileCrawlingConfigAction extends FessAdminAction { @Execute(validator = false, input = "error.jsp") public String search() { - Beans.copy(fileCrawlingConfigForm.searchParams, fileCrawlingConfigPager).excludes(CommonConstants.PAGER_CONVERSION_RULE) + Beans.copy(webConfigForm.searchParams, webConfigPager).excludes(CommonConstants.PAGER_CONVERSION_RULE) .execute(); @@ -131,7 +131,7 @@ public class FileCrawlingConfigAction extends FessAdminAction { @Execute(validator = false, input = "error.jsp") public String reset() { - fileCrawlingConfigPager.clear(); + webConfigPager.clear(); return displayList(false); } @@ -149,12 +149,12 @@ public class FileCrawlingConfigAction extends FessAdminAction { @Execute(validator = false, input = "error.jsp", urlPattern = "confirmpage/{crudMode}/{id}") public String confirmpage() { - if (fileCrawlingConfigForm.crudMode != CommonConstants.CONFIRM_MODE) { + if (webConfigForm.crudMode != CommonConstants.CONFIRM_MODE) { throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.CONFIRM_MODE, - fileCrawlingConfigForm.crudMode }); + webConfigForm.crudMode }); } - loadFileCrawlingConfig(); + loadWebConfig(); return "confirm.jsp"; } @@ -163,8 +163,8 @@ public class FileCrawlingConfigAction extends FessAdminAction { @Execute(validator = false, input = "error.jsp") public String createpage() { // page navi - fileCrawlingConfigForm.initialize(); - fileCrawlingConfigForm.crudMode = CommonConstants.CREATE_MODE; + webConfigForm.initialize(); + webConfigForm.crudMode = CommonConstants.CREATE_MODE; return "edit.jsp"; } @@ -172,12 +172,12 @@ public class FileCrawlingConfigAction extends FessAdminAction { @Token(save = true, validate = false) @Execute(validator = false, input = "error.jsp", urlPattern = "editpage/{crudMode}/{id}") public String editpage() { - if (fileCrawlingConfigForm.crudMode != CommonConstants.EDIT_MODE) { - throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.EDIT_MODE, - fileCrawlingConfigForm.crudMode }); + if (webConfigForm.crudMode != CommonConstants.EDIT_MODE) { + throw new ActionMessagesException("errors.crud_invalid_mode", + new Object[] { CommonConstants.EDIT_MODE, webConfigForm.crudMode }); } - loadFileCrawlingConfig(); + loadWebConfig(); return "edit.jsp"; } @@ -185,9 +185,9 @@ public class FileCrawlingConfigAction extends FessAdminAction { @Token(save = true, validate = false) @Execute(validator = false, input = "error.jsp") public String editfromconfirm() { - fileCrawlingConfigForm.crudMode = CommonConstants.EDIT_MODE; + webConfigForm.crudMode = CommonConstants.EDIT_MODE; - loadFileCrawlingConfig(); + loadWebConfig(); return "edit.jsp"; } @@ -207,12 +207,12 @@ public class FileCrawlingConfigAction extends FessAdminAction { @Token(save = true, validate = false) @Execute(validator = false, input = "error.jsp", urlPattern = "deletepage/{crudMode}/{id}") public String deletepage() { - if (fileCrawlingConfigForm.crudMode != CommonConstants.DELETE_MODE) { + if (webConfigForm.crudMode != CommonConstants.DELETE_MODE) { throw new ActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.DELETE_MODE, - fileCrawlingConfigForm.crudMode }); + webConfigForm.crudMode }); } - loadFileCrawlingConfig(); + loadWebConfig(); return "confirm.jsp"; } @@ -220,9 +220,9 @@ public class FileCrawlingConfigAction extends FessAdminAction { @Token(save = true, validate = false) @Execute(validator = false, input = "error.jsp") public String deletefromconfirm() { - fileCrawlingConfigForm.crudMode = CommonConstants.DELETE_MODE; + webConfigForm.crudMode = CommonConstants.DELETE_MODE; - loadFileCrawlingConfig(); + loadWebConfig(); return "confirm.jsp"; } @@ -231,8 +231,8 @@ public class FileCrawlingConfigAction extends FessAdminAction { @Execute(validator = true, input = "edit.jsp") public String create() { try { - final FileCrawlingConfig fileCrawlingConfig = createFileCrawlingConfig(); - fileCrawlingConfigService.store(fileCrawlingConfig); + final WebConfig webConfig = createWebConfig(); + webConfigService.store(webConfig); SAStrutsUtil.addSessionMessage("success.crud_create_crud_table"); return displayList(true); @@ -252,8 +252,8 @@ public class FileCrawlingConfigAction extends FessAdminAction { @Execute(validator = true, input = "edit.jsp") public String update() { try { - final FileCrawlingConfig fileCrawlingConfig = createFileCrawlingConfig(); - fileCrawlingConfigService.store(fileCrawlingConfig); + final WebConfig webConfig = createWebConfig(); + webConfigService.store(webConfig); SAStrutsUtil.addSessionMessage("success.crud_update_crud_table"); return displayList(true); @@ -272,71 +272,66 @@ public class FileCrawlingConfigAction extends FessAdminAction { protected Map createKeyMap() { final Map keys = new HashMap(); - keys.put("id", fileCrawlingConfigForm.id); + keys.put("id", webConfigForm.id); return keys; } - protected void loadFileCrawlingConfig() { + protected void loadWebConfig() { - final FileCrawlingConfig fileCrawlingConfig = fileCrawlingConfigService.getFileCrawlingConfig(createKeyMap()); - if (fileCrawlingConfig == null) { + final CrawlingConfig webConfig = webConfigService.getWebConfig(createKeyMap()); + if (webConfig == null) { // throw an exception - throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { fileCrawlingConfigForm.id }); + throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { webConfigForm.id }); } - FessBeans.copy(fileCrawlingConfig, fileCrawlingConfigForm).commonColumnDateConverter().excludes("searchParams", "mode").execute(); + FessBeans.copy(webConfig, webConfigForm).commonColumnDateConverter().excludes("searchParams", "mode").execute(); // normalize boost - if (fileCrawlingConfigForm.boost != null && fileCrawlingConfigForm.boost.indexOf('.') > 0) { - fileCrawlingConfigForm.boost = fileCrawlingConfigForm.boost.substring(0, fileCrawlingConfigForm.boost.indexOf('.')); + if (webConfigForm.boost != null && webConfigForm.boost.indexOf('.') > 0) { + webConfigForm.boost = webConfigForm.boost.substring(0, webConfigForm.boost.indexOf('.')); } } - protected FileCrawlingConfig createFileCrawlingConfig() { - FileCrawlingConfig fileCrawlingConfig; + protected WebConfig createWebConfig() { + WebConfig webConfig; final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); - if (fileCrawlingConfigForm.crudMode == CommonConstants.EDIT_MODE) { - fileCrawlingConfig = fileCrawlingConfigService.getFileCrawlingConfig(createKeyMap()); - if (fileCrawlingConfig == null) { + final long currentTime = systemHelper.getCurrentTimeAsLong(); + if (webConfigForm.crudMode == CommonConstants.EDIT_MODE) { + webConfig = webConfigService.getWebConfig(createKeyMap()); + if (webConfig == null) { // throw an exception - throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { fileCrawlingConfigForm.id }); + throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { webConfigForm.id }); } } else { - fileCrawlingConfig = new FileCrawlingConfig(); - fileCrawlingConfig.setCreatedBy(username); - fileCrawlingConfig.setCreatedTime(currentTime); + webConfig = new WebConfig(); + webConfig.setCreatedBy(username); + webConfig.setCreatedTime(currentTime); } - fileCrawlingConfig.setUpdatedBy(username); - fileCrawlingConfig.setUpdatedTime(currentTime); - FessBeans.copy(fileCrawlingConfigForm, fileCrawlingConfig).excludesCommonColumns().execute(); + webConfig.setUpdatedBy(username); + webConfig.setUpdatedTime(currentTime); + FessBeans.copy(webConfigForm, webConfig).excludesCommonColumns().execute(); - return fileCrawlingConfig; + return webConfig; } @Execute(validator = false, input = "error.jsp") public String delete() { - if (fileCrawlingConfigForm.crudMode != CommonConstants.DELETE_MODE) { + if (webConfigForm.crudMode != CommonConstants.DELETE_MODE) { throw new SSCActionMessagesException("errors.crud_invalid_mode", new Object[] { CommonConstants.DELETE_MODE, - fileCrawlingConfigForm.crudMode }); + webConfigForm.crudMode }); } try { - final FileCrawlingConfig fileCrawlingConfig = fileCrawlingConfigService.getFileCrawlingConfig(createKeyMap()); - if (fileCrawlingConfig == null) { + final WebConfig webConfig = webConfigService.getWebConfig(createKeyMap()); + if (webConfig == null) { // throw an exception - throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { fileCrawlingConfigForm.id }); + throw new SSCActionMessagesException("errors.crud_could_not_find_crud_table", new Object[] { webConfigForm.id }); } - failureUrlService.deleteByConfigId(fileCrawlingConfig.getConfigId()); + failureUrlService.deleteByConfigId(webConfig.getConfigId()); - //fileCrawlingConfigService.delete(fileCrawlingConfig); - final String username = systemHelper.getUsername(); - final LocalDateTime currentTime = systemHelper.getCurrentTime(); - fileCrawlingConfig.setDeletedBy(username); - fileCrawlingConfig.setDeletedTime(currentTime); - fileCrawlingConfigService.store(fileCrawlingConfig); + webConfigService.delete(webConfig); SAStrutsUtil.addSessionMessage("success.crud_delete_crud_table"); return displayList(true); @@ -359,5 +354,4 @@ public class FileCrawlingConfigAction extends FessAdminAction { public List getLabelTypeItems() { return labelTypeService.getLabelTypeList(); } - } diff --git a/src/main/java/org/codelibs/fess/web/admin/WebCrawlingConfigForm.java b/src/main/java/org/codelibs/fess/web/admin/WebConfigForm.java similarity index 85% rename from src/main/java/org/codelibs/fess/web/admin/WebCrawlingConfigForm.java rename to src/main/java/org/codelibs/fess/web/admin/WebConfigForm.java index 8b8acb3b2..0352c3b21 100644 --- a/src/main/java/org/codelibs/fess/web/admin/WebCrawlingConfigForm.java +++ b/src/main/java/org/codelibs/fess/web/admin/WebConfigForm.java @@ -17,8 +17,6 @@ package org.codelibs.fess.web.admin; import java.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; import java.util.HashMap; import java.util.Map; @@ -26,7 +24,6 @@ import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.Constants; import org.codelibs.fess.annotation.UriType; import org.codelibs.fess.util.ComponentUtil; -import org.seasar.struts.annotation.DateType; import org.seasar.struts.annotation.IntRange; import org.seasar.struts.annotation.IntegerType; import org.seasar.struts.annotation.LongRange; @@ -34,7 +31,7 @@ import org.seasar.struts.annotation.LongType; import org.seasar.struts.annotation.Maxbytelength; import org.seasar.struts.annotation.Required; -public class WebCrawlingConfigForm implements Serializable { +public class WebConfigForm implements Serializable { private static final long serialVersionUID = 1L; @@ -55,7 +52,7 @@ public class WebCrawlingConfigForm implements Serializable { } @Required(target = "confirmfromupdate,update,delete") - @LongType + @Maxbytelength(maxbytelength = 1000) public String id; @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") @@ -105,7 +102,7 @@ public class WebCrawlingConfigForm implements Serializable { public String boost; @Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete") - @Maxbytelength(maxbytelength = 1) + @Maxbytelength(maxbytelength = 5) public String available; @Required(target = "confirmfromupdate,update,delete") @@ -117,21 +114,15 @@ public class WebCrawlingConfigForm implements Serializable { public String createdBy; @Required(target = "confirmfromupdate,update,delete") - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType public String createdTime; @Maxbytelength(maxbytelength = 255) public String updatedBy; - @DateType(datePattern = Constants.DEFAULT_DATETIME_FORMAT) + @LongType 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; @@ -153,24 +144,17 @@ public class WebCrawlingConfigForm implements Serializable { boost = "1"; available = null; sortOrder = null; - createdBy = null; - createdTime = null; + createdBy = "system"; + createdTime = Long.toString(ComponentUtil.getSystemHelper().getCurrentTimeAsLong()); updatedBy = null; updatedTime = null; - deletedBy = null; - deletedTime = null; versionNo = null; sortOrder = "0"; userAgent = ComponentUtil.getUserAgentName(); if (StringUtil.isBlank(userAgent)) { - userAgent = "Fess Robot/1.0"; + userAgent = "Fess Robot/" + Constants.FESS_VERSION; } numOfThread = Integer.toString(Constants.DEFAULT_NUM_OF_THREAD_FOR_WEB); intervalTime = Integer.toString(Constants.DEFAULT_INTERVAL_TIME_FOR_WEB); - // Temporary data - createdBy = "system"; - final SimpleDateFormat sdf = new SimpleDateFormat(Constants.DEFAULT_DATETIME_FORMAT); - createdTime = sdf.format(new Date()); - } } diff --git a/src/main/java/org/codelibs/fess/web/admin/WizardAction.java b/src/main/java/org/codelibs/fess/web/admin/WizardAction.java index 33b3616ef..b87a2c87c 100644 --- a/src/main/java/org/codelibs/fess/web/admin/WizardAction.java +++ b/src/main/java/org/codelibs/fess/web/admin/WizardAction.java @@ -18,9 +18,7 @@ package org.codelibs.fess.web.admin; import java.io.Serializable; import java.io.UnsupportedEncodingException; -import java.math.BigDecimal; import java.net.URLEncoder; -import java.time.LocalDateTime; import java.util.List; import javax.annotation.Resource; @@ -30,15 +28,15 @@ import org.codelibs.core.lang.StringUtil; import org.codelibs.core.misc.DynamicProperties; import org.codelibs.fess.Constants; import org.codelibs.fess.crud.util.SAStrutsUtil; -import org.codelibs.fess.db.exentity.FileCrawlingConfig; -import org.codelibs.fess.db.exentity.ScheduledJob; -import org.codelibs.fess.db.exentity.WebCrawlingConfig; +import org.codelibs.fess.es.exentity.FileConfig; +import org.codelibs.fess.es.exentity.ScheduledJob; +import org.codelibs.fess.es.exentity.WebConfig; import org.codelibs.fess.helper.JobHelper; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.job.TriggeredJob; -import org.codelibs.fess.service.FileCrawlingConfigService; +import org.codelibs.fess.service.FileConfigService; import org.codelibs.fess.service.ScheduledJobService; -import org.codelibs.fess.service.WebCrawlingConfigService; +import org.codelibs.fess.service.WebConfigService; import org.codelibs.fess.util.ComponentUtil; import org.codelibs.robot.util.CharUtil; import org.codelibs.sastruts.core.annotation.Token; @@ -61,10 +59,10 @@ public class WizardAction implements Serializable { protected DynamicProperties crawlerProperties; @Resource - protected WebCrawlingConfigService webCrawlingConfigService; + protected WebConfigService webConfigService; @Resource - protected FileCrawlingConfigService fileCrawlingConfigService; + protected FileConfigService fileConfigService; @Resource protected SystemHelper systemHelper; @@ -133,14 +131,14 @@ public class WizardAction implements Serializable { configPath = convertCrawlingPath(buf.toString()); final String username = systemHelper.getUsername(); - final LocalDateTime now = systemHelper.getCurrentTime(); + final long now = systemHelper.getCurrentTimeAsLong(); try { if (isWebCrawlingPath(configPath)) { // web - final WebCrawlingConfig wConfig = new WebCrawlingConfig(); + final WebConfig wConfig = new WebConfig(); wConfig.setAvailable(Constants.T); - wConfig.setBoost(BigDecimal.ONE); + wConfig.setBoost(1.0f); wConfig.setCreatedBy(username); wConfig.setCreatedTime(now); if (StringUtil.isNotBlank(wizardForm.depth)) { @@ -162,13 +160,13 @@ public class WizardAction implements Serializable { wConfig.setUrls(configPath); wConfig.setUserAgent(getDefaultString("default.config.web.userAgent", ComponentUtil.getUserAgentName())); - webCrawlingConfigService.store(wConfig); + webConfigService.store(wConfig); } else { // file - final FileCrawlingConfig fConfig = new FileCrawlingConfig(); + final FileConfig fConfig = new FileConfig(); fConfig.setAvailable(Constants.T); - fConfig.setBoost(BigDecimal.ONE); + fConfig.setBoost(1.0f); fConfig.setCreatedBy(username); fConfig.setCreatedTime(now); if (StringUtil.isNotBlank(wizardForm.depth)) { @@ -189,7 +187,7 @@ public class WizardAction implements Serializable { fConfig.setUpdatedTime(now); fConfig.setPaths(configPath); - fileCrawlingConfigService.store(fConfig); + fileConfigService.store(fConfig); } return configName; } catch (final Exception e) { diff --git a/src/main/java/org/codelibs/fess/web/base/FessBaseAction.java b/src/main/java/org/codelibs/fess/web/base/FessBaseAction.java index b1ecf4155..7a8944cec 100644 --- a/src/main/java/org/codelibs/fess/web/base/FessBaseAction.java +++ b/src/main/java/org/codelibs/fess/web/base/FessBaseAction.java @@ -308,7 +308,7 @@ public abstract class FessBaseAction extends RootAction implements ActionCallbac RuntimeException translated = null; try { translateException(cause); - } catch (RuntimeException e) { + } catch (final RuntimeException e) { translated = e; } final RuntimeException handlingEx = translated != null ? translated : cause; @@ -396,6 +396,7 @@ public abstract class FessBaseAction extends RootAction implements ActionCallbac */ protected AccessContextArranger createAccessContextArranger() { return new AccessContextArranger() { + @Override public AccessContext arrangePreparedAccessContext(final AccessContextResource resource) { final AccessContext context = new AccessContext(); // uses provider to synchronize it with transaction time @@ -469,12 +470,7 @@ public abstract class FessBaseAction extends RootAction implements ActionCallbac */ protected SqlStringFilter createSqlStringFilter(final ActionExecuteMeta executeMeta) { final Method actionMethod = executeMeta.getActionMethod(); - return newRomanticTraceableSqlStringFilter(actionMethod, new TraceableSqlAdditionalInfoProvider() { - @Override - public String provide() { // lazy because it may be auto-login later - return buildSqlMarkingAdditionalInfo(); - } - }); + return newRomanticTraceableSqlStringFilter(actionMethod, () -> buildSqlMarkingAdditionalInfo()); } protected RomanticTraceableSqlStringFilter newRomanticTraceableSqlStringFilter(Method actionMethod, @@ -622,7 +618,7 @@ public abstract class FessBaseAction extends RootAction implements ActionCallbac return; } int index = 0; - for (StackTraceElement element : stackTrace) { + for (final StackTraceElement element : stackTrace) { if (index > 10) { // not all because it's not error break; } @@ -759,7 +755,7 @@ public abstract class FessBaseAction extends RootAction implements ActionCallbac */ protected void assertTrueOrForcedRequest404NotFound(boolean condition) { if (!condition) { - String msg = "from Forced 404 NotFound assertion"; // debug message + final String msg = "from Forced 404 NotFound assertion"; // debug message throw new ForcedRequest404NotFoundException(msg); } } @@ -813,7 +809,7 @@ public abstract class FessBaseAction extends RootAction implements ActionCallbac if (dateExp == null || dateExp.isEmpty()) { return null; } - TimeZone userTimeZone = getConversionTimeZone(); + final TimeZone userTimeZone = getConversionTimeZone(); return new HandyDate(dateExp, userTimeZone).getLocalDate(); } @@ -821,7 +817,7 @@ public abstract class FessBaseAction extends RootAction implements ActionCallbac if (dateTimeExp == null || dateTimeExp.isEmpty()) { return null; } - TimeZone userTimeZone = getConversionTimeZone(); + final TimeZone userTimeZone = getConversionTimeZone(); return new HandyDate(dateTimeExp, userTimeZone).getLocalDateTime(); } diff --git a/src/main/java/org/codelibs/sastruts/core/struts/action/SSCRequestProcessor.java b/src/main/java/org/codelibs/sastruts/core/struts/action/SSCRequestProcessor.java index f1341f727..758f199a3 100644 --- a/src/main/java/org/codelibs/sastruts/core/struts/action/SSCRequestProcessor.java +++ b/src/main/java/org/codelibs/sastruts/core/struts/action/SSCRequestProcessor.java @@ -38,7 +38,7 @@ public class SSCRequestProcessor extends S2RequestProcessor { @Override public void init(ActionServlet servlet, ModuleConfig moduleConfig) throws ServletException { super.init(servlet, moduleConfig); - Object value = servlet.getServletContext().getAttribute("sastruts.MAX_REQUEST_PARAMETER_SIZE"); + final Object value = servlet.getServletContext().getAttribute("sastruts.MAX_REQUEST_PARAMETER_SIZE"); if (value != null) { maxReqParamSize = Integer.parseInt(value.toString()); } @@ -46,13 +46,13 @@ public class SSCRequestProcessor extends S2RequestProcessor { @Override protected IndexParsedResult parseIndex(String name) { - IndexParsedResult result = new SSCIndexParsedResult(); + final IndexParsedResult result = new SSCIndexParsedResult(); while (true) { - int index = name.indexOf(INDEXED_DELIM2); + final int index = name.indexOf(INDEXED_DELIM2); if (index < 0) { throw new IllegalArgumentException(INDEXED_DELIM2 + " is not found in " + name); } - int size = Integer.valueOf(name.substring(0, index)).intValue(); + final int size = Integer.valueOf(name.substring(0, index)).intValue(); if (size > maxReqParamSize) { throw new IllegalArgumentException("The array size exceeds " + maxReqParamSize); } diff --git a/src/main/java/org/codelibs/sastruts/core/upload/SSCMultipartRequestHandler.java b/src/main/java/org/codelibs/sastruts/core/upload/SSCMultipartRequestHandler.java index b913bcfff..e02b8055c 100644 --- a/src/main/java/org/codelibs/sastruts/core/upload/SSCMultipartRequestHandler.java +++ b/src/main/java/org/codelibs/sastruts/core/upload/SSCMultipartRequestHandler.java @@ -70,9 +70,7 @@ public class SSCMultipartRequestHandler extends S2MultipartRequestHandler { final InputStream is = request.getInputStream(); try { final byte[] buf = new byte[1024]; - @SuppressWarnings("unused") - int len = 0; - while ((len = is.read(buf)) != -1) { // NOPMD + while ((is.read(buf)) != -1) { // NOPMD } } catch (final Exception ignore) {} finally { try { diff --git a/src/main/java/org/codelibs/sastruts/core/util/ActivityUtil.java b/src/main/java/org/codelibs/sastruts/core/util/ActivityUtil.java index f5ffc7e48..36cc988e9 100644 --- a/src/main/java/org/codelibs/sastruts/core/util/ActivityUtil.java +++ b/src/main/java/org/codelibs/sastruts/core/util/ActivityUtil.java @@ -45,7 +45,7 @@ public class ActivityUtil { } protected static String getRemoteAddr(HttpServletRequest request) { - String clientIp = request.getHeader("x-forwarded-for"); + final String clientIp = request.getHeader("x-forwarded-for"); if (StringUtil.isNotBlank(clientIp)) { return clientIp; } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 9a03cca7d..ea7c45e5d 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -157,7 +157,7 @@ labels.userAgent=User Agent labels.username=Username labels.value=Value labels.versionNo=Version No. -labels.webCrawlingConfigId=Web Config Name +labels.webConfigId=Web Config Name labels.logFileName=Log File Name labels.cronExpression=Schedule labels.dayForCleanup=Remove Index Before Days @@ -205,7 +205,7 @@ labels.expiredTime=Expired labels.failureCountThreshold=Failure Count labels.fileConfigId=ID labels.fileConfigName=Config Name -labels.fileCrawlingConfigId=FS Config Name +labels.fileConfigId=FS Config Name labels.fileName=File name labels.groupName=Solr Group labels.handlerName=Handler Name @@ -466,7 +466,7 @@ labels.footer_back_to_top=Back to top labels.header_brand_name=Fess labels.header_form_option_btn=Options -# view/admin/fileCrawlingConfig/edit.jsp +# view/admin/fileConfig/edit.jsp labels.file_crawling_configuration=File Crawling Configuration labels.file_crawling_title_details=File Crawling Configuration labels.included_paths=Included Paths For Crawling @@ -484,15 +484,15 @@ labels.file_crawling_button_create=Create labels.file_crawling_button_back=Back labels.file_crawling_button_confirm=Confirm -# view/admin/fileCrawlingConfig/confirm.jsp +# view/admin/fileConfig/confirm.jsp labels.file_crawling_title_confirm=Confirm File Crawling Configuration labels.file_crawling_button_update=Update labels.file_crawling_button_delete=Delete labels.file_crawling_button_edit=Edit -# view/admin/fileCrawlingConfig/error.jsp +# view/admin/fileConfig/error.jsp -# view/admin/fileCrawlingConfig/index.jsp +# view/admin/fileConfig/index.jsp labels.file_crawling_link_create_new=Create New labels.file_crawling_link_list=List labels.file_crawling_link_create=Create New @@ -505,7 +505,7 @@ labels.file_crawling_link_delete=Delete labels.file_crawling_link_prev_page=Prev labels.file_crawling_link_next_page=Next -# view/admin/webCrawlingConfig/edit.jsp +# view/admin/webConfig/edit.jsp labels.web_crawling_configuration=Web Crawling Configuration labels.web_crawling_title_details=Web Crawling Configuration labels.included_urls=Included URLs For Crawling @@ -517,15 +517,15 @@ labels.web_crawling_button_create=Create labels.web_crawling_button_back=Back labels.web_crawling_button_confirm=Confirm -# view/admin/webCrawlingConfig/confirm.jsp +# view/admin/webConfig/confirm.jsp labels.web_crawling_title_confirm=Confirm Web Crawling Configuration labels.web_crawling_button_update=Update labels.web_crawling_button_delete=Delete labels.web_crawling_button_edit=Edit -# view/admin/webCrawlingConfig/error.jsp +# view/admin/webConfig/error.jsp -# view/admin/webCrawlingConfig/index.jsp +# view/admin/webConfig/index.jsp labels.web_crawling_link_create_new=Create New labels.web_crawling_link_list=List labels.web_crawling_link_create=Create New @@ -968,7 +968,7 @@ labels.design_title_edit_content=Edit Page View File labels.design_button_update=Update labels.design_button_back=Back -# view/admin/dataCrawlingConfig/edit.jsp +# view/admin/dataConfig/edit.jsp labels.data_crawling_configuration=Data Crawling Configuration labels.data_crawling_title_details=Data Crawling Configuration labels.handler_name=Handler Name @@ -980,15 +980,15 @@ labels.data_crawling_button_create=Create labels.data_crawling_button_back=Back labels.data_crawling_button_confirm=Confirm -# view/admin/dataCrawlingConfig/confirm.jsp +# view/admin/dataConfig/confirm.jsp labels.data_crawling_title_confirm=Confirm Data Crawling Configuration labels.data_crawling_button_update=Update labels.data_crawling_button_delete=Delete labels.data_crawling_button_edit=Edit -# view/admin/dataCrawlingConfig/error.jsp +# view/admin/dataConfig/error.jsp -# view/admin/dataCrawlingConfig/index.jsp +# view/admin/dataConfig/index.jsp labels.data_crawling_link_create_new=Create New labels.data_crawling_link_list=List labels.data_crawling_link_create=Create New diff --git a/src/main/resources/application_ja.properties b/src/main/resources/application_ja.properties index 8864607b6..ac7895486 100644 --- a/src/main/resources/application_ja.properties +++ b/src/main/resources/application_ja.properties @@ -157,7 +157,7 @@ labels.userAgent=\u30e6\u30fc\u30b6\u30fc\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8 labels.username=\u30e6\u30fc\u30b6\u30fc\u540d labels.value=\u5024 labels.versionNo=\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7 -labels.webCrawlingConfigId=\u30a6\u30a7\u30d6\u8a2d\u5b9a\u540d +labels.webConfigId=\u30a6\u30a7\u30d6\u8a2d\u5b9a\u540d labels.logFileName=\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u540d labels.cronExpression=\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb labels.dayForCleanup=\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u6709\u52b9\u671f\u9650 @@ -205,7 +205,7 @@ labels.expiredTime=\u6709\u52b9\u671f\u9650 labels.failureCountThreshold=\u969c\u5bb3\u56de\u6570 labels.fileConfigId=ID labels.fileConfigName=\u8a2d\u5b9a\u540d -labels.fileCrawlingConfigId=FS\u8a2d\u5b9a\u540d +labels.fileConfigId=FS\u8a2d\u5b9a\u540d labels.fileName=\u30d5\u30a1\u30a4\u30eb\u540d labels.groupName=Solr\u30b0\u30eb\u30fc\u30d7\u540d labels.handlerName=\u30cf\u30f3\u30c9\u30e9\u540d @@ -466,7 +466,7 @@ labels.footer_back_to_top=\u4e0a\u90e8\u3078\u79fb\u52d5 labels.header_brand_name=Fess labels.header_form_option_btn=\u30aa\u30d7\u30b7\u30e7\u30f3 -# view/admin/fileCrawlingConfig/edit.jsp +# view/admin/fileConfig/edit.jsp labels.file_crawling_configuration=\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u30af\u30ed\u30fc\u30eb\u306e\u8a2d\u5b9a labels.file_crawling_title_details=\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u30af\u30ed\u30fc\u30eb\u306e\u8a2d\u5b9a labels.included_paths=\u30af\u30ed\u30fc\u30eb\u5bfe\u8c61\u3068\u3059\u308b\u30d1\u30b9 @@ -484,15 +484,15 @@ labels.file_crawling_button_create=\u4f5c\u6210 labels.file_crawling_button_back=\u623b\u308b labels.file_crawling_button_confirm=\u78ba\u8a8d -# view/admin/fileCrawlingConfig/confirm.jsp +# view/admin/fileConfig/confirm.jsp labels.file_crawling_title_confirm=\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u30af\u30ed\u30fc\u30eb\u306e\u8a2d\u5b9a\u306e\u78ba\u8a8d labels.file_crawling_button_update=\u66f4\u65b0 labels.file_crawling_button_delete=\u524a\u9664 labels.file_crawling_button_edit=\u7de8\u96c6 -# view/admin/fileCrawlingConfig/error.jsp +# view/admin/fileConfig/error.jsp -# view/admin/fileCrawlingConfig/index.jsp +# view/admin/fileConfig/index.jsp labels.file_crawling_link_create_new=\u65b0\u898f\u4f5c\u6210 labels.file_crawling_link_list=\u4e00\u89a7 labels.file_crawling_link_create=\u65b0\u898f\u4f5c\u6210 @@ -505,7 +505,7 @@ labels.file_crawling_link_delete=\u524a\u9664 labels.file_crawling_link_prev_page=\u524d\u3078 labels.file_crawling_link_next_page=\u6b21\u3078 -# view/admin/webCrawlingConfig/edit.jsp +# view/admin/webConfig/edit.jsp labels.web_crawling_configuration=\u30a6\u30a7\u30d6\u30af\u30ed\u30fc\u30eb\u306e\u8a2d\u5b9a labels.web_crawling_title_details=\u30a6\u30a7\u30d6\u30af\u30ed\u30fc\u30eb\u306e\u8a2d\u5b9a labels.included_urls=\u30af\u30ed\u30fc\u30eb\u5bfe\u8c61\u3068\u3059\u308bURL @@ -517,15 +517,15 @@ labels.web_crawling_button_create=\u4f5c\u6210 labels.web_crawling_button_back=\u623b\u308b labels.web_crawling_button_confirm=\u78ba\u8a8d -# view/admin/webCrawlingConfig/confirm.jsp +# view/admin/webConfig/confirm.jsp labels.web_crawling_title_confirm=\u30a6\u30a7\u30d6\u30af\u30ed\u30fc\u30eb\u306e\u8a2d\u5b9a\u306e\u78ba\u8a8d labels.web_crawling_button_update=\u66f4\u65b0 labels.web_crawling_button_delete=\u524a\u9664 labels.web_crawling_button_edit=\u7de8\u96c6 -# view/admin/webCrawlingConfig/error.jsp +# view/admin/webConfig/error.jsp -# view/admin/webCrawlingConfig/index.jsp +# view/admin/webConfig/index.jsp labels.web_crawling_link_create_new=\u65b0\u898f\u4f5c\u6210 labels.web_crawling_link_list=\u4e00\u89a7 labels.web_crawling_link_create=\u65b0\u898f\u4f5c\u6210 @@ -968,7 +968,7 @@ labels.design_title_edit_content=\u753b\u9762\u8868\u793a\u30d5\u30a1\u30a4\u30e labels.design_button_update=\u66f4\u65b0 labels.design_button_back=\u623b\u308b -# view/admin/dataCrawlingConfig/edit.jsp +# view/admin/dataConfig/edit.jsp labels.data_crawling_configuration=\u30c7\u30fc\u30bf\u30b9\u30c8\u30a2\u30af\u30ed\u30fc\u30eb\u306e\u8a2d\u5b9a labels.data_crawling_title_details=\u30c7\u30fc\u30bf\u30b9\u30c8\u30a2\u30af\u30ed\u30fc\u30eb\u306e\u8a2d\u5b9a labels.handler_name=\u30cf\u30f3\u30c9\u30e9\u540d @@ -980,15 +980,15 @@ labels.data_crawling_button_create=\u4f5c\u6210 labels.data_crawling_button_back=\u623b\u308b labels.data_crawling_button_confirm=\u78ba\u8a8d -# view/admin/dataCrawlingConfig/confirm.jsp +# view/admin/dataConfig/confirm.jsp labels.data_crawling_title_confirm=\u30c7\u30fc\u30bf\u30b9\u30c8\u30a2\u30af\u30ed\u30fc\u30eb\u306e\u8a2d\u5b9a\u306e\u78ba\u8a8d labels.data_crawling_button_update=\u66f4\u65b0 labels.data_crawling_button_delete=\u524a\u9664 labels.data_crawling_button_edit=\u7de8\u96c6 -# view/admin/dataCrawlingConfig/error.jsp +# view/admin/dataConfig/error.jsp -# view/admin/dataCrawlingConfig/index.jsp +# view/admin/dataConfig/index.jsp labels.data_crawling_link_create_new=\u65b0\u898f\u4f5c\u6210 labels.data_crawling_link_list=\u4e00\u89a7 labels.data_crawling_link_create=\u65b0\u898f\u4f5c\u6210 diff --git a/src/main/resources/dbflute.dicon b/src/main/resources/dbflute.dicon new file mode 100644 index 000000000..e43a5b0c3 --- /dev/null +++ b/src/main/resources/dbflute.dicon @@ -0,0 +1,8 @@ + + + + + + + diff --git a/src/main/resources/fess_es.dicon b/src/main/resources/fess_es.dicon index bbd64f76d..9222eb1e5 100644 --- a/src/main/resources/fess_es.dicon +++ b/src/main/resources/fess_es.dicon @@ -6,14 +6,12 @@ - - @@ -27,14 +25,16 @@ - - - + + + + + diff --git a/src/main/resources/fess_job.dicon b/src/main/resources/fess_job.dicon index f1c4b00e7..c506d7248 100644 --- a/src/main/resources/fess_job.dicon +++ b/src/main/resources/fess_job.dicon @@ -12,10 +12,6 @@ - - - - diff --git a/src/main/webapp/WEB-INF/view/admin/dataCrawlingConfig/confirm.jsp b/src/main/webapp/WEB-INF/view/admin/dataConfig/confirm.jsp similarity index 96% rename from src/main/webapp/WEB-INF/view/admin/dataCrawlingConfig/confirm.jsp rename to src/main/webapp/WEB-INF/view/admin/dataConfig/confirm.jsp index 4f8797c1a..784adeb9a 100644 --- a/src/main/webapp/WEB-INF/view/admin/dataCrawlingConfig/confirm.jsp +++ b/src/main/webapp/WEB-INF/view/admin/dataConfig/confirm.jsp @@ -3,7 +3,7 @@ - + @@ -123,8 +123,8 @@ ${f:h(l.name)}
- - + + diff --git a/src/main/webapp/WEB-INF/view/admin/dataCrawlingConfig/edit.jsp b/src/main/webapp/WEB-INF/view/admin/dataConfig/edit.jsp similarity index 97% rename from src/main/webapp/WEB-INF/view/admin/dataCrawlingConfig/edit.jsp rename to src/main/webapp/WEB-INF/view/admin/dataConfig/edit.jsp index 5b819c882..0870e6765 100644 --- a/src/main/webapp/WEB-INF/view/admin/dataCrawlingConfig/edit.jsp +++ b/src/main/webapp/WEB-INF/view/admin/dataConfig/edit.jsp @@ -6,7 +6,7 @@ - + @@ -111,10 +111,10 @@ - + - + diff --git a/src/main/webapp/WEB-INF/view/admin/dataCrawlingConfig/error.jsp b/src/main/webapp/WEB-INF/view/admin/dataConfig/error.jsp similarity index 90% rename from src/main/webapp/WEB-INF/view/admin/dataCrawlingConfig/error.jsp rename to src/main/webapp/WEB-INF/view/admin/dataConfig/error.jsp index ca3f50f09..33c2bd3bd 100644 --- a/src/main/webapp/WEB-INF/view/admin/dataCrawlingConfig/error.jsp +++ b/src/main/webapp/WEB-INF/view/admin/dataConfig/error.jsp @@ -3,7 +3,7 @@ - + diff --git a/src/main/webapp/WEB-INF/view/admin/dataCrawlingConfig/index.jsp b/src/main/webapp/WEB-INF/view/admin/dataConfig/index.jsp similarity index 76% rename from src/main/webapp/WEB-INF/view/admin/dataCrawlingConfig/index.jsp rename to src/main/webapp/WEB-INF/view/admin/dataConfig/index.jsp index c088c034d..f128fed76 100644 --- a/src/main/webapp/WEB-INF/view/admin/dataCrawlingConfig/index.jsp +++ b/src/main/webapp/WEB-INF/view/admin/dataConfig/index.jsp @@ -6,7 +6,7 @@ - + @@ -36,12 +36,12 @@ - +

- + @@ -54,14 +54,14 @@ + items="${dataConfigItems}"> @@ -81,30 +81,30 @@
+ arg0="${f:h(dataConfigPager.currentPageNumber)}" + arg1="${f:h(dataConfigPager.allPageCount)}" + arg2="${f:h(dataConfigPager.allRecordCount)}" />
<%-- Page Navigation: END --%> diff --git a/src/main/webapp/WEB-INF/view/admin/favoriteLog/confirm.jsp b/src/main/webapp/WEB-INF/view/admin/favoriteLog/confirm.jsp deleted file mode 100644 index 7ceffd45a..000000000 --- a/src/main/webapp/WEB-INF/view/admin/favoriteLog/confirm.jsp +++ /dev/null @@ -1,74 +0,0 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - - - - -

- -

- <%-- Message: BEGIN --%> -
- -
-
- -
- <%-- Message: END --%> - - <%-- Confirm Form: BEGIN --%> - - -
-
${f:h(data.name)} + test="${data.available=='true'}"> - +
- - - - - - - - - - - - - - - - - - - - - - - - -
${f:h(id)}
${f:h(url)}
${f:h(createdTime)}
- " /> - " /> - - " /> - " /> -
- - - <%-- Confirm Form: END --%> - -
- diff --git a/src/main/webapp/WEB-INF/view/admin/favoriteLog/error.jsp b/src/main/webapp/WEB-INF/view/admin/favoriteLog/error.jsp deleted file mode 100644 index 1a94edcef..000000000 --- a/src/main/webapp/WEB-INF/view/admin/favoriteLog/error.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - -
- - -
- - -
- -
-
diff --git a/src/main/webapp/WEB-INF/view/admin/favoriteLog/index.jsp b/src/main/webapp/WEB-INF/view/admin/favoriteLog/index.jsp deleted file mode 100644 index 8fe746d32..000000000 --- a/src/main/webapp/WEB-INF/view/admin/favoriteLog/index.jsp +++ /dev/null @@ -1,198 +0,0 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - - - - - - - -

- -

- <%-- Message: BEGIN --%> -
- -
-
- -
- <%-- Message: END --%> - - <%-- Search: BEGIN --%> -
- - - - - - - - - - - - - - - -
- - - - ${status.index} - - : - - - ${status.index} - -
- - - - ${status.index} - - : - - - ${status.index} - -
-
-
- " /> - " /> -
-
-
-
- <%-- Search: END --%> - -
- - - -
- - <%-- List: BEGIN --%> -
- -

- -

-
- - - - - - - - - - - - - - - - - - -
- - - -  
${f:h(data.url)}${f:h(data.createdTime)} - - - -
- -
- - - - -
- - <%-- Page Navigation: BEGIN --%> -
- -
- -
-
- <%-- Page Navigation: END --%> -
-
- <%-- List: END --%> - -
-
diff --git a/src/main/webapp/WEB-INF/view/admin/fileAuthentication/confirm.jsp b/src/main/webapp/WEB-INF/view/admin/fileAuthentication/confirm.jsp index 6fef7c478..10eee1f0a 100644 --- a/src/main/webapp/WEB-INF/view/admin/fileAuthentication/confirm.jsp +++ b/src/main/webapp/WEB-INF/view/admin/fileAuthentication/confirm.jsp @@ -92,9 +92,9 @@ - - ${f:h(item.label)} - + + ${f:h(item.label)} + diff --git a/src/main/webapp/WEB-INF/view/admin/fileAuthentication/edit.jsp b/src/main/webapp/WEB-INF/view/admin/fileAuthentication/edit.jsp index b0175d209..93f1fcf56 100644 --- a/src/main/webapp/WEB-INF/view/admin/fileAuthentication/edit.jsp +++ b/src/main/webapp/WEB-INF/view/admin/fileAuthentication/edit.jsp @@ -93,8 +93,8 @@ - - + + ${f:h(item.label)} diff --git a/src/main/webapp/WEB-INF/view/admin/fileAuthentication/index.jsp b/src/main/webapp/WEB-INF/view/admin/fileAuthentication/index.jsp index 5267a7358..1397f04b7 100644 --- a/src/main/webapp/WEB-INF/view/admin/fileAuthentication/index.jsp +++ b/src/main/webapp/WEB-INF/view/admin/fileAuthentication/index.jsp @@ -36,7 +36,7 @@ - + @@ -66,7 +66,7 @@ ${f:h(data.hostname)}: ${f:h(data.port)} - ${f:h(data.fileCrawlingConfig.name)} + ${f:h(data.fileConfig.name)} diff --git a/src/main/webapp/WEB-INF/view/admin/fileCrawlingConfig/confirm.jsp b/src/main/webapp/WEB-INF/view/admin/fileConfig/confirm.jsp similarity index 97% rename from src/main/webapp/WEB-INF/view/admin/fileCrawlingConfig/confirm.jsp rename to src/main/webapp/WEB-INF/view/admin/fileConfig/confirm.jsp index de8e249b0..a4e89b1fa 100644 --- a/src/main/webapp/WEB-INF/view/admin/fileCrawlingConfig/confirm.jsp +++ b/src/main/webapp/WEB-INF/view/admin/fileConfig/confirm.jsp @@ -3,7 +3,7 @@ - + @@ -144,8 +144,8 @@ ${f:h(l.name)}
- - + + diff --git a/src/main/webapp/WEB-INF/view/admin/fileCrawlingConfig/edit.jsp b/src/main/webapp/WEB-INF/view/admin/fileConfig/edit.jsp similarity index 96% rename from src/main/webapp/WEB-INF/view/admin/fileCrawlingConfig/edit.jsp rename to src/main/webapp/WEB-INF/view/admin/fileConfig/edit.jsp index 03d90b404..8cb5a3b50 100644 --- a/src/main/webapp/WEB-INF/view/admin/fileCrawlingConfig/edit.jsp +++ b/src/main/webapp/WEB-INF/view/admin/fileConfig/edit.jsp @@ -3,7 +3,7 @@ - + @@ -130,8 +130,8 @@ - - + + diff --git a/src/main/webapp/WEB-INF/view/admin/fileCrawlingConfig/error.jsp b/src/main/webapp/WEB-INF/view/admin/fileConfig/error.jsp similarity index 90% rename from src/main/webapp/WEB-INF/view/admin/fileCrawlingConfig/error.jsp rename to src/main/webapp/WEB-INF/view/admin/fileConfig/error.jsp index d9559925c..b5c851d86 100644 --- a/src/main/webapp/WEB-INF/view/admin/fileCrawlingConfig/error.jsp +++ b/src/main/webapp/WEB-INF/view/admin/fileConfig/error.jsp @@ -3,7 +3,7 @@ - + diff --git a/src/main/webapp/WEB-INF/view/admin/fileCrawlingConfig/index.jsp b/src/main/webapp/WEB-INF/view/admin/fileConfig/index.jsp similarity index 76% rename from src/main/webapp/WEB-INF/view/admin/fileCrawlingConfig/index.jsp rename to src/main/webapp/WEB-INF/view/admin/fileConfig/index.jsp index 9a238e0f4..ad2574eb4 100644 --- a/src/main/webapp/WEB-INF/view/admin/fileCrawlingConfig/index.jsp +++ b/src/main/webapp/WEB-INF/view/admin/fileConfig/index.jsp @@ -6,7 +6,7 @@ - +

@@ -32,12 +32,12 @@ - +

- + @@ -50,14 +50,14 @@ + items="${fileConfigItems}"> @@ -77,30 +77,30 @@
+ arg0="${f:h(fileConfigPager.currentPageNumber)}" + arg1="${f:h(fileConfigPager.allPageCount)}" + arg2="${f:h(fileConfigPager.allRecordCount)}" />
diff --git a/src/main/webapp/WEB-INF/view/admin/requestHeader/confirm.jsp b/src/main/webapp/WEB-INF/view/admin/requestHeader/confirm.jsp index 17a21dd57..23c97f59d 100644 --- a/src/main/webapp/WEB-INF/view/admin/requestHeader/confirm.jsp +++ b/src/main/webapp/WEB-INF/view/admin/requestHeader/confirm.jsp @@ -71,9 +71,9 @@ - + diff --git a/src/main/webapp/WEB-INF/view/admin/requestHeader/edit.jsp b/src/main/webapp/WEB-INF/view/admin/requestHeader/edit.jsp index e68370b67..be7d96eff 100644 --- a/src/main/webapp/WEB-INF/view/admin/requestHeader/edit.jsp +++ b/src/main/webapp/WEB-INF/view/admin/requestHeader/edit.jsp @@ -71,8 +71,8 @@ - diff --git a/src/main/webapp/WEB-INF/view/admin/requestHeader/index.jsp b/src/main/webapp/WEB-INF/view/admin/requestHeader/index.jsp index 97781a9d8..1f3523840 100644 --- a/src/main/webapp/WEB-INF/view/admin/requestHeader/index.jsp +++ b/src/main/webapp/WEB-INF/view/admin/requestHeader/index.jsp @@ -36,7 +36,7 @@ - + @@ -61,7 +61,7 @@ - + - + diff --git a/src/main/webapp/WEB-INF/view/admin/webAuthentication/edit.jsp b/src/main/webapp/WEB-INF/view/admin/webAuthentication/edit.jsp index ecf25bf4f..b7aa6aeb2 100644 --- a/src/main/webapp/WEB-INF/view/admin/webAuthentication/edit.jsp +++ b/src/main/webapp/WEB-INF/view/admin/webAuthentication/edit.jsp @@ -96,8 +96,8 @@ - diff --git a/src/main/webapp/WEB-INF/view/admin/webAuthentication/index.jsp b/src/main/webapp/WEB-INF/view/admin/webAuthentication/index.jsp index 70938fded..7328cba2f 100644 --- a/src/main/webapp/WEB-INF/view/admin/webAuthentication/index.jsp +++ b/src/main/webapp/WEB-INF/view/admin/webAuthentication/index.jsp @@ -35,7 +35,7 @@ - + @@ -65,7 +65,7 @@ ${f:h(data.hostname)}: ${f:h(data.port)} - + diff --git a/src/main/webapp/WEB-INF/view/admin/webCrawlingConfig/edit.jsp b/src/main/webapp/WEB-INF/view/admin/webConfig/edit.jsp similarity index 98% rename from src/main/webapp/WEB-INF/view/admin/webCrawlingConfig/edit.jsp rename to src/main/webapp/WEB-INF/view/admin/webConfig/edit.jsp index 89261dbb2..0109fc90e 100644 --- a/src/main/webapp/WEB-INF/view/admin/webCrawlingConfig/edit.jsp +++ b/src/main/webapp/WEB-INF/view/admin/webConfig/edit.jsp @@ -6,7 +6,7 @@ - + @@ -147,10 +147,10 @@ diff --git a/src/main/webapp/WEB-INF/view/admin/webCrawlingConfig/error.jsp b/src/main/webapp/WEB-INF/view/admin/webConfig/error.jsp similarity index 92% rename from src/main/webapp/WEB-INF/view/admin/webCrawlingConfig/error.jsp rename to src/main/webapp/WEB-INF/view/admin/webConfig/error.jsp index 223d19c7d..6d3128df5 100644 --- a/src/main/webapp/WEB-INF/view/admin/webCrawlingConfig/error.jsp +++ b/src/main/webapp/WEB-INF/view/admin/webConfig/error.jsp @@ -6,7 +6,7 @@ - + diff --git a/src/main/webapp/WEB-INF/view/admin/webCrawlingConfig/index.jsp b/src/main/webapp/WEB-INF/view/admin/webConfig/index.jsp similarity index 76% rename from src/main/webapp/WEB-INF/view/admin/webCrawlingConfig/index.jsp rename to src/main/webapp/WEB-INF/view/admin/webConfig/index.jsp index 7063734ed..98e714632 100644 --- a/src/main/webapp/WEB-INF/view/admin/webCrawlingConfig/index.jsp +++ b/src/main/webapp/WEB-INF/view/admin/webConfig/index.jsp @@ -6,7 +6,7 @@ - + @@ -33,12 +33,12 @@ - +

- +
${f:h(data.name)} + test="${data.available=='true'}"> - +
- ${f:h(item.label)} - + ${f:h(item.label)} +
- + + ${f:h(item.label)}
${f:h(data.name)}${f:h(data.webCrawlingConfig.name)}${f:h(data.webConfig.name)} diff --git a/src/main/webapp/WEB-INF/view/admin/searchLog/confirm.jsp b/src/main/webapp/WEB-INF/view/admin/searchLog/confirm.jsp deleted file mode 100644 index 496502c5f..000000000 --- a/src/main/webapp/WEB-INF/view/admin/searchLog/confirm.jsp +++ /dev/null @@ -1,156 +0,0 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - - - - -

- -

- <%-- Message: BEGIN --%> -
- -
-
- -
- <%-- Message: END --%> - - <%-- Confirm Form: BEGIN --%> - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
${f:h(id)}
- ${f:h(searchWord)} - -
${f:h(requestedTime)}
${f:h(responseTime)}
${f:h(hitCount)}
${f:h(queryOffset)}
${f:h(queryPageSize)}
- ${f:h(userAgent)} - -
- ${f:h(referer)} - -
- ${f:h(clientIp)} - -
- ${f:h(userSessionId)} - -
- ${f:h(accessType)} - -
- " /> - " /> - - " /> - " /> -
-
-
- <%-- Confirm Form: END --%> - - - <%-- List: BEGIN --%> -
-

- -

- - - - - - - - - - - - - - - -
${f:h(data.url)}
${f:h(data.requestedTimeForList)}
-
-
- -
-
diff --git a/src/main/webapp/WEB-INF/view/admin/searchLog/error.jsp b/src/main/webapp/WEB-INF/view/admin/searchLog/error.jsp deleted file mode 100644 index 76a5e9689..000000000 --- a/src/main/webapp/WEB-INF/view/admin/searchLog/error.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - -
- - -
- - -
- -
-
diff --git a/src/main/webapp/WEB-INF/view/admin/searchLog/index.jsp b/src/main/webapp/WEB-INF/view/admin/searchLog/index.jsp deleted file mode 100644 index 2d14f06be..000000000 --- a/src/main/webapp/WEB-INF/view/admin/searchLog/index.jsp +++ /dev/null @@ -1,252 +0,0 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - - - - - - - -

- -

- <%-- Message: BEGIN --%> -
- -
-
- -
- <%-- Message: END --%> - - <%-- Search: BEGIN --%> -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - ${status.index} - - : - - - ${status.index} - -
- - - - - ${status.index} - - : - - - ${status.index} - -
  - -
-
-
- " /> - " /> -
-
-
-
- <%-- Search: END --%> - -
- - - -
- - <%-- List: BEGIN --%> -
- -

- -

-
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
${f:h(data.requestedTimeForList)}${f:h(data.searchWord)}${f:h(data.responseTime)}${f:h(data.hitCount)} - - - -
- -
- - - - -
- - <%-- Page Navigation: BEGIN --%> -
- -
- -
-
- <%-- Page Navigation: END --%> -
-
- <%-- List: END --%> - -
-
diff --git a/src/main/webapp/WEB-INF/view/admin/stats/index.jsp b/src/main/webapp/WEB-INF/view/admin/stats/index.jsp deleted file mode 100644 index b09df9585..000000000 --- a/src/main/webapp/WEB-INF/view/admin/stats/index.jsp +++ /dev/null @@ -1,206 +0,0 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - - - - - - - -

- -

- - <%-- Message: BEGIN --%> -
- -
-
- -
- <%-- Message: END --%> - - <%-- Search: BEGIN --%> -
- - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - ${f:h(reportTypeLabel)} - -
- - - - - ${status.index} - - : - - - ${status.index} - -
- - - - - ${status.index} - - : - - - ${status.index} - -
-
-
- " /> " /> -
-
- -
-
- <%-- Search: END --%> - - <%-- List: BEGIN --%> -
- -

- -

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

- -

- - - - - - - - - - - - - - - - - - - - - - -
${f:h(code)}
${f:h(createdTime)}
${f:h(updatedTime)}
- - "/> - "/> - - - "/> - "/> - - - "/> - "/> - - - "/> - "/> - "/> - -
-
-
-<%-- Confirm Form: BEGIN --%> - -
- -
-
diff --git a/src/main/webapp/WEB-INF/view/admin/userInfo/error.jsp b/src/main/webapp/WEB-INF/view/admin/userInfo/error.jsp deleted file mode 100644 index 8503edee2..000000000 --- a/src/main/webapp/WEB-INF/view/admin/userInfo/error.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - -
- - -
- - -
- -
-
diff --git a/src/main/webapp/WEB-INF/view/admin/userInfo/index.jsp b/src/main/webapp/WEB-INF/view/admin/userInfo/index.jsp deleted file mode 100644 index 9c1812848..000000000 --- a/src/main/webapp/WEB-INF/view/admin/userInfo/index.jsp +++ /dev/null @@ -1,140 +0,0 @@ -<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> - - - - - - - - - - -

- -

- <%-- Message: BEGIN --%> -
- -
-
- -
- <%-- Message: END --%> - -<%-- Search: BEGIN --%> -
- - - - - - -
-
-
- "/> - "/> -
-
-
-
-<%-- Search: END --%> - -<%-- List: BEGIN --%> -
- -

- -

-
- - - - - - - - - - - - - - - - - - -
 
${f:h(data.code)}${f:h(data.updatedTime)} - - - -
- -
- - - - -
- - -<%-- Page Navigation: BEGIN --%> -
- -
- -
-
-
-<%-- Page Navigation: END --%> -
-<%-- List: END --%> - -
-
diff --git a/src/main/webapp/WEB-INF/view/admin/webAuthentication/confirm.jsp b/src/main/webapp/WEB-INF/view/admin/webAuthentication/confirm.jsp index ec9f133ac..11e5823dc 100644 --- a/src/main/webapp/WEB-INF/view/admin/webAuthentication/confirm.jsp +++ b/src/main/webapp/WEB-INF/view/admin/webAuthentication/confirm.jsp @@ -95,9 +95,9 @@
- ${f:h(item.label)} - + ${f:h(item.label)} +
- + + ${f:h(item.label)} ${f:h(data.webCrawlingConfig.name)}${f:h(data.webConfig.name)} diff --git a/src/main/webapp/WEB-INF/view/admin/webCrawlingConfig/confirm.jsp b/src/main/webapp/WEB-INF/view/admin/webConfig/confirm.jsp similarity index 97% rename from src/main/webapp/WEB-INF/view/admin/webCrawlingConfig/confirm.jsp rename to src/main/webapp/WEB-INF/view/admin/webConfig/confirm.jsp index 6a00beb57..97d9575b5 100644 --- a/src/main/webapp/WEB-INF/view/admin/webCrawlingConfig/confirm.jsp +++ b/src/main/webapp/WEB-INF/view/admin/webConfig/confirm.jsp @@ -3,7 +3,7 @@ - + @@ -149,8 +149,8 @@ ${f:h(l.name)}
- - + +
- + - +
@@ -51,13 +51,13 @@ + items="${webConfigItems}">
${f:h(data.name)} + test="${data.available=='true'}"> - +
    - + - + + items="${webConfigPager.pageNumberList}">
  • class="active">class="active">${p}
  • - + - + @@ -108,9 +108,9 @@
    + arg0="${f:h(webConfigPager.currentPageNumber)}" + arg1="${f:h(webConfigPager.allPageCount)}" + arg2="${f:h(webConfigPager.allRecordCount)}" />
    <%-- Page Navigation: END --%> diff --git a/src/main/webapp/WEB-INF/view/common/admin/menu.jsp b/src/main/webapp/WEB-INF/view/common/admin/menu.jsp index 5ed8fa4a3..b4bf11b32 100644 --- a/src/main/webapp/WEB-INF/view/common/admin/menu.jsp +++ b/src/main/webapp/WEB-INF/view/common/admin/menu.jsp @@ -90,33 +90,33 @@

    - + - + - +
    - + - + - +
    - + - + - +
    @@ -301,49 +301,4 @@

    -

    - -

    -

    - - - - - - - - - -
    - - - - - - - - - -
    - - - - - - - - - -
    - - - - - - - - - -
    -